* file/local variables (and auctex?)
@ 2007-04-10 10:35 thorne
2007-04-10 17:33 ` Ralf Angeli
0 siblings, 1 reply; 6+ messages in thread
From: thorne @ 2007-04-10 10:35 UTC (permalink / raw)
To: help-gnu-emacs
Hello. I am working on a file and in its current incarnation it has a
file variables (first) line that looks like this:
% -*- fill-column: 60; -*-
and a local variables (last) section that looks like this:
% Local Variables: %
% mode:latex %
% mode:longlines %
% tab-width:5 %
% tex-open-quote:"\"" %
% tex-close-quote:"\"" %
% indent-tabs-mode:nil %
% indent-line-function:insert-tab %
% End: %
The problem: latex mode and longlines do turn on and everything works
except setting fill-column and setting the tex open/close quote
string. C-h v fill-column RET tells me it is set to 68 instead of
60. Stranger, is that the tex open/close quote string tells me (when
i do C-h v) that they _are_ set correctly... yet when i acually type
a quote in the buffer, it inserts the default tex quotes. I am
baffled. Can anyone clue me in on what may be wrong?
[This is GNU Emacs 22.0.92.1 (i686-pc-linux-gnu... )]
Thanks!
--
þ theron tlåx þ
(compose-mail (concat "thorne@" (rot13 "gvzoeny") ".net"))
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: file/local variables (and auctex?)
2007-04-10 10:35 thorne
@ 2007-04-10 17:33 ` Ralf Angeli
2007-04-11 0:40 ` thorne
0 siblings, 1 reply; 6+ messages in thread
From: Ralf Angeli @ 2007-04-10 17:33 UTC (permalink / raw)
To: help-gnu-emacs
* thorne (2007-04-10) writes:
> Hello. I am working on a file and in its current incarnation it has a
> file variables (first) line that looks like this:
>
> % -*- fill-column: 60; -*-
>
> and a local variables (last) section that looks like this:
>
> % Local Variables: %
> % mode:latex %
> % mode:longlines %
> % tab-width:5 %
> % tex-open-quote:"\"" %
> % tex-close-quote:"\"" %
> % indent-tabs-mode:nil %
> % indent-line-function:insert-tab %
> % End: %
There is some spurious whitespace at the end of the last line. This
prevents the whole stanza from being processed since the suffixes do
not match.
> The problem: latex mode and longlines do turn on and everything works
> except setting fill-column and setting the tex open/close quote
> string. C-h v fill-column RET tells me it is set to 68 instead of
> 60.
You specified to call LaTeX mode in the local variables stanza. This
mode will be called after `fill-column' is set and call
`kill-all-local-variables' which kills off the local value of
`fill-column'. Solution: Set all variables in the local variables
stanza _after_ specifying the major mode.
> Stranger, is that the tex open/close quote string tells me (when
> i do C-h v) that they _are_ set correctly... yet when i acually type
> a quote in the buffer, it inserts the default tex quotes. I am
> baffled. Can anyone clue me in on what may be wrong?
The variables in AUCTeX are called `TeX-open-quote' and
`TeX-close-quote', not `tex-open-quote' and `tex-close-quote'.
--
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: file/local variables (and auctex?)
2007-04-10 17:33 ` Ralf Angeli
@ 2007-04-11 0:40 ` thorne
0 siblings, 0 replies; 6+ messages in thread
From: thorne @ 2007-04-11 0:40 UTC (permalink / raw)
To: help-gnu-emacs
Ralf Angeli <dev.null@caeruleus.net> writes:
> There is some spurious whitespace at the end of the last line.
Yeah, wow i actually found that last night and sure enough, it has an
effect. That trailing whitespace would have an effect does not
seem... ideal.
> You specified to call LaTeX mode in the local variables stanza.
Yeah, thanks. I got it more or less fixed.
> The variables in AUCTeX are called `TeX-open-quote' and
> `TeX-close-quote', not `tex-open-quote' and `tex-close-quote'.
Wow. So sure enough, i do have a variable called `tex-open-quotes'
and another one called `TeX-open-quotes'. That does not seem to me to
be... ideal.
Well, it doesn't matter. I think i am officially giving up on doing
what i want to do with either troff or LaTeX. But thank you anyway.
When my next avenue of approach fails to pan out, maybe i will come
back to LaTeX.
--
þ theron tlåx þ
(compose-mail (concat "thorne@" (rot13 "gvzoeny") ".net"))
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: file/local variables (and auctex?)
@ 2007-04-11 5:53 martin rudalics
0 siblings, 0 replies; 6+ messages in thread
From: martin rudalics @ 2007-04-11 5:53 UTC (permalink / raw)
To: dev.null; +Cc: help-gnu-emacs
>> % Local Variables: %
>> % mode:latex %
>> % mode:longlines %
>> % tab-width:5 %
>> % tex-open-quote:"\"" %
>> % tex-close-quote:"\"" %
>> % indent-tabs-mode:nil %
>> % indent-line-function:insert-tab %
>> % End: %
>
> There is some spurious whitespace at the end of the last line. This
> prevents the whole stanza from being processed since the suffixes do
> not match.
That would have caused a "Local variables list is not properly
terminated" error. In the particular case the suffix is " %" and
matches, the trailing space being ignored.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: file/local variables (and auctex?)
[not found] <mailman.1938.1176270970.7795.help-gnu-emacs@gnu.org>
@ 2007-04-11 16:55 ` Ralf Angeli
0 siblings, 0 replies; 6+ messages in thread
From: Ralf Angeli @ 2007-04-11 16:55 UTC (permalink / raw)
To: help-gnu-emacs
* martin rudalics (2007-04-11) writes:
> >> % Local Variables: %
> >> % mode:latex %
> >> % mode:longlines %
> >> % tab-width:5 %
> >> % tex-open-quote:"\"" %
> >> % tex-close-quote:"\"" %
> >> % indent-tabs-mode:nil %
> >> % indent-line-function:insert-tab %
> >> % End: %
> >
> > There is some spurious whitespace at the end of the last line. This
> > prevents the whole stanza from being processed since the suffixes do
> > not match.
>
> That would have caused a "Local variables list is not properly
> terminated" error. In the particular case the suffix is " %" and
> matches, the trailing space being ignored.
I actually got this very error when copying the lines above to a file
and opening it.
--
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: file/local variables (and auctex?)
@ 2007-04-12 8:34 martin rudalics
0 siblings, 0 replies; 6+ messages in thread
From: martin rudalics @ 2007-04-12 8:34 UTC (permalink / raw)
To: dev.null; +Cc: help-gnu-emacs
> I actually got this very error when copying the lines above to a file
> and opening it.
Indeed - I was confused because the OP didn't mention it the first time.
It's due to the "$" in
(let ((suffix
(concat
(regexp-quote (buffer-substring (point)
(line-end-position)))
"$"))
and I stand corrected. Maybe we should write
(let ((suffix
(concat
(regexp-quote (buffer-substring (point)
(line-end-position)))
"[ \t]*$"))
instead.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-04-12 8:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.1938.1176270970.7795.help-gnu-emacs@gnu.org>
2007-04-11 16:55 ` file/local variables (and auctex?) Ralf Angeli
2007-04-12 8:34 martin rudalics
-- strict thread matches above, loose matches on Subject: below --
2007-04-11 5:53 martin rudalics
2007-04-10 10:35 thorne
2007-04-10 17:33 ` Ralf Angeli
2007-04-11 0:40 ` thorne
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.