From: Bob Newell <bobnewell@bobnewell.net>
To: help-gnu-emacs@gnu.org
Subject: Re: mark multi regions, kill and yank
Date: Mon, 30 Oct 2023 07:11:11 -1000 [thread overview]
Message-ID: <87zg00jas0.cahcbkqxd@xqbyxoy.ajhx.org> (raw)
In-Reply-To: <87lebkxfml.fsf@mat.ucm.es> (Uwe Brauer's message of "Mon, 30 Oct 2023 17:02:42 +0100")
Uwe Brauer <oub@mat.ucm.es> writes:
> Hi
>
> I am looking for a package that allows me
>
> 1. to mark several regions,
>
> 2. To kill them
>
> 3. And then later to yank everything.
>
I have heard this called "scatter gather." I've been using
the following rather trivial code, which isn't fully "scatter
gather" but it does 1-3 above in incremental fashion, that is,
one region at a time rather than all at once. I realize this
is not quite what you want, however it does allow you to yank
a concatenated set of copied or killed regions.
;;; A couple of append commands for scatter-gather. Bind to
;;; global keys. Why C-cps and C-cpk? Because it's difficult,
;;; especially in org-mode, to find free keys.
(defun append-kill-to-kill-ring ()
(interactive)
(append-next-kill)
(kill-region (mark) (point)))
(defun append-save-to-kill-ring ()
(interactive)
(append-next-kill)
(kill-ring-save (mark) (point)))
(global-set-key "\C-cps" 'append-save-to-kill-ring)
(global-set-key "\C-cpk" 'append-kill-to-kill-ring)
--
Bob Newell
Honolulu, Hawai`i
- Via GNU/Linux/Emacs/Gnus/BBDB
next prev parent reply other threads:[~2023-10-30 17:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-30 16:02 mark multi regions, kill and yank Uwe Brauer
2023-10-30 17:11 ` Bob Newell [this message]
2023-10-30 17:56 ` Uwe Brauer
2023-10-30 19:56 ` Bob Newell
2023-10-30 17:32 ` [External] : " Drew Adams
2023-10-30 17:54 ` Uwe Brauer
2023-10-30 19:39 ` Drew Adams
2023-10-30 20:32 ` Uwe Brauer
2023-10-30 21:42 ` Drew Adams
2023-10-31 8:53 ` Uwe Brauer
2023-10-31 16:39 ` Drew Adams
2023-10-31 16:52 ` Uwe Brauer
2023-10-31 17:48 ` Drew Adams
2023-10-31 20:36 ` Uwe Brauer
2023-10-31 21:08 ` Drew Adams
2023-11-01 7:05 ` Uwe Brauer
2023-11-01 15:00 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zg00jas0.cahcbkqxd@xqbyxoy.ajhx.org \
--to=bobnewell@bobnewell.net \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).