all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Setting file-local list variables
@ 2008-05-20 19:30 Mark Elston
  2008-05-21 13:36 ` Joel J. Adamson
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Elston @ 2008-05-20 19:30 UTC (permalink / raw)
  To: help-gnu-emacs

(I sent this to the AucTeX mailing list as well but since this is
possibly more an Emacs issue I thought I would send it here as well.)

I have been trying to set a file local variable for a LaTeX file
I have been working on and it just doesn't seem to stick.  In
particular I am trying to set LaTeX-verbatim-environments.  I am
using the fancyvrb package and have developed some specific verbatim
environments and want AucTeX to deal with them appropriately.  These
environments are specific to the file I am working on and, so, I don't
want to customize AucTeX to *always* recognize them since they won't
appear in any other files.

However, when I put the following in my .tex file:

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% LaTeX-verbatim-environments: ("verbatim" "verbatim*" "CodeListing" 
"OldCodeListing" "NewCodeListing")
%%% End:

I get a warning when loading the file that setting the variable may
not be safe.  I hit 'y' to apply the local variables list and the file
is loaded.  However, even though I can look at the variable and see that
it is set appropriately, AucTeX doesn't handle these environments as
verbatim environments.

If I customize the variable then it works fine.

How do I set this variable so that it applies to the file?

Mark


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Setting file-local list variables
@ 2008-05-21 17:21 Mark Elston
  2008-05-22 13:01 ` Joel J. Adamson
       [not found] ` <mailman.12007.1211462109.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Mark Elston @ 2008-05-21 17:21 UTC (permalink / raw)
  To: help-gnu-emacs



* Joel J. Adamson wrote (on 5/21/2008 6:36 AM):
> 
> ...
> 
> Have you tried quoting?  I still get the same thing, when I try the
> following document:
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> \documentclass{article}
> \begin{document}
> 
> \begin{verbatim}
> Kiss this!
> \sin(x)
> 
> \end{verbatim}
> \begin{equation}
>   \label{eq:1}
>   \sin(x)
> \end{equation}
> 
> \end{document}
> 
> %%% Local Variables:
> %%% mode: latex
> %%% TeX-master: t
> %%% LaTeX-verbatim-environments: '("verbatim" "verbatim*" "CodeListing" "OldCodeListing" "NewCodeListing")
> %%% End:
> 

Yeah, it didn't work for me either.

> @someone-who-knows: Does this just come up when a new variable is
> introduced in a local variables list?
> 
> @OP: If so, what's wrong with marking the variables as safe and applying
> them in the future (!)?

I tried that, too.  It didn't work either.

I wonder if this is an AucTeX thing.  The AucTeX manual says that this variable controls
the verbatim-like environments.  However, in the help for the variable it says:



        LaTeX-verbatim-environments is a variable defined in `latex.el'.
        Its value is 
        '("verbatim" "verbatim*" "CodeListing" "OldCodeListing" "NewCodeListing")

        Local in buffer AddingStateMachineToClass.tex; global value is 
        ("verbatim" "verbatim*")

        Documentation:
        Verbatim environments.

        Programs should not use this variable directly but the function
        `LaTeX-verbatim-environments' which returns a value including
        buffer-local keyword additions via
        `LaTeX-verbatim-environments-local' as well.


I don't know if this means that setting the variables is the wrong way to go.

BTW, I have also tried setting 'LaTeX-verbatim-environments-local' both as a list
and a quoted list as well.  That, too, doesn't work.

Mark


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-05-22 16:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-20 19:30 Setting file-local list variables Mark Elston
2008-05-21 13:36 ` Joel J. Adamson
  -- strict thread matches above, loose matches on Subject: below --
2008-05-21 17:21 Mark Elston
2008-05-22 13:01 ` Joel J. Adamson
     [not found] ` <mailman.12007.1211462109.18990.help-gnu-emacs@gnu.org>
2008-05-22 16:21   ` Mark Elston

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.