unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: Katsumi Yamaoka <yamaoka@jpl.org>,
	emacs-devel@gnu.org, Miles Bader <miles@gnu.org>
Subject: Re: insert-file-contents disables undo
Date: Thu, 24 Jul 2008 23:34:02 +0200	[thread overview]
Message-ID: <4888F54A.1060301@gmx.at> (raw)
In-Reply-To: <jwvvdyv4c1r.fsf-monnier+emacs@gnu.org>

 >>Thanks for finding that!  I don't immediately see the reason for the bug
 >>in `insert-file-contents'; that function's handling of the undo list is
 >>a huge festering pile of hair...
 >
 > Hmm... but isn't that pile of hair the immediate reason for the bug?

The immediate reason is that I forgot that record_insert would collapse
the insertion done by `insert-file-contents' with other insertions.
AFAICT Andreas fixed that and also the mindless one-armed `if' I wrote.
Thanks, Andreas!

Anyway, the pile of hair is rooted deep inside `insert-file-contents'
which tries to reconcile format decoding, `after-insert-file-functions',
keeping the undo-list short and `point' where it was, and whatever have
you.  `insert-file-contents' presently has about 1200 lines of code,
that's clearly too much for my brain.

martin





      reply	other threads:[~2008-07-24 21:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-24  9:52 insert-file-contents disables undo Katsumi Yamaoka
2008-07-24 10:25 ` Miles Bader
2008-07-24 13:02   ` Andreas Schwab
2008-07-24 22:10     ` Katsumi Yamaoka
2008-07-24 22:21       ` David Kastrup
2008-07-24 14:01   ` Stefan Monnier
2008-07-24 21:34     ` martin rudalics [this message]

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=4888F54A.1060301@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=yamaoka@jpl.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).