* Local variables not being defined
@ 2007-01-25 15:29 ken
0 siblings, 0 replies; 12+ messages in thread
From: ken @ 2007-01-25 15:29 UTC (permalink / raw)
To: help-gnu-emacs
I've got the following at the end of the current buffer (an html file,
if that matters):
<!--
Local variables:
html-helper-timestamp-end: "hhmts end -->"
html-helper-timestamp-start: "<!-- hhmts start"
End:
-->
I load the file (once by reloading emacs, other times by C-x C-v). Then
I do "C-h v html-helper-timestamp-start" and it gives me:
-----------------------------------------------------
html-helper-timestamp-start's value is
"<!-- hhmts start -->"
Documentation:
*Start delimiter for timestamps.
Everything between `html-helper-timestamp-start' and
....
-----------------------------------------------------
What's the bogusity?
tnx,
ken
--
"Peace hath her victories no less renown'd than war."
--John Milton
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Local variables not being defined
[not found] <mailman.3574.1169739033.2155.help-gnu-emacs@gnu.org>
@ 2007-01-25 16:20 ` Harald Hanche-Olsen
2007-01-25 19:44 ` ken
[not found] ` <mailman.3592.1169754294.2155.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 12+ messages in thread
From: Harald Hanche-Olsen @ 2007-01-25 16:20 UTC (permalink / raw)
To: help-gnu-emacs
+ ken <gebser@speakeasy.net>:
| I've got the following at the end of the current buffer (an html file,
| if that matters):
It does matter, because your HTML won't be valid.
| <!--
| Local variables:
| html-helper-timestamp-end: "hhmts end -->"
| html-helper-timestamp-start: "<!-- hhmts start"
| End:
| -->
>From the HTML point of view, this contains two comments with this text
between them:
"
html-helper-timestamp-start: "
You might wish to just omit the > and < characters from the two
strings to avoid confusing the HTML parser.
Apart from that, though, your example works for me. Must be some
other reason why it doesn't work for you.
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
when there is no ground whatsoever for supposing it is true.
-- Bertrand Russell
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Local variables not being defined
2007-01-25 16:20 ` Harald Hanche-Olsen
@ 2007-01-25 19:44 ` ken
[not found] ` <mailman.3592.1169754294.2155.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 12+ messages in thread
From: ken @ 2007-01-25 19:44 UTC (permalink / raw)
To: help-gnu-emacs
On 01/25/2007 11:20 AM somebody named Harald Hanche-Olsen wrote:
> + ken <gebser@speakeasy.net>:
>
> | I've got the following at the end of the current buffer (an html file,
> | if that matters):
>
> It does matter, because your HTML won't be valid.
>
> | <!--
> | Local variables:
> | html-helper-timestamp-end: "hhmts end -->"
> | html-helper-timestamp-start: "<!-- hhmts start"
> | End:
> | -->
>
>>From the HTML point of view, this contains two comments with this text
> between them:
>
> "
> html-helper-timestamp-start: "
>
> You might wish to just omit the > and < characters from the two
> strings to avoid confusing the HTML parser.
>
> Apart from that, though, your example works for me. Must be some
> other reason why it doesn't work for you.
>
Tnx, Harald,
After taking out the html commenting syntax, it's still not working for
me. I found that I'm getting this error message (the "Fontifying..."
message in the minibuffer must have been hiding it before):
File local-variables error: (error "Local variables entry is missing the
prefix")
So what does this error message mean and/or what should I do about it?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Local variables not being defined
[not found] ` <mailman.3592.1169754294.2155.help-gnu-emacs@gnu.org>
@ 2007-01-25 20:25 ` Harald Hanche-Olsen
2007-01-25 21:45 ` ken
[not found] ` <mailman.3599.1169761553.2155.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 12+ messages in thread
From: Harald Hanche-Olsen @ 2007-01-25 20:25 UTC (permalink / raw)
To: help-gnu-emacs
+ ken <gebser@speakeasy.net>:
| File local-variables error: (error "Local variables entry is missing the
| prefix")
|
| So what does this error message mean and/or what should I do about it?
See the info file about file variables: Every line of the Variables
section must have the exact same prefix, which may be empty. This
appears to be the case with your example. Or did some lines have
initial spaces or tabs that your news posting software suppressed?
If so, get rid of them.
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
when there is no ground whatsoever for supposing it is true.
-- Bertrand Russell
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Local variables not being defined
2007-01-25 20:25 ` Harald Hanche-Olsen
@ 2007-01-25 21:45 ` ken
2007-01-25 22:08 ` ken
[not found] ` <mailman.3603.1169762957.2155.help-gnu-emacs@gnu.org>
[not found] ` <mailman.3599.1169761553.2155.help-gnu-emacs@gnu.org>
1 sibling, 2 replies; 12+ messages in thread
From: ken @ 2007-01-25 21:45 UTC (permalink / raw)
To: Harald Hanche-Olsen; +Cc: help-gnu-emacs
On 01/25/2007 03:25 PM somebody named Harald Hanche-Olsen wrote:
> + ken <gebser@speakeasy.net>:
>
> | File local-variables error: (error "Local variables entry is missing the
> | prefix")
> |
> | So what does this error message mean and/or what should I do about it?
>
> See the info file about file variables: Every line of the Variables
> section must have the exact same prefix, which may be empty. This
> appears to be the case with your example. Or did some lines have
> initial spaces or tabs that your news posting software suppressed?
> If so, get rid of them.
>
That can't be the problem as the "prefix" is and has always been the
same for all lines-- nothing at all. I.e., all lines start to the far
left... in the very first column.
Again:
<!--
Local variables:
html-helper-timestamp-end: "hhmts end"
html-helper-timestamp-start: "hhmts start"
End:
-->
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Local variables not being defined
2007-01-25 21:45 ` ken
@ 2007-01-25 22:08 ` ken
[not found] ` <mailman.3603.1169762957.2155.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 12+ messages in thread
From: ken @ 2007-01-25 22:08 UTC (permalink / raw)
To: help-gnu-emacs
On 01/25/2007 04:45 PM somebody named ken wrote:
> On 01/25/2007 03:25 PM somebody named Harald Hanche-Olsen wrote:
>> + ken <gebser@speakeasy.net>:
>>
>> | File local-variables error: (error "Local variables entry is missing the
>> | prefix")
>> |
>> | So what does this error message mean and/or what should I do about it?
>>
>> See the info file about file variables: Every line of the Variables
>> section must have the exact same prefix, which may be empty. This
>> appears to be the case with your example. Or did some lines have
>> initial spaces or tabs that your news posting software suppressed?
>> If so, get rid of them.
>>
>
> That can't be the problem as the "prefix" is and has always been the
> same for all lines-- nothing at all. I.e., all lines start to the far
> left... in the very first column.
>
> Again:
>
> <!--
> Local variables:
> html-helper-timestamp-end: "hhmts end"
> html-helper-timestamp-start: "hhmts start"
> End:
> -->
Even goofier...
Trying something else, I deleted all those six lines and made this the
first line in the file (note that it might wrap in your mail client):
<!-- -*- mode: html-helper-mode; html-helper-timestamp-end: "hhmts end";
html-helper-timestamp-start: "hhmts start"; -*- -->
as per "info emacs". Did C-x C-v to reload the file, did C-h v and got
the same error message (about a "missing prefix").
emacs-version: GNU Emacs 21.3.1 (i586-suse-linux, X toolkit, Xaw3d
scroll bars) of 2005-03-22 on lorien
(YYY,YSU)
tnx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Local variables not being defined
[not found] ` <mailman.3599.1169761553.2155.help-gnu-emacs@gnu.org>
@ 2007-01-25 22:22 ` Harald Hanche-Olsen
2007-01-26 11:18 ` ken
0 siblings, 1 reply; 12+ messages in thread
From: Harald Hanche-Olsen @ 2007-01-25 22:22 UTC (permalink / raw)
To: help-gnu-emacs
+ ken <gebser@speakeasy.net>:
| On 01/25/2007 03:25 PM somebody named Harald Hanche-Olsen wrote:
|> + ken <gebser@speakeasy.net>:
|>
|> | File local-variables error: (error "Local variables entry is missing the
|> | prefix")
|> |
|> | So what does this error message mean and/or what should I do about it?
|>
|> See the info file about file variables: Every line of the Variables
|> section must have the exact same prefix, which may be empty. This
|> appears to be the case with your example. Or did some lines have
|> initial spaces or tabs that your news posting software suppressed?
|> If so, get rid of them.
|>
|
| That can't be the problem
You asked what the error message means, and that is what it means.
| as the "prefix" is and has always been the same for all lines--
| nothing at all. I.e., all lines start to the far left... in the
| very first column.
Then what happens shouldn't happen, and I am left powerless to suggest
other explanations.
| Again:
Yup, I saw that the first time. (I suggested leading white space
because I have often seen news posting software suppressing white
space, and then I wouldn't see it obviously. I'll take your word for
it not being there.) And it works for me: I copied your local
variables section verbatim to an HTML file, saved, closed the buffer
and reloaded, and the variables get the prescribed values, no problem.
I am looking at the code now (the function in question is called
hack-local-variables, and it is found in files.el), and there should
be no way you are going to see that message unless there is something
in front of the string "Local Variables:" on the line.
Oh, wait, one more wild guess. hack-local-variables goes 3000
characters back from the end of the file and searches forward for
"Local Variables:". Don't tell me your HTML file contains another
instance of that phrase?
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
when there is no ground whatsoever for supposing it is true.
-- Bertrand Russell
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Local variables not being defined
[not found] ` <mailman.3603.1169762957.2155.help-gnu-emacs@gnu.org>
@ 2007-01-25 22:25 ` Harald Hanche-Olsen
0 siblings, 0 replies; 12+ messages in thread
From: Harald Hanche-Olsen @ 2007-01-25 22:25 UTC (permalink / raw)
To: help-gnu-emacs
+ ken <gebser@speakeasy.net>:
| Even goofier...
|
| Trying something else, I deleted all those six lines [...]
| and got the same error message (about a "missing prefix").
Strengthens my wild guess. See the end of my previous post.
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
when there is no ground whatsoever for supposing it is true.
-- Bertrand Russell
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Local variables not being defined
2007-01-25 22:22 ` Harald Hanche-Olsen
@ 2007-01-26 11:18 ` ken
2007-01-31 5:34 ` Kevin Rodgers
0 siblings, 1 reply; 12+ messages in thread
From: ken @ 2007-01-26 11:18 UTC (permalink / raw)
To: help-gnu-emacs
On 01/25/2007 05:22 PM somebody named Harald Hanche-Olsen wrote:
> + ken <gebser@speakeasy.net>:
>
> ....
>
> I am looking at the code now (the function in question is called
> hack-local-variables, and it is found in files.el), and there should
> be no way you are going to see that message unless there is something
> in front of the string "Local Variables:" on the line.
>
> Oh, wait, one more wild guess. hack-local-variables goes 3000
> characters back from the end of the file and searches forward for
> "Local Variables:". Don't tell me your HTML file contains another
> instance of that phrase?
Thanks, Harald. You have very good eyes to see across continent and
ocean. I titled my test document so:
<h1 align=center>Testing the Use of Local Variables in....
Replacing a SPACE with " " made the errors cease. (I was frankly
surprised that the (uppercase) 'V' and absence of the colon after
"Variables" didn't distinguish this text enough from the intended
instance. Perhaps a later version has/will.)
So, another dark obscure code corner illuminated, good karma created.
Thanks another time.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Local variables not being defined
2007-01-26 11:18 ` ken
@ 2007-01-31 5:34 ` Kevin Rodgers
0 siblings, 0 replies; 12+ messages in thread
From: Kevin Rodgers @ 2007-01-31 5:34 UTC (permalink / raw)
To: help-gnu-emacs
ken wrote:
>
> On 01/25/2007 05:22 PM somebody named Harald Hanche-Olsen wrote:
>> + ken <gebser@speakeasy.net>:
>>
>> ....
>>
>> I am looking at the code now (the function in question is called
>> hack-local-variables, and it is found in files.el), and there should
>> be no way you are going to see that message unless there is something
>> in front of the string "Local Variables:" on the line.
>>
>> Oh, wait, one more wild guess. hack-local-variables goes 3000
>> characters back from the end of the file and searches forward for
>> "Local Variables:". Don't tell me your HTML file contains another
>> instance of that phrase?
>
> Thanks, Harald. You have very good eyes to see across continent and
> ocean. I titled my test document so:
>
> <h1 align=center>Testing the Use of Local Variables in....
>
> Replacing a SPACE with " " made the errors cease. (I was frankly
> surprised that the (uppercase) 'V' and absence of the colon after
> "Variables" didn't distinguish this text enough from the intended
> instance. Perhaps a later version has/will.)
hack-local-variables only goes back to the last newline or formfeed
character, to a maximum of 3000 characters. So the recommended practice
is to precede the local variables section with a page break (control-L,
usually on a line by itself).
And hack-local-variables does search for the exact "Local Variables:"
string, so should not have found an occurrence with a lower case `v' and
missing colon:
(when (let ((case-fold-search t))
(search-forward "Local Variables:" nil t))
(skip-chars-forward " \t")
...
So perhaps you've got a locally hacked version of hack-local-variables...
> So, another dark obscure code corner illuminated, good karma created.
Let's hope!
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Local variables not being defined
@ 2007-01-31 12:39 martin rudalics
2007-02-01 5:17 ` Kevin Rodgers
0 siblings, 1 reply; 12+ messages in thread
From: martin rudalics @ 2007-01-31 12:39 UTC (permalink / raw)
To: kevin.d.rodgers; +Cc: help-gnu-emacs
> And hack-local-variables does search for the exact "Local Variables:"
> string, so should not have found an occurrence with a lower case `v' and
> missing colon:
I don't know about the missing colon, but
-- User Option: case-fold-search
This buffer-local variable determines whether searches should
ignore case. If the variable is `nil' they do not ignore case;
otherwise they do ignore case.
hence
> (when (let ((case-fold-search t))
> (search-forward "Local Variables:" nil t))
> (skip-chars-forward " \t")
does not look for the exact string.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Local variables not being defined
2007-01-31 12:39 Local variables not being defined martin rudalics
@ 2007-02-01 5:17 ` Kevin Rodgers
0 siblings, 0 replies; 12+ messages in thread
From: Kevin Rodgers @ 2007-02-01 5:17 UTC (permalink / raw)
To: help-gnu-emacs
martin rudalics wrote:
> > And hack-local-variables does search for the exact "Local Variables:"
> > string, so should not have found an occurrence with a lower case `v' and
> > missing colon:
>
> I don't know about the missing colon, but
>
> -- User Option: case-fold-search
> This buffer-local variable determines whether searches should
> ignore case. If the variable is `nil' they do not ignore case;
> otherwise they do ignore case.
>
> hence
>
> > (when (let ((case-fold-search t))
> > (search-forward "Local Variables:" nil t))
> > (skip-chars-forward " \t")
>
> does not look for the exact string.
Oops, I failed to actually read the code and just assumed it bound
case-fold-search to nil -- after all, the Emacs manual always
capitalizes both words.
So why does hack-local-variables bind case-fold-search to t? Is that
not a bug?
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-02-01 5:17 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-31 12:39 Local variables not being defined martin rudalics
2007-02-01 5:17 ` Kevin Rodgers
[not found] <mailman.3574.1169739033.2155.help-gnu-emacs@gnu.org>
2007-01-25 16:20 ` Harald Hanche-Olsen
2007-01-25 19:44 ` ken
[not found] ` <mailman.3592.1169754294.2155.help-gnu-emacs@gnu.org>
2007-01-25 20:25 ` Harald Hanche-Olsen
2007-01-25 21:45 ` ken
2007-01-25 22:08 ` ken
[not found] ` <mailman.3603.1169762957.2155.help-gnu-emacs@gnu.org>
2007-01-25 22:25 ` Harald Hanche-Olsen
[not found] ` <mailman.3599.1169761553.2155.help-gnu-emacs@gnu.org>
2007-01-25 22:22 ` Harald Hanche-Olsen
2007-01-26 11:18 ` ken
2007-01-31 5:34 ` Kevin Rodgers
-- strict thread matches above, loose matches on Subject: below --
2007-01-25 15:29 ken
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.