GNU bug report logs - #16846
24.3.50.1; Info 48.2.4.1 Specifying File Variables

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>

Date: Sat, 22 Feb 2014 20:08:01 UTC

Severity: normal

Tags: notabug

Merged with 16836

Found in version 24.3.50.1

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 16846 <at> debbugs.gnu.org
Subject: bug#16846: acknowledged by developer ()
Date: Sun, 23 Feb 2014 09:49:09 +0100
[Message part 1 (text/plain, inline)]
Am 22.02.2014 23:43, schrieb Juanma Barranquero:
> On Sat, Feb 22, 2014 at 9:50 PM, Andreas Röhler
> <andreas.roehler <at> easy-emacs.de> wrote:
>
>> This bug is about Info files
>
> I don't think there is a bug. That info node talks about the format of
> the file variables, but of course says nothing about the format of the
> contents of your file. If your file is text, perhaps just
>
> -*- variable: value -*-
>
> in the first line is perfectly acceptable.


Do you want  file-local variables restrict to text-mode?
Doesn't make sense for me.


 If the file contains C
> source code, or elisp, or another data format to be digested by some
> external processor, it should already be clear that the file variables
> must be acceptable to these external processors. You can't expect to
> have
>
> -*- mode: c -*-
>
> as the first line of a C file and compile it with GCC without getting an error.
>

We must not discuss possible other bugs here. Let's stay with the reported one.

> That said, the same node that you quote already says:
>
>       Here is an example first line that specifies Lisp mode and sets two
>    variables with numeric values:
>
>         ;; -*- mode: Lisp; fill-column: 75; comment-column: 50; -*-
>
> and a little later:
>
>       In shell scripts, the first line is used to identify the script
>    interpreter, so you cannot put any local variables there.  To
>    accommodate this, Emacs looks for local variable specifications in the
>    _second_ line if the first line specifies an interpreter.  The same is
>    true for man pages which start with the magic string `'\"' to specify a
>    list of troff preprocessors (not all do, however).
>
> which clearly suggests that the file variables must also be acceptable
> to the consumer of the file.

It rather says: implementation is not that straightforward as it could/should be.
It's at Emacs, when sending code, to clear its artistics before.

>
>> , the former report was about a wrong compiler warning.
>
> Which was, in fact, not wrong at all.
>

Attach foo1.png - happens when evaluating a buffer with contents:

;;;;;;


-*- lexical-binding: t -*-

(setq foo 1)

;;;;;;

[foo1.png (image/png, attachment)]

This bug report was last modified 11 years and 88 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.