[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Please try Pmail
From: |
Stefan Monnier |
Subject: |
Re: Please try Pmail |
Date: |
Tue, 20 Jan 2009 21:37:49 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
> /* If build_annotations switched buffers, switch back to BUF.
> Kill the temporary buffer that was selected in the meantime.
> Since this kill only the last temporary buffer, some buffers remain
> not killed if build_annotations switched buffers more than once.
> -- K.Handa */
> static Lisp_Object
> build_annotations_unwind (buf)
> Lisp_Object buf;
> {
> Lisp_Object tembuf;
> if (XBUFFER (buf) == current_buffer)
> return Qnil;
> tembuf = Fcurrent_buffer ();
> Fset_buffer (buf);
> Fkill_buffer (tembuf);
> return Qnil;
> }
Duh! I tested saving, and checked that the file's contents was right,
but never noticed this. It turns out that this code is used by
format-annotate-function, so there's a good reason for it to be there.
We should try to find a way to get both cases working right (and even
the case where build_annotations switched buffers more than once,
ideally).
The cleanest solution is to let build_annotations_unwind run some
buffer-local hook function (e.g. write-region-post-annotate-function),
which can either run kill-buffer, and/or re-narrow the buffer, and/or
kill previous buffers. The current code already allows it via
kill-buffer-hook, but using that is ugly and will lead to
other surprises.
Stefan
- Please try Pmail, Richard M Stallman, 2009/01/17
- Re: Please try Pmail, Chong Yidong, 2009/01/18
- Re: Please try Pmail, Alfred M. Szmidt, 2009/01/18
- Re: Please try Pmail, Stefan Monnier, 2009/01/18
- Re: Please try Pmail, Chong Yidong, 2009/01/18
- Re: Please try Pmail, Chong Yidong, 2009/01/18
- Re: Please try Pmail, Stefan Monnier, 2009/01/19
- Re: Please try Pmail, Chong Yidong, 2009/01/20
- Re: Please try Pmail,
Stefan Monnier <=
- Re: Please try Pmail, Chong Yidong, 2009/01/20
- Re: Please try Pmail, Stefan Monnier, 2009/01/20
- Re: Please try Pmail, Chong Yidong, 2009/01/21
- Re: Please try Pmail, Stefan Monnier, 2009/01/21
- Re: Please try Pmail, Chong Yidong, 2009/01/21
- Re: Please try Pmail, Stefan Monnier, 2009/01/21
- Re: Please try Pmail, Chong Yidong, 2009/01/21
- Re: Please try Pmail, Richard M Stallman, 2009/01/22
- Re: Please try Pmail, Chong Yidong, 2009/01/22
- Re: Please try Pmail, Richard M Stallman, 2009/01/21