[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: enable-local-variables 'maybe
From: |
Roland Winkler |
Subject: |
Re: enable-local-variables 'maybe |
Date: |
16 Feb 2002 12:27:45 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
I digged a little deeper into the problem I encountered with bibtex
files using file-local variables. It seems to me, it is really a
problem that is not related to timers displaying echo area messages.
Possibly it is specific to bibtex.el.
I have
(setq enable-local-variables 'maybe)
(setq-default bibtex-maintain-sorted-entries t)
Then file-local variables in foo.bib give me the error message
"File local-variables error: (error "Missing colon in local variables entry")
The reason is that the y-or-n-p in hack-local-variables interferes
with the catch and throw 'userkey in bibtex-parse-keys.
What is the best way to avoid this problem?
Roland
roland.winkler@physik.uni-erlangen.de (Roland Winkler) writes:
> On Wed Feb 13 2002 Richard Stallman wrote:
> > Does this fix the bug for bibtex? I can't test it myself.
>
> For avoiding the echo area messages the complete patch is attached
> below. However, I am surprised that this does not completely solve
> the problem:
>
> Something else is still messing the position of point, i.e., I still
> get the error message:
>
> "File local-variables error: (error "Missing colon in local variables entry")
>
> All I could find out is:
>
> When during the call of the function hack-local-variables the point
> is supposed to be at the local variable, it is indeed in the second
> line of the bibtex file foo.bib. Somewhere, a save-excursion is missing.
>
> Roland
>
>
> *** bibtex.el~ Thu Feb 14 21:01:14 2002
> --- bibtex.el Thu Feb 14 21:31:14 2002
> ***************
> *** 2397,2405 ****
> bibtex-maintain-sorted-entries
> (not
> (eq (buffer-modified-tick)
> bibtex-buffer-last-parsed-tick)))
> ! (if (bibtex-parse-keys nil t t)
> ;; successful operation --> remove buffer from list
> (setq buffers (cdr buffers)))
> ;; buffer is no BibTeX buffer or needs no parsing
> (setq buffers (cdr buffers))))))))
> --- 2397,2405 ----
> bibtex-maintain-sorted-entries
> (not
> (eq (buffer-modified-tick)
> bibtex-buffer-last-parsed-tick)))
> ! (if (bibtex-parse-keys nil nil t)
> ;; successful operation --> remove buffer from list
> (setq buffers (cdr buffers)))
> ;; buffer is no BibTeX buffer or needs no parsing
> (setq buffers (cdr buffers))))))))
> ***************
> *** 2697,2705 ****
> (if bibtex-maintain-sorted-entries
> (bibtex-run-with-idle-timer
> 1 nil
> (lambda ()
> ! (bibtex-parse-keys nil t t))))
> ;; to get buffer parsed once if everything else (including things
> ;; installed in bibtex-mode-hook) has done its work
> (if (not bibtex-parse-idle-timer)
> (setq bibtex-parse-idle-timer
> --- 2697,2705 ----
> (if bibtex-maintain-sorted-entries
> (bibtex-run-with-idle-timer
> 1 nil
> (lambda ()
> ! (bibtex-parse-keys nil nil t))))
> ;; to get buffer parsed once if everything else (including things
> ;; installed in bibtex-mode-hook) has done its work
> (if (not bibtex-parse-idle-timer)
> (setq bibtex-parse-idle-timer
>
--
-----------------------------------------------------------------------
Dr. Roland Winkler
Lst. fuer Theoretische Festkoerperphysik Phone ++49-9131-85 28834
Institut fuer Technische Physik III Fax ++49-9131-85 28833
Universitaet Erlangen-Nuernberg
Staudtstr. 7
D-91058 Erlangen e-mail: roland.winkler@physik.uni-erlangen.de
Germany http://www.tfkp.physik.uni-erlangen.de/
-----------------------------------------------------------------------
- Re: enable-local-variables 'maybe, (continued)
- Re: enable-local-variables 'maybe, Roland Winkler, 2002/02/12
- Re: enable-local-variables 'maybe, Richard Stallman, 2002/02/13
- Re: enable-local-variables 'maybe, Roland Winkler, 2002/02/13
- Re: enable-local-variables 'maybe, Richard Stallman, 2002/02/14
- Re: enable-local-variables 'maybe, Eli Zaretskii, 2002/02/14
- Re: enable-local-variables 'maybe, Stefan Monnier, 2002/02/14
- Re: enable-local-variables 'maybe, Richard Stallman, 2002/02/16
Re: enable-local-variables 'maybe, Roland Winkler, 2002/02/13