unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ergus <spacibba@aol.com>
To: Robert Pluim <rpluim@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Question Kill-ring modify last entry.
Date: Mon, 29 Jul 2019 20:10:43 +0200	[thread overview]
Message-ID: <20190729181043.3gycaavyeyokgevj@Ergus> (raw)
In-Reply-To: <m2sgqohpf7.fsf@gmail.com>

Hi:

I have already seen kill-new. I was just preventing myself to reinvent
the wheel in case there were something else already there.

I was looking for something like `append-next-kill` that I could use for
`copy-region-as-kill` (or similar), but for replace instead of
appending and acting on regions instead of passing the string already
manipulated.

Ideally I thought that the higher level functions (kill-region,
copy-region-as-kill) somehow unified the lower level functions
(kill-append, kill-new). Maybe throw parameters.

But ok, thanks.

I know what to do now :)


On Mon, Jul 29, 2019 at 04:43:24PM +0200, Robert Pluim wrote:
>>>>>> On Sun, 28 Jul 2019 23:45:15 +0200, Ergus <spacibba@aol.com> said:
>
>    Ergus> Hi:
>    Ergus> I have been reading the elisp documentation and it is unclear for me if
>    Ergus> there is a "canonical" (lets say formal/supported/provided/save)
>    Ergus> function to replace the last entry in the kill-ring with a new one (like
>    Ergus> the append option).
>
>kill-new has a 'replace' argument, so:
>
>(kill-new "foo" t)
>
>(unless I??ve misunderstood what you??re asking for)
>
>Robert
>



  reply	other threads:[~2019-07-29 18:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-28 21:45 Question Kill-ring modify last entry Ergus
2019-07-29 14:18 ` Eli Zaretskii
2019-07-29 14:43 ` Robert Pluim
2019-07-29 18:10   ` Ergus [this message]
2019-07-29 18:42     ` Eli Zaretskii

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=20190729181043.3gycaavyeyokgevj@Ergus \
    --to=spacibba@aol.com \
    --cc=emacs-devel@gnu.org \
    --cc=rpluim@gmail.com \
    /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.
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).