Hi, 2014-08-07 21:56 GMT+02:00 Tassilo Horn <[email protected]>: > Mosè Giordano <[email protected]> writes: > > Hi Mosè, > >> `LaTeX-label' function always inserts labels, but I don't like this >> behavior since I want to automatically add labels for some but not all >> environments. > > I also don't always insert a label for each section or environment where > AUCTeX offers to insert one, but I'm just fine with hitting C-g in those > cases where I don't want one. > >> The attached patch introduces a new customizable option to manage the >> behavior of `LaTeX-label'. This can be either a boolean or a cons >> cell. When the variable is a boolean, t makes `LaTeX-label' always >> insert labels, otherwise with a nil value a label will never be >> inserted. To add a more fine-grained control, the variable can also >> be a whitelist or a blacklist > > I think, I cannot encode my labeling needs in such a variable, e.g., my > requirement is not simply "I don't want labels for FOOBARs" but more > like "I don't want labels for FOOBARs unless it's a paper for the QUUX > journal using the BAZ document class." Well, and the rules are probably > not really static anyway.
For very sophisticated rules, we could add another possible value for `LaTeX-auto-insert-label': the name of a function (taking as argument the name of the environment) to which leave the decision. But this would be only for very bold Lisp hackers :-) > But just that I have no use for a feature doesn't mean it's bad, of > course. If it's useful for you and possibly others, then I'm fine with > just not customizing it and getting the behavior I'm used to. Ok, patch just installed! Thank you. Bye, Mosè _______________________________________________ auctex-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/auctex-devel
