[Top][All Lists]

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

Re: [AUCTeX-devel] Add `unit' type for the parser in siunitx.el

From: Tassilo Horn
Subject: Re: [AUCTeX-devel] Add `unit' type for the parser in siunitx.el
Date: Wed, 13 Feb 2013 18:58:01 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Mosè Giordano <address@hidden> writes:

>>> Do you have alternative suggestions for this?
>> IMO, it would make sense to simply discard all auto-parsed
>> information in case loading the auto/foo.el signals an error.
> Good idea, but for now I'm not able to implement it :-)
> I tried to put
>   (run-hooks 'TeX-auto-cleanup-hook)
> in `tex.el' inside a `condition-case' (you suggested to use this
> function), but it didn't work.  I don't know where to catch the error.
>  I have to study the code better.

If you have a sample tex file plus a recipe how to reproduce the error,
I could check myself.  E.g. a tex file using siunitx with some custom
unit definitions, and then I change it not to use siunitx and revert the
buffer, so that I hit the undefined function error.

>> And I have one more question: The new type for the parser is for
>> siunitx units.  However, LaTeX-siunitx-regexp says it matches unit,
>> power, prefix, and qualifier definitions.  Is that all the same,
>> e.g., may I provide a qualifier where a power was expected?  Or
>> should there be a individual parser type for each siunitx thingy?
> I want to provide completion in minibuffer for all macros that can be
> used in the mandatory argument to `\si' and the second mandatory
> argument to `\SI'.  I called the type `unit' because they are almost
> all units or their abbreviations.  Powers, prefixes and qualifiers are
> usually a minority, but in my opinion they can be regarded all as the
> same thing.  I don't believe a different parser for each of these
> macros would be somehow more useful.

Ok, thanks for clarifying.


reply via email to

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