[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] Re: [AUCTeX-diffs] Changes to reftex/lisp/reftex-base
From: |
David Kastrup |
Subject: |
Re: [AUCTeX-devel] Re: [AUCTeX-diffs] Changes to reftex/lisp/reftex-base.el, v |
Date: |
Sun, 22 Jul 2007 12:47:01 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
Ralf Angeli <address@hidden> writes:
> * David Kastrup (2007-07-22) writes:
>
>> Ralf Angeli <address@hidden> writes:
>>
>>> - (find-file file)
>>> + (set-buffer (get-buffer-create file))
>>> (erase-buffer)
>>
>> NO!!!!!! You can't just take a buffer that happens to have the same
>> _buffer_ name as the file and kill it. What were you thinking? Ok,
>> it is Sunday morning.
>>
>> If you start and end with a clean slate, probably the easiest thing to
>> do is to wrap everything in
>>
>> (with-temp-file file
>> ...
>> )
>
> `generate-new-buffer' instead of `get-buffer-create' should work as
> well, I guess.
Probably, but it is still pointless not to just use with-temp-file
which is there exactly for that purpose and is as far as I can see
available in Emacs 21.4 and a moderately up to date XEmacs-21.4.
Less code to maintain, less ways for things to go wrong.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum