bug-auctex
[Top][All Lists]
Advanced

[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: Ralf Angeli
Subject: Re: [Bug-AUCTeX] Re: 2005-06-15; wrong-type-argument with LaTeX-includegraphics-read-file-relative
Date: Thu, 16 Jun 2005 13:51:40 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

* David Kastrup (2005-06-16) writes:

> 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.
[...]
>> 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.

Interesting.  Now the question is if we actually want to have this
behavior.

As an example, I often abort the insertion of labels when adding a
sectioning command and would not want to have everything rolled back
in this case.  But this mostly occurs when I am testing stuff and not
during normal writing, so this might not be representative.

But we are not (yet) talking about `LaTeX-section' but about
`TeX-insert-macro'.  Currently I don't have an example where it could
be useful to abort the insertion and be happy with the inserted plain
macro.  So it would be fine with me.  What about other people?

In case we want that, I could check in the attached patch.  (That's
actually the first macro I've ever written.  Nobody tell me that this
would be better done with something like defalias or defun. (c;)

-- 
Ralf

Attachment: txtsu_xA743Xk.txt
Description: Text Data


reply via email to

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