[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-AUCTeX] Re: 2005-06-15; wrong-type-argument with LaTeX-includeg

From: David Kastrup
Subject: Re: [Bug-AUCTeX] Re: 2005-06-15; wrong-type-argument with LaTeX-includegraphics-read-file-relative
Date: Thu, 16 Jun 2005 13:12:00 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Ralf Angeli <address@hidden> writes:

> * Franz Haeuslschmid (2005-06-16) writes:
>> Anyway, as I prepared the report, it stroke me,
>> that the process of inserting macros is not transactional.  I
>> mean, when I'm hit by an error or decide to abort to insert a
>> macro, e.g. when I'm prompted to insert a file, the edited buffer
>> should be in the state, that it was before hitting `C-c RET'.
>> I don't know AUCTeX's internals, but is something like that hard
>> to implement?  Of course, this is more a feature request or a
>> suggestion for an improvement.
> Doing this currently would be tricky.  The code for inserting macros
> inserts the plain macro and then calls potential special functions for
> inserting arguments of the macro.  In case processing of these special
> functions is aborted, the plain macro will remain in the buffer as you
> observed.

Emacs CVS has

atomic-change-group is a Lisp macro in `subr'.
(atomic-change-group &rest BODY)

Perform BODY as an atomic change group.
This means that if BODY exits abnormally,
all of its changes to the current buffer are undone.
This works regardless of whether undo is enabled in the buffer.

This mechanism is transparent to ordinary use of undo;
if undo is enabled in the buffer and BODY succeeds, the
user can undo the change normally.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

[Prev in Thread] Current Thread [Next in Thread]