unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Why does C-M-o `split-line' leave trailing space on the old line?
@ 2023-11-17 17:40 Alan Mackenzie
  2023-11-17 18:38 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Mackenzie @ 2023-11-17 17:40 UTC (permalink / raw)
  To: emacs-devel

Hello, Emacs.

C-M-o, on something like:

     foo bar baz
            ^
	  point

will split the line into

     foo bar
             baz

, but will leave a trailing space on the first line.  This is in
accordance with its documentation in emacs.info, but this peculiarity
isn't mentioned in the doc string.

I find this trailing space irritating, as I frequently have to remove it
by hand.  What is the motivation for this trailing space, and do we
really want it?

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why does C-M-o `split-line' leave trailing space on the old line?
  2023-11-17 17:40 Why does C-M-o `split-line' leave trailing space on the old line? Alan Mackenzie
@ 2023-11-17 18:38 ` Eli Zaretskii
  2023-11-17 18:59   ` Alan Mackenzie
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2023-11-17 18:38 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

> Date: Fri, 17 Nov 2023 17:40:27 +0000
> From: Alan Mackenzie <acm@muc.de>
> 
> Hello, Emacs.
> 
> C-M-o, on something like:
> 
>      foo bar baz
>             ^
> 	  point
> 
> will split the line into
> 
>      foo bar
>              baz
> 
> , but will leave a trailing space on the first line.  This is in
> accordance with its documentation in emacs.info, but this peculiarity
> isn't mentioned in the doc string.
> 
> I find this trailing space irritating, as I frequently have to remove it
> by hand.  What is the motivation for this trailing space

It lets you keep typing right after that.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why does C-M-o `split-line' leave trailing space on the old line?
  2023-11-17 18:38 ` Eli Zaretskii
@ 2023-11-17 18:59   ` Alan Mackenzie
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Mackenzie @ 2023-11-17 18:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Hello, Eli.

On Fri, Nov 17, 2023 at 20:38:02 +0200, Eli Zaretskii wrote:
> > Date: Fri, 17 Nov 2023 17:40:27 +0000
> > From: Alan Mackenzie <acm@muc.de>

> > Hello, Emacs.

> > C-M-o, on something like:

> >      foo bar baz
> >             ^
> > 	  point

> > will split the line into

> >      foo bar
> >              baz

> > , but will leave a trailing space on the first line.  This is in
> > accordance with its documentation in emacs.info, but this peculiarity
> > isn't mentioned in the doc string.

> > I find this trailing space irritating, as I frequently have to remove it
> > by hand.  What is the motivation for this trailing space

> It lets you keep typing right after that.

Ah, is that it?  It seems strange indeed to have a command which does two
disjoint things (first move point then split the line) rather than just
splitting the line at point.

I typically don't want to type further on the old line after C-M-o.  If I
did, I would expect to type the space myself, or alternatively first move
point to after the space before typing C-M-o.

Maybe I should make my own private version of split-line.

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-17 18:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-17 17:40 Why does C-M-o `split-line' leave trailing space on the old line? Alan Mackenzie
2023-11-17 18:38 ` Eli Zaretskii
2023-11-17 18:59   ` Alan Mackenzie

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).