[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] multi-file support
From: |
Ralf Angeli |
Subject: |
Re: [AUCTeX-devel] multi-file support |
Date: |
Fri, 06 May 2005 19:29:49 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
* David Kastrup (2005-05-06) writes:
> Ralf Angeli <address@hidden> writes:
>
>> Look, I am arguing from a user's point of view, not from an
>> application's point of view.
>>
>>> This has been the behavior for AUCTeX from ancient history to 11.13 or
>>> so, and nobody complained worth noting.
>>
>> Not an argument.
>
> Decide yourself. If you are talking about the user's point of view,
> it is absurd to discard user feedback as "not an argument".
That's not what I did. I discarded non(!)-feedback as "not an
argument".
Anyway, we still need to solve the problem of the master file question
not being asked in the 'shared case. With the current implementation
I'd probably just ask the question at when the file is loaded. This
can be achieved by the following change:
--- tex.el 6 May 2005 15:48:42 -0000 5.510
+++ tex.el 6 May 2005 17:01:04 -0000
@@ -2247,7 +2247,8 @@
(make-local-hook 'find-file-hooks))
(add-hook 'find-file-hooks (lambda ()
;; Test if we are looking at a new file.
- (unless (file-exists-p (buffer-file-name))
+ (when (or (not (file-exists-p
(buffer-file-name)))
+ (eq TeX-master 'shared))
(TeX-master-file nil nil t))
(TeX-update-style t)) nil t))
Putting aside the problem with incorrect font locking, this might not
be the optimal solution overall because the question will be asked
without this being actually necessary, but with the current
implementation it is the best I can come up with.
While I dislike the solution used until AUCTeX 11.14 for the reasons
explained earlier, I wanted to have a look at it nevertheless both as
a possible basis for a better implementation and for working with an
alternative approach which would better support the 'shared case. And
while this feels to me like laying a gun in the hand of somebody else,
you can find a patch reverting the implementation to 11.14 attached to
this mail.
Some remarks. As mentioned earlier, the dynamic parts of the menus
are now implemented with menu filters. Contrary to what we discussed
earlier, the filter functions will be called as soon as
`easy-menu-add' is executed which means _very_ early during mode
setup. So after applying the patch, loading a LaTeX file won't work
correctly anymore. While playing with it, I saw the strangest errors,
like ending up in fundamental mode or getting a backtrace about trying
to use a menu from within a menu-entry. You should be able to
reproduce the latter by executing
emacs -Q -eval "(progn (setq debug-on-error t) (require 'tex-site) (setq
TeX-auto-save t) (setq TeX-parse-self t) (setq-default TeX-master nil))"
nonexistent.tex
Also one will be able to see again the GTK file chooser popping up
even when files are loaded by keyboard commands as discussed 1.5 years
ago in <URL:http://thread.gmane.org/gmane.emacs.auc-tex/1137>.
I am not sure if it is an Emacs bug that the menu filters are called
during menu creation. Maybe somebody else can shed some light on
this.
--
Ralf
txto19ys7Zf6b.txt
Description: Text Data
- [AUCTeX-devel] multi-file support, Richard Lewis, 2005/05/05
- Re: [AUCTeX-devel] multi-file support, Ralf Angeli, 2005/05/05
- Re: [AUCTeX-devel] multi-file support, David Kastrup, 2005/05/05
- Re: [AUCTeX-devel] multi-file support, Ralf Angeli, 2005/05/06
- Re: [AUCTeX-devel] multi-file support, David Kastrup, 2005/05/06
- Re: [AUCTeX-devel] multi-file support, Ralf Angeli, 2005/05/06
- Re: [AUCTeX-devel] multi-file support, David Kastrup, 2005/05/06
- Re: [AUCTeX-devel] multi-file support, Ralf Angeli, 2005/05/06
- Re: [AUCTeX-devel] multi-file support, David Kastrup, 2005/05/06
- Re: [AUCTeX-devel] multi-file support,
Ralf Angeli <=
- Re: [AUCTeX-devel] multi-file support, David Kastrup, 2005/05/06
- Re: [AUCTeX-devel] multi-file support, Ralf Angeli, 2005/05/06
- Re: [AUCTeX-devel] multi-file support, David Kastrup, 2005/05/06
- Re: [AUCTeX-devel] multi-file support, Ralf Angeli, 2005/05/07
- [AUCTeX-devel] Re: multi-file support, Richard Lewis, 2005/05/09
- Re: [AUCTeX-devel] Re: multi-file support, Ralf Angeli, 2005/05/09
- [AUCTeX-devel] Re: multi-file support, Richard Lewis, 2005/05/10
- [AUCTeX-devel] Re: multi-file support, Ralf Angeli, 2005/05/10
- [AUCTeX-devel] Re: multi-file support, Richard Lewis, 2005/05/13
- [AUCTeX-devel] Re: multi-file support, Ralf Angeli, 2005/05/14