Is there a mailing list to ask questions and make suggestions and talk about emacs lisp mode for pro Lispers? Would that be here perhaps?
On 21 Jun 2018, at 17:49, Mark H. David mhd@yv.org wrote:
Is there a mailing list to ask questions and make suggestions and talk about emacs lisp mode for pro Lispers? Would that be here perhaps?
Yes, there’s no other place.
OK, well I'm wondering if anyone remembers the keybinding M-RET (meta return), within a semi-colon (;) comment, which used to wonderfully both start a new line, but also continue the comment at the same indent level, same number of leading semi-colons, with a space after. Example: You're here, and your cursor is where the * is:
(defun foo () ;; blah blah blah*
and you type M-RET. Next thing that happens is the cursor is on the next line where the * is, and the lines then look like this: (defun foo () ;; blah blah blah ;; *
What happened to that functionality? I thought it was there for years, I'm pretty sure on the Lisp Machine and I think for years in regular Emacs in Lisp mode. It got ingrained in my fingers, and I often still try it, but of course now all I get is: M-RET is undefined Thank you.
----- Original message ----- From: Pascal Bourguignon pjb@informatimago.com To: Discussion list for Common Lisp professionals pro@common-lisp.netSubject: Re: emacs lisp mode, mailing list? Date: Thu, 21 Jun 2018 18:35:04 +0200
On 21 Jun 2018, at 17:49, Mark H. David mhd@yv.org wrote:
Is there a mailing list to ask questions and make suggestions and talk about emacs lisp mode for pro Lispers? Would that be here perhaps?
Yes, there’s no other place.
I'm not at an Emacs right now, but does Ctrl-j not do what you want?
On Thu, Jun 21, 2018, 6:51 PM Mark H. David mhd@yv.org wrote:
OK, well I'm wondering if anyone remembers the keybinding M-RET (meta return), within a semi-colon (;) comment, which used to wonderfully both start a new line, but also continue the comment at the same indent level, same number of leading semi-colons, with a space after. Example:
You're here, and your cursor is where the * is:
(defun foo () ;; blah blah blah*
and you type M-RET. Next thing that happens is the cursor is on the next line where the * is, and the lines then look like this:
(defun foo () ;; blah blah blah ;; *
What happened to that functionality? I thought it was there for years, I'm pretty sure on the Lisp Machine and I think for years in regular Emacs in Lisp mode. It got ingrained in my fingers, and I often still try it, but of course now all I get is: M-RET is undefined
Thank you.
----- Original message ----- From: Pascal Bourguignon pjb@informatimago.com To: Discussion list for Common Lisp professionals pro@common-lisp.net Subject: Re: emacs lisp mode, mailing list? Date: Thu, 21 Jun 2018 18:35:04 +0200
On 21 Jun 2018, at 17:49, Mark H. David mhd@yv.org wrote:
Is there a mailing list to ask questions and make suggestions and talk about emacs lisp mode for pro Lispers? Would that be here perhaps?
Yes, there’s no other place.
-- __Pascal J. Bourguignon__
Ah it doesn't add the semi-colons.
On Thu, Jun 21, 2018, 7:25 PM Jeff Caldwell jeffrey.d.caldwell@gmail.com wrote:
I'm not at an Emacs right now, but does Ctrl-j not do what you want?
On Thu, Jun 21, 2018, 6:51 PM Mark H. David mhd@yv.org wrote:
OK, well I'm wondering if anyone remembers the keybinding M-RET (meta return), within a semi-colon (;) comment, which used to wonderfully both start a new line, but also continue the comment at the same indent level, same number of leading semi-colons, with a space after. Example:
You're here, and your cursor is where the * is:
(defun foo () ;; blah blah blah*
and you type M-RET. Next thing that happens is the cursor is on the next line where the * is, and the lines then look like this:
(defun foo () ;; blah blah blah ;; *
What happened to that functionality? I thought it was there for years, I'm pretty sure on the Lisp Machine and I think for years in regular Emacs in Lisp mode. It got ingrained in my fingers, and I often still try it, but of course now all I get is: M-RET is undefined
Thank you.
----- Original message ----- From: Pascal Bourguignon pjb@informatimago.com To: Discussion list for Common Lisp professionals pro@common-lisp.net Subject: Re: emacs lisp mode, mailing list? Date: Thu, 21 Jun 2018 18:35:04 +0200
On 21 Jun 2018, at 17:49, Mark H. David mhd@yv.org wrote:
Is there a mailing list to ask questions and make suggestions and talk about emacs lisp mode for pro Lispers? Would that be here perhaps?
Yes, there’s no other place.
-- __Pascal J. Bourguignon__
JP Massar joined our team and fired up the AllegroCL IDE in Emacs mode and immediately lamented the absence of mouse commands. The Franz team remembered them as awesome and provided them in a day. Cursive lacks them and seems uninterested in pursuing them, but we think we found them on The Google.
Moral, Emacs giveth and Emacs taketh away.
I looked at coding up mouse commands myself but just out of curiosity and gave up without even trying. But I am sure it would be doable.
I just googled M-Ret and did not find it. Cursive, however, has that behavior without me even hokding down Meta.
FWIW.
-kt
On Thu, Jun 21, 2018 at 6:50 PM, Mark H. David mhd@yv.org wrote:
OK, well I'm wondering if anyone remembers the keybinding M-RET (meta return), within a semi-colon (;) comment, which used to wonderfully both start a new line, but also continue the comment at the same indent level, same number of leading semi-colons, with a space after. Example:
You're here, and your cursor is where the * is:
(defun foo () ;; blah blah blah*
and you type M-RET. Next thing that happens is the cursor is on the next line where the * is, and the lines then look like this:
(defun foo () ;; blah blah blah ;; *
What happened to that functionality? I thought it was there for years, I'm pretty sure on the Lisp Machine and I think for years in regular Emacs in Lisp mode. It got ingrained in my fingers, and I often still try it, but of course now all I get is: M-RET is undefined
Thank you.
----- Original message ----- From: Pascal Bourguignon pjb@informatimago.com To: Discussion list for Common Lisp professionals pro@common-lisp.net Subject: Re: emacs lisp mode, mailing list? Date: Thu, 21 Jun 2018 18:35:04 +0200
On 21 Jun 2018, at 17:49, Mark H. David mhd@yv.org wrote:
Is there a mailing list to ask questions and make suggestions and talk about emacs lisp mode for pro Lispers? Would that be here perhaps?
Yes, there’s no other place.
-- __Pascal J. Bourguignon__
On 22 Jun 2018, at 02:24, Ken Tilton kentilton@gmail.com wrote:
I looked at coding up mouse commands myself but just out of curiosity and gave up without even trying. But I am sure it would be doable.
It is very easy to do. Just bind mouse events like any other key chord.
down-mouse-1 mouse-1 -2 for middle and -3 for left button. You can of course combine it with modifiers: C-M-mouse-1 = Control Meta left button click.
(local-set-key (kbd "C-M-<mouse-1>") (lambda () (interactive) (insert "Mice!")))
Thx, but what I gave up on (after a whole 30s of investigation) was actually coding the behavior working from other examples of high level edit functionality coded in elisp, using elisp subroutines. I am sure five minutes would have gotten me over the hurdle, but there has been no real need. AllegroCL has the commands, and Cursive is unhackable.
Hmmm, I should ask about that. I just had a chat with its developer on #Clojurians and I think I failed to sell him on implementing it, but maybe...
On Fri, Jun 22, 2018 at 3:51 AM, Pascal Bourguignon pjb@informatimago.com wrote:
On 22 Jun 2018, at 02:24, Ken Tilton kentilton@gmail.com wrote:
I looked at coding up mouse commands myself but just out of curiosity and gave up without even trying. But I am sure it would be doable.
It is very easy to do. Just bind mouse events like any other key chord.
down-mouse-1 mouse-1 -2 for middle and -3 for left button. You can of course combine it with modifiers: C-M-mouse-1 = Control Meta left button click.
(local-set-key (kbd "C-M-<mouse-1>") (lambda () (interactive) (insert "Mice!")))
-- __Pascal J. Bourguignon__
I looked at coding up mouse commands myself but just out of curiosity and gave up without even trying. But I am sure it would be doable.
There have been several implementations copying the basic mouse commands from Genera in GNU Emacs:
https://www.mail-archive.com/gnu-emacs-sources@gnu.org/msg00393.html http://www.foldr.org/~michaelw/projects/redshank/redshank.el https://github.com/vsedach/mouse-copy
I stopped pursuing the idea after discovering that mouse use was giving me wrist pain.
Vladimir
Thx for the links, Vladimir.
I know about the mouse and wrist pain! Double-clicking is hell. But when it got bad for me I switched the mouse to my left hand and never had a problem again. I also stopped playin games where I had to click. :)
hth, kt
On Sat, Jun 23, 2018 at 2:01 PM, Vladimir Sedach vsedach@gmail.com wrote:
I looked at coding up mouse commands myself but just out of curiosity and gave up without even trying. But I am sure it would be doable.
There have been several implementations copying the basic mouse commands from Genera in GNU Emacs:
https://www.mail-archive.com/gnu-emacs-sources@gnu.org/msg00393.html http://www.foldr.org/~michaelw/projects/redshank/redshank.el https://github.com/vsedach/mouse-copy
I stopped pursuing the idea after discovering that mouse use was giving me wrist pain.
Vladimir
On Sun, 24 Jun 2018, 02:03 Vladimir Sedach, vsedach@gmail.com wrote:
I looked at coding up mouse commands myself but just out of curiosity and gave up without even trying. But I am sure it would be doable.
There have been several implementations copying the basic mouse commands from Genera in GNU Emacs:
https://www.mail-archive.com/gnu-emacs-sources@gnu.org/msg00393.html http://www.foldr.org/~michaelw/projects/redshank/redshank.el https://github.com/vsedach/mouse-copy
I stopped pursuing the idea after discovering that mouse use was giving me wrist pain.
I'm currently working on a project where I am bringing Maxima to CLIM (I've had some pretty good progress), but one thing that has frustrated me is that CLIM does not have a consistent concept of keyboard control.
I believe this comes from Genera. I wonder if it was designed at a time where it was thought that mouse control would be the primary mechanism of interaction.
I'm currently working on a project where I am bringing Maxima to CLIM (I've had some pretty good progress)
Very cool!
but one thing that has frustrated me is that CLIM does not have a consistent concept of keyboard control. I believe this comes from Genera. I wonder if it was designed at a time where it was thought that mouse control would be the primary mechanism of interaction.
I have not looked at Genera sources. I have poked around TI Explorer source code, and it looks to me like there was no convention for handling keyboard input as commands in the MIT derived Lisp Machines. This is a hard problem that went without an obviously satisfactory solution for a very long time. I believe the keymap and keymap inheritance and nesting mechanisms in GNU Emacs is the best model available today. One of the neat things in GNU Emacs is which-key mode (https://github.com/justbur/emacs-which-key), which is like the modeline help for mouse commands in Genera, for keyboard shortcuts.
Vladimir
On 30 June 2018 at 11:40, Vladimir Sedach vsedach@gmail.com wrote:
I'm currently working on a project where I am bringing Maxima to CLIM
(I've
had some pretty good progress)
Very cool!
Thank you. The source repository is here: https://github.com/lokedhs/maxima-client and I made a couple of videos showing what it looks like. Here is a playlist: https://www.youtube.com/watch?v=AvC82EjoPYU&list=PL6AQVVynH5Dg3Wwpk3zNT9...
but one thing that has frustrated me is that CLIM does not have a consistent concept of keyboard control. I believe this comes from Genera. I wonder if it was designed at a time where it was thought that mouse control would be the primary mechanism of interaction.
I have not looked at Genera sources. I have poked around TI Explorer source code, and it looks to me like there was no convention for handling keyboard input as commands in the MIT derived Lisp Machines. This is a hard problem that went without an obviously satisfactory solution for a very long time. I believe the keymap and keymap inheritance and nesting mechanisms in GNU Emacs is the best model available today. One of the neat things in GNU Emacs is which-key mode (https://github.com/justbur/emacs-which-key), which is like the modeline help for mouse commands in Genera, for keyboard shortcuts.
CLIM does have a concept of keyboard shortcuts. You can bind keys to commands in a way that is somewhat similar to Emacs. Also, the default editor widget, Drei, is modelled on Emacs, and uses keybindings in a very similar way.
Thus, it's definitely possible to build a keyboard-driven application in CLIM, but you have to do everything yourself. In CLIM, you work a lot with graphical representation of objects, and clicking on an object (for example, a form in the REPL, or a subexpression in an equation in my Maxima client) will invoke various operations based on the current input context of the application.
Unfortunately CLIM has no provisions at all for keyboard navigation here. If I want to be able to select something using the keyboard, I have to build it all myself. What's even more surprising is that there isn't even a keybinding to navigate multiple text fields. You'd expect to be able to press Tab, but that will just invoke whatever that key is bound to in Drei.
People must have had one hand on the mouse more or less constantly while working in Genera.
Regards, Elias
G'day Mark,
I don't know the command you are after but paredit provides the command paredit-reindent-defun which is bound to M-q when in paredit mode.
You can invoke this command once your comment becomes too long to fit on one line. For example:
(defun example () ;; This is a really long comment designed to show how the function paredit-reindent-defun works.* (print "hello world"))
(defun example () ;; This is a really long comment designed to show how the function ;; paredit-reindent-defun works.* (print "hello world"))
Mark
On Fri, Jun 22, 2018 at 8:50 AM, Mark H. David mhd@yv.org wrote:
OK, well I'm wondering if anyone remembers the keybinding M-RET (meta return), within a semi-colon (;) comment, which used to wonderfully both start a new line, but also continue the comment at the same indent level, same number of leading semi-colons, with a space after. Example:
You're here, and your cursor is where the * is:
(defun foo () ;; blah blah blah*
and you type M-RET. Next thing that happens is the cursor is on the next line where the * is, and the lines then look like this:
(defun foo () ;; blah blah blah ;; *
What happened to that functionality? I thought it was there for years, I'm pretty sure on the Lisp Machine and I think for years in regular Emacs in Lisp mode. It got ingrained in my fingers, and I often still try it, but of course now all I get is: M-RET is undefined
Thank you.
----- Original message ----- From: Pascal Bourguignon pjb@informatimago.com To: Discussion list for Common Lisp professionals pro@common-lisp.net Subject: Re: emacs lisp mode, mailing list? Date: Thu, 21 Jun 2018 18:35:04 +0200
On 21 Jun 2018, at 17:49, Mark H. David mhd@yv.org wrote:
Is there a mailing list to ask questions and make suggestions and talk about emacs lisp mode for pro Lispers? Would that be here perhaps?
Yes, there’s no other place.
-- __Pascal J. Bourguignon__
Hi Mark,
Mark is right; paredit-mode binds paredit-reindent-defun to M-q, which calls either lisp-fill-paragraph (from lisp-mode.el) or indents the form, depending on whether you're in a comment or string. The string part is nice if you like docstrings with a fixed maximum width.
-Sky
On Thu, Jun 21, 2018, 5:53 PM Mark Cox markcox80@gmail.com wrote:
G'day Mark,
I don't know the command you are after but paredit provides the command paredit-reindent-defun which is bound to M-q when in paredit mode.
You can invoke this command once your comment becomes too long to fit on one line. For example:
(defun example () ;; This is a really long comment designed to show how the function paredit-reindent-defun works.* (print "hello world"))
(defun example () ;; This is a really long comment designed to show how the function ;; paredit-reindent-defun works.* (print "hello world"))
Mark
On Fri, Jun 22, 2018 at 8:50 AM, Mark H. David mhd@yv.org wrote:
OK, well I'm wondering if anyone remembers the keybinding M-RET (meta return), within a semi-colon (;) comment, which used to wonderfully both start a new line, but also continue the comment at the same indent level, same number of leading semi-colons, with a space after. Example:
You're here, and your cursor is where the * is:
(defun foo () ;; blah blah blah*
and you type M-RET. Next thing that happens is the cursor is on the next line where the * is, and the lines then look like this:
(defun foo () ;; blah blah blah ;; *
What happened to that functionality? I thought it was there for years, I'm pretty sure on the Lisp Machine and I think for years in regular Emacs in Lisp mode. It got ingrained in my fingers, and I often still try it, but of course now all I get is: M-RET is undefined
Thank you.
----- Original message ----- From: Pascal Bourguignon pjb@informatimago.com To: Discussion list for Common Lisp professionals pro@common-lisp.net Subject: Re: emacs lisp mode, mailing list? Date: Thu, 21 Jun 2018 18:35:04 +0200
On 21 Jun 2018, at 17:49, Mark H. David mhd@yv.org wrote:
Is there a mailing list to ask questions and make suggestions and talk about emacs lisp mode for pro Lispers? Would that be here perhaps?
Yes, there’s no other place.
-- __Pascal J. Bourguignon__
Mark,
from key help: c-h k c-m-j:
C-M-j runs the command indent-new-comment-line (found in global-map),
which is an alias for ‘comment-indent-new-line’ in ‘newcomment.el’.
It is bound to C-M-j, M-j.
(indent-new-comment-line &optional SOFT)
Break line at point and indent, continuing comment if within one. This indents the body of the continued comment under the previous comment line.
This command is intended for styles where you write a comment per line, starting a new comment (and terminating it if necessary) on each line. If you want to continue one comment across several lines, use M-x newline-and-indent.
If a fill column is specified, it overrides the use of the comment column or comment indentation.
The inserted newline is marked hard if variable ‘use-hard-newlines’ is true, unless optional argument SOFT is non-nil.
andy peterson
On 21 June 2018 at 21:09, Sky Hester skyjhester@gmail.com wrote:
Hi Mark,
Mark is right; paredit-mode binds paredit-reindent-defun to M-q, which calls either lisp-fill-paragraph (from lisp-mode.el) or indents the form, depending on whether you're in a comment or string. The string part is nice if you like docstrings with a fixed maximum width.
-Sky
On Thu, Jun 21, 2018, 5:53 PM Mark Cox markcox80@gmail.com wrote:
G'day Mark,
I don't know the command you are after but paredit provides the command paredit-reindent-defun which is bound to M-q when in paredit mode.
You can invoke this command once your comment becomes too long to fit on one line. For example:
(defun example () ;; This is a really long comment designed to show how the function paredit-reindent-defun works.* (print "hello world"))
(defun example () ;; This is a really long comment designed to show how the function ;; paredit-reindent-defun works.* (print "hello world"))
Mark
On Fri, Jun 22, 2018 at 8:50 AM, Mark H. David mhd@yv.org wrote:
OK, well I'm wondering if anyone remembers the keybinding M-RET (meta return), within a semi-colon (;) comment, which used to wonderfully both start a new line, but also continue the comment at the same indent level, same number of leading semi-colons, with a space after. Example:
You're here, and your cursor is where the * is:
(defun foo () ;; blah blah blah*
and you type M-RET. Next thing that happens is the cursor is on the next line where the * is, and the lines then look like this:
(defun foo () ;; blah blah blah ;; *
What happened to that functionality? I thought it was there for years, I'm pretty sure on the Lisp Machine and I think for years in regular Emacs in Lisp mode. It got ingrained in my fingers, and I often still try it, but of course now all I get is: M-RET is undefined
Thank you.
----- Original message ----- From: Pascal Bourguignon pjb@informatimago.com To: Discussion list for Common Lisp professionals pro@common-lisp.net Subject: Re: emacs lisp mode, mailing list? Date: Thu, 21 Jun 2018 18:35:04 +0200
On 21 Jun 2018, at 17:49, Mark H. David mhd@yv.org wrote:
Is there a mailing list to ask questions and make suggestions and talk about emacs lisp mode for pro Lispers? Would that be here perhaps?
Yes, there’s no other place.
-- __Pascal J. Bourguignon__
On 22 Jun 2018, at 06:06, Andy Peterson andy.arvid@gmail.com wrote:
Mark,
from key help: c-h k c-m-j:
C-M-j runs the command indent-new-comment-line (found in global-map), which is an alias for ‘comment-indent-new-line’ in ‘newcomment.el’.
It is bound to C-M-j, M-j.
(indent-new-comment-line &optional SOFT)
It could be argued that when you are in a comment, you should stay in a comment. Like in paredit, when you’re in a list and type RET, you go to a new-line, indented in the list. You have to type ) to get out of the list (or some other ‘up’ command. (or when you’re in a docstring, RET stays in the docstring, and you have to use paredit-forward-up (C-M-n) to get out of it.
Then, similarly, you could bind RET to indent-new-comment-line, and use C-RET for usual newline-and-indent. Or extend paredit-forward-up to get you out of the comment (both #|comments|# and ;comments).
Andy, thank you so much for reuniting me with this command I've long been missing. I can get used to M-j, especially since I already use C-j. Thank you so much! Not sure how I lost track of that change. Anyhow, this really helps me. Thanks! ----- Original message ----- From: Andy Peterson andy.arvid@gmail.com To: Discussion list for Common Lisp professionals pro@common-lisp.netSubject: Re: emacs lisp mode, mailing list? Date: Fri, 22 Jun 2018 00:06:57 -0400
Mark,
from key help: c-h k c-m-j:
C-M-j runs the command indent-new-comment-line (found in global-map),> which is an alias for ‘comment-indent-new-line’ in ‘newcomment.el’.
It is bound to C-M-j, M-j.
(indent-new-comment-line &optional SOFT)
Break line at point and indent, continuing comment if within one. This indents the body of the continued comment under the previous comment line.
This command is intended for styles where you write a comment per line,> starting a new comment (and terminating it if necessary) on each line.> If you want to continue one comment across several lines, use M-x newline-and-indent.> If a fill column is specified, it overrides the use of the comment column> or comment indentation.
The inserted newline is marked hard if variable ‘use-hard-newlines’ is true,> unless optional argument SOFT is non-nil.
andy peterson
On 21 June 2018 at 21:09, Sky Hester skyjhester@gmail.com wrote:
Hi Mark,
Mark is right; paredit-mode binds paredit-reindent-defun to M-q, which calls either lisp-fill-paragraph (from lisp-mode.el) or indents the form, depending on whether you're in a comment or string. The string part is nice if you like docstrings with a fixed maximum width.>
-Sky
On Thu, Jun 21, 2018, 5:53 PM Mark Cox markcox80@gmail.com wrote:
G'day Mark,
I don't know the command you are after but paredit provides the command paredit-reindent-defun which is bound to M-q when in paredit mode.>> You can invoke this command once your comment becomes too long to fit on one line. For example:>> (defun example () ;; This is a really long comment designed to show how the function ;; paredit-reindent-defun works.*>> (print "hello world"))
(defun example () ;; This is a really long comment designed to show how the function>> ;; paredit-reindent-defun works.* (print "hello world"))
Mark
On Fri, Jun 22, 2018 at 8:50 AM, Mark H. David mhd@yv.org wrote:
__ OK, well I'm wondering if anyone remembers the keybinding M-RET (meta return), within a semi-colon (;) comment, which used to wonderfully both start a new line, but also continue the comment at the same indent level, same number of leading semi-colons, with a space after. Example:>>> You're here, and your cursor is where the * is:
(defun foo () ;; blah blah blah*
and you type M-RET. Next thing that happens is the cursor is on the next line where the * is, and the lines then look like this:>>> (defun foo () ;; blah blah blah ;; *
What happened to that functionality? I thought it was there for years, I'm pretty sure on the Lisp Machine and I think for years in regular Emacs in Lisp mode. It got ingrained in my fingers, and I often still try it, but of course now all I get is: M-RET is undefined>>> Thank you.
----- Original message ----- From: Pascal Bourguignon pjb@informatimago.com To: Discussion list for Common Lisp professionals <pro@common- lisp.net>>>> Subject: Re: emacs lisp mode, mailing list? Date: Thu, 21 Jun 2018 18:35:04 +0200
On 21 Jun 2018, at 17:49, Mark H. David mhd@yv.org wrote:
Is there a mailing list to ask questions and make suggestions and talk about emacs lisp mode for pro Lispers? Would that be here perhaps?>>>
Yes, there’s no other place.
-- __Pascal J. Bourguignon__