From: storm@cua.dk (Kim F. Storm)
Cc: Takaaki.Ota@am.sony.com, emacs-devel@gnu.org
Subject: Re: yank-handler
Date: 13 Feb 2004 17:15:12 +0100 [thread overview]
Message-ID: <m3smhfq7lb.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <200402130352.i1D3qhk27180@raven.dms.auburn.edu>
Luc Teirlinck <teirllm@dms.auburn.edu> writes:
> Revision 1372 of subr.el drastically changed the behavior of
> `insert-for-yank', but made no supporting changes in `kill-new'.
Good catch, Luc!
> Without
> further changes, the patch below would keep all yank handlers of the
> old string in place, whereas the new string would get no yank-handler.
> This independently of whether the new string got prepended or
> appended. That behavior might actually make more sense, given the new
> "philosophy" of `insert-for-yank'.
Yes, that seems to be the logical choice.
>
> If desired, I could, of course, commit the trivial patch below.
Please do!
>
> _However_, without further changes, the UNDO specified by the _last_
> yank-handler region always seems to win for the _entire_ yank. I do
> not feel comfortable at all about this, although I know of no concrete
> bugs resulting from it.
I don't think there are any uses of the yank-handler undo feature yet.
Actually, table.el seems to be the only usage of yank-handlers, and it
doesn't even seem to use more than very basic features of it.
In any case, as long as we haven't made a final 22.x release, we are
free to fix it anyway we feel necessary.
> I suspect the latter might just be due to the
> fact that 4-part yank-handlers are not used very often in the Emacs
> source code. I can not immediately think of _any_ safe way to handle
> competing UNDO's however.
I think it is necessary to build a list of undo functions and the
region they apply to, rather than just a single yank-undo-function.
I don't have time to work on it though.
Still, the yank-handler functionality may need more general rework (I
recall Stefan making some comments about it a while back).
> Maybe one just will have to be extremely
> careful when specifying 4-part yank-handlers.
I think that will always be true -- yank-handler can make a lot of
problems if done carelessly.
next prev parent reply other threads:[~2004-02-13 16:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-13 3:52 yank-handler Luc Teirlinck
2004-02-13 4:09 ` yank-handler Luc Teirlinck
2004-02-13 16:15 ` Kim F. Storm [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-05-14 16:03 yank-handler Stefan Monnier
2003-05-14 23:09 ` yank-handler Kim F. Storm
2003-05-15 15:42 ` yank-handler Richard Stallman
2003-05-15 16:19 ` yank-handler Andreas Schwab
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=m3smhfq7lb.fsf@kfs-l.imdomain.dk \
--to=storm@cua.dk \
--cc=Takaaki.Ota@am.sony.com \
--cc=emacs-devel@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.
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).