* bug#29013: 25.3; [wishlist] do not yank whitespace
@ 2017-10-26 15:40 Alex Branham
2017-10-26 15:52 ` Andreas Schwab
2021-06-30 13:56 ` Lars Ingebrigtsen
0 siblings, 2 replies; 4+ messages in thread
From: Alex Branham @ 2017-10-26 15:40 UTC (permalink / raw)
To: 29013
It would be nice to have an option so that yank never returns pure whitespace. The current behavior is such that if we have:
#+BEGIN_EXAMPLE
some text here
some text there|
#+END_EXAMPLE
with | representing where point is, if you execute C-SPC C-a M-w C-p C-k C-p C-y then you end up with:
#+BEGIN_EXAMPLE
some text here
some text there
#+END_EXAMPLE
but I would like to end up with:
#+BEGIN_EXAMPLE
some text there
some text here
some text there
#+END_EXAMPLE
Thanks,
Alex
In GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.19)
of 2017-09-16 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
Configured using:
'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
-fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#29013: 25.3; [wishlist] do not yank whitespace
2017-10-26 15:40 bug#29013: 25.3; [wishlist] do not yank whitespace Alex Branham
@ 2017-10-26 15:52 ` Andreas Schwab
2017-10-26 15:56 ` Alex Branham
2021-06-30 13:56 ` Lars Ingebrigtsen
1 sibling, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2017-10-26 15:52 UTC (permalink / raw)
To: Alex Branham; +Cc: 29013
On Okt 26 2017, Alex Branham <alex.branham@gmail.com> wrote:
> It would be nice to have an option so that yank never returns pure whitespace. The current behavior is such that if we have:
>
> #+BEGIN_EXAMPLE
> some text here
>
> some text there|
> #+END_EXAMPLE
>
>
> with | representing where point is, if you execute C-SPC C-a M-w C-p C-k C-p C-y then you end up with:
>
> #+BEGIN_EXAMPLE
>
> some text here
> some text there
> #+END_EXAMPLE
>
>
> but I would like to end up with:
>
> #+BEGIN_EXAMPLE
> some text there
> some text here
> some text there
> #+END_EXAMPLE
Just type M-y (yank-pop) to get the next element from the kill ring.
You can also use DEL to delete the empty line without polluting the kill
ring.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#29013: 25.3; [wishlist] do not yank whitespace
2017-10-26 15:52 ` Andreas Schwab
@ 2017-10-26 15:56 ` Alex Branham
0 siblings, 0 replies; 4+ messages in thread
From: Alex Branham @ 2017-10-26 15:56 UTC (permalink / raw)
To: Andreas Schwab; +Cc: 29013
On Thu 26 Oct 2017 at 15:52, Andreas Schwab <schwab@suse.de> wrote:
> Just type M-y (yank-pop) to get the next element from the kill ring.
> You can also use DEL to delete the empty line without polluting the kill
> ring.
Thanks for the response.
Yes, I know I can work around this. However, I rarely (if ever) want to yank pure whitespace. It'd be nice not to have to think about it.
Alex
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#29013: 25.3; [wishlist] do not yank whitespace
2017-10-26 15:40 bug#29013: 25.3; [wishlist] do not yank whitespace Alex Branham
2017-10-26 15:52 ` Andreas Schwab
@ 2021-06-30 13:56 ` Lars Ingebrigtsen
1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-30 13:56 UTC (permalink / raw)
To: Alex Branham; +Cc: 29013
Alex Branham <alex.branham@gmail.com> writes:
> It would be nice to have an option so that yank never returns pure
> whitespace.
I think that's a good idea -- or, to be more general, I think it would
be nice if there was a way to transform texts before they're put on the
kill ring, and possibly discard them.
So for this particular use case, the transformation function could
return nil to indicate that it shouldn't land in the kill ring.
So I've now added this to Emacs 28 under the name kill-transform-function.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-30 13:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-26 15:40 bug#29013: 25.3; [wishlist] do not yank whitespace Alex Branham
2017-10-26 15:52 ` Andreas Schwab
2017-10-26 15:56 ` Alex Branham
2021-06-30 13:56 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.