Discussion:
emacs lisp mode, mailing list?
Mark H. David
2018-06-21 15:49:11 UTC
Permalink
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?
Pascal Bourguignon
2018-06-21 16:35:04 UTC
Permalink
Post by Mark H. David
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 H. David
2018-06-21 22:50:49 UTC
Permalink
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 <***@informatimago.com>
To: Discussion list for Common Lisp professionals <***@common-lisp.net>Subject: Re: emacs lisp mode, mailing list?
Date: Thu, 21 Jun 2018 18:35:04 +0200
Post by Mark H. David
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__
Jeff Caldwell
2018-06-21 23:25:29 UTC
Permalink
I'm not at an Emacs right now, but does Ctrl-j not do what you want?
Post by Mark H. David
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,
(defun foo ()
;; blah blah blah*
and you type M-RET. Next thing that happens is the cursor is on the next
(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 -----
Subject: Re: emacs lisp mode, mailing list?
Date: Thu, 21 Jun 2018 18:35:04 +0200
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__
Jeff Caldwell
2018-06-21 23:27:04 UTC
Permalink
Ah it doesn't add the semi-colons.
Post by Jeff Caldwell
I'm not at an Emacs right now, but does Ctrl-j not do what you want?
Post by Mark H. David
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,
(defun foo ()
;; blah blah blah*
and you type M-RET. Next thing that happens is the cursor is on the next
(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 -----
Subject: Re: emacs lisp mode, mailing list?
Date: Thu, 21 Jun 2018 18:35:04 +0200
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__
Ken Tilton
2018-06-22 00:24:46 UTC
Permalink
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
Post by Mark H. David
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,
(defun foo ()
;; blah blah blah*
and you type M-RET. Next thing that happens is the cursor is on the next
(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 -----
Subject: Re: emacs lisp mode, mailing list?
Date: Thu, 21 Jun 2018 18:35:04 +0200
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__
--
Kenneth Tilton
http://tiltontec.com/
Pascal Bourguignon
2018-06-22 07:51:31 UTC
Permalink
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__
Ken Tilton
2018-06-22 13:25:57 UTC
Permalink
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...
Post by Ken Tilton
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__
--
Kenneth Tilton
http://tiltontec.com/
Vladimir Sedach
2018-06-23 18:01:45 UTC
Permalink
Post by Ken Tilton
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-***@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
Ken Tilton
2018-06-23 19:02:43 UTC
Permalink
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
Post by Vladimir Sedach
Post by Ken Tilton
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
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
--
Kenneth Tilton
http://tiltontec.com/
Elias Mårtenson
2018-06-24 14:50:27 UTC
Permalink
Post by Vladimir Sedach
Post by Ken Tilton
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
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.
Vladimir Sedach
2018-06-30 03:40:09 UTC
Permalink
Post by Elias MÃ¥rtenson
I'm currently working on a project where I am bringing Maxima to CLIM (I've
had some pretty good progress)
Very cool!
Post by Elias MÃ¥rtenson
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
Elias Mårtenson
2018-06-30 16:50:04 UTC
Permalink
Post by Vladimir Sedach
Post by Elias MÃ¥rtenson
I'm currently working on a project where I am bringing Maxima to CLIM
(I've
Post by Elias MÃ¥rtenson
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:

Post by Vladimir Sedach
Post by Elias MÃ¥rtenson
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

Mark Cox
2018-06-22 00:52:44 UTC
Permalink
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
Post by Mark H. David
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,
(defun foo ()
;; blah blah blah*
and you type M-RET. Next thing that happens is the cursor is on the next
(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 -----
Subject: Re: emacs lisp mode, mailing list?
Date: Thu, 21 Jun 2018 18:35:04 +0200
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__
Sky Hester
2018-06-22 01:09:50 UTC
Permalink
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
Post by Mark Cox
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
(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
Post by Mark H. David
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,
(defun foo ()
;; blah blah blah*
and you type M-RET. Next thing that happens is the cursor is on the next
(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 -----
Subject: Re: emacs lisp mode, mailing list?
Date: Thu, 21 Jun 2018 18:35:04 +0200
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__
Andy Peterson
2018-06-22 04:06:57 UTC
Permalink
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
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
Post by Mark Cox
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
(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
Post by Mark H. David
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,
(defun foo ()
;; blah blah blah*
and you type M-RET. Next thing that happens is the cursor is on the next
(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 -----
Subject: Re: emacs lisp mode, mailing list?
Date: Thu, 21 Jun 2018 18:35:04 +0200
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__
Pascal Bourguignon
2018-06-22 07:58:42 UTC
Permalink
Post by Andy Peterson
Mark,
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).
--
__Pascal J. Bourguignon__
Mark H. David
2018-06-22 23:17:55 UTC
Permalink
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 <***@gmail.com>
To: Discussion list for Common Lisp professionals <***@common-lisp.net>Subject: Re: emacs lisp mode, mailing list?
Date: Fri, 22 Jun 2018 00:06:57 -0400

Mark,
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
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
Post by Mark Cox
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
Post by Mark H. David
__
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:>>>
(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 -----
lisp.net>>>> Subject: Re: emacs lisp mode, mailing list?
Date: Thu, 21 Jun 2018 18:35:04 +0200
Post by Mark H. David
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__
Loading...