[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] Default settings
From: |
Tassilo Horn |
Subject: |
Re: [AUCTeX-devel] Default settings |
Date: |
Tue, 18 Mar 2014 09:53:04 +0100 |
User-agent: |
Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3.50 (gnu/linux) |
Florêncio Neves <address@hidden> writes:
Hi Florêncio,
>>> I think the following settings should become the default:
>>>
>>> (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
>>> (setq reftex-plug-into-AUCTeX t)
>>
>> As Uwe mentioned, reftex is a separate package on XEmacs, so it might
>> not be installed. We could possibly check if it's available and if
>> so, enable it. Though, in general, I think it's better to start out
>> basic and make it easy to enable things instead of starting out big
>> and making it hard for users that don't want a particular feature to
>> disable it again.
>
> Well, you can always *disable* stuff that you don't like. I find it
> much more likely that people give up using AUCTeX because it appears
> not to do even the most basic stuff.
The problem with the above is that `reftex-plug-into-AUCTeX' is a reftex
variable, not an AUCTeX variable. Possibly, a sane approach was to set
that to t by default, and turn on reftex in AUCTeX if it is non-nil.
Currently, emacs is in feature-freeze, so this change needs to wait
until 24.4 has been released.
> I consider direct PDF generation the "basic" option, and going through
> DVI the "technical" alternative that might be required in some
> esoteric situation.
Now TeX-PDF-mode is enabled by default.
>>> (setq TeX-parse-self t)
>>
>> I agree with Mosè that basically anybody doing LaTeX editing want
>> that to be t, and then I'd say the parsing is fast enough. However,
>> there are possibly Emacs users on systems that have AUCTeX installed
>> that look at some tex file only causually, and then it would be bad
>> if the defaults make that slow.
>>
>> I've just tried running `TeX-auto-apply' on some large latex document
>> (that's what's called with `TeX-parse-self' set to t), and even on my
>> recent computer with an SSD, it takes about a second. So it might
>> easily take several seconds on older computers.
>
> Is there a minibuffer message, and can you interrupt parsing with C-g?
> If so, I don't see a problem.
No, I think that would be inacceptable. I'd welcome if someone could
provide some numbers of how long parsing takes for some larger document
on an older/smaller system (but not so old that it's unlikely someone
still uses it today).
>>> (add-hook 'TeX-mode-hook '(lambda () (LaTeX-math-mode t))
>>
>> You can use LaTeX without writing maths, so some people might prefer
>> to be able to insert ` quickly instead of having that as a prefix
>> command.
>
> I agree. So I think the Math menu should always be shown (it is
> available in TeX even if you don't use it). In this case the purpose
> of the math minor mode would be just to turn on and off the ` prefix.
Looks like a good compromise. Patch welcome!
> (By the way, the Math menu cannot be accessed by clicking LaTeX/M on
> the modeline. Maybe it should...)
Yes, I think it should.
>>> Also, dollar signs should automatically become electric if
>>> `electric-pair-mode' is active (I think currently one has set
>>> TeX-electric-math manually).
>>
>> AUCTeX' and electric-pair's pairing features are basically exclusive.
>> You can use either one, but both together don't work too good.
>
> Couldn't that be fixed?
Not sure. I basically like the new electric-pair-mode in emacs better,
but the good thing with AUCTeX electric maths is that you can type $ and
it'll insert \(\) instead.
> By the way, I noticed you can't exit a pair $ ... $ by typing a dollar
> sign. In other words, if you have
>
> $abc!$
>
> where ! denotes the cursor position, and type $, you get
>
> $abc!$$
>
> instead of
>
> $abc$!
>
> as expected.
Yes, also it would be nice if with TeX-electric-math set to ("\\("
. "\\)"), typing $ twice in a row would result in \[\]. Right now, you
need to mark your inline equation to promote to display equation.
> (I still think that now that Emacs has fancy pair insertion
> functionality built-in, it would be better to bind $ to
> self-insert-command and let Emacs do the rest. It already knows $ is
> to be treated as a delimiter in TeX mode, so it would do pair
> insertion as expected if electric-pair-mode is active.)
I tend to agree, except that it would be neat if I could insert $s which
are easy to type to get LaTeX style math, e.g., \(\) and \[\].
>> Quite so. If `TeX-master' is dwim, AUCTeX checks if there's some
>> other latex buffer that holds a file in the same directory and has
>> `TeX-master' explicitly set to a string/file. This basically handles
>> the common situation where you have:
>>
>> main.tex ;; TeX-master: t
>> secs/sec01.tex ;; TeX-master: "../main.tex"
>>
>> and now you do C-x C-f secs/sec02.tex to write another section in a
>> separate file. In this case, sec02.tex automatically has the same
>> `TeX-master' value as sec01.tex.
>
> I think the most useful feature regarding master files would be the
> following: if the current buffer is not a complete latex document
> (i.e., it has no \documentclass and \begin{document}) and has no
> master file associated to it, then AUCTeX should ask for a master file
> instead of calling latex on that buffer.
It does so now, except that it doesn't do magic to check if it's a
complete doc.
Bye,
Tassilo