unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24625: 26.0.50; Local variables list at beginning of a file
@ 2016-10-06  8:22 marcowahlsoft
  2019-11-08  2:55 ` Stefan Kangas
  0 siblings, 1 reply; 7+ messages in thread
From: marcowahlsoft @ 2016-10-06  8:22 UTC (permalink / raw)
  To: 24625

Hi!

This a feature request.

Feature: A local variables list can be put near the beginning of a file
and gets interpreted when the file gets loaded.  (Completely analogue to
the behavior of the local variables list near the bottom of a file.)


Best regards,
-- 
Marco Wahl





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

* bug#24625: 26.0.50; Local variables list at beginning of a file
  2016-10-06  8:22 bug#24625: 26.0.50; Local variables list at beginning of a file marcowahlsoft
@ 2019-11-08  2:55 ` Stefan Kangas
  2019-11-13 10:42   ` Marco Wahl
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Kangas @ 2019-11-08  2:55 UTC (permalink / raw)
  To: marcowahlsoft; +Cc: 24625

marcowahlsoft@gmail.com writes:

> This a feature request.
>
> Feature: A local variables list can be put near the beginning of a file
> and gets interpreted when the file gets loaded.  (Completely analogue to
> the behavior of the local variables list near the bottom of a file.)

Thank you for suggesting this feature.

I think this would unduly slow down opening of files, and the benefit
is not clear since we also have the "-*- ... -*-" line.  I would
therefore suggest to not implement this feature.

Does anyone else have an opinion here?

Best regards,
Stefan Kangas





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

* bug#24625: 26.0.50; Local variables list at beginning of a file
  2019-11-08  2:55 ` Stefan Kangas
@ 2019-11-13 10:42   ` Marco Wahl
  2019-11-14 13:21     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Marco Wahl @ 2019-11-13 10:42 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 24625

Stefan Kangas <stefan@marxist.se> writes:

> marcowahlsoft@gmail.com writes:
>
>> This a feature request.
>>
>> Feature: A local variables list can be put near the beginning of a
>> file
>> and gets interpreted when the file gets loaded.  (Completely
>> analogue to
>> the behavior of the local variables list near the bottom of a file.)
>
> Thank you for suggesting this feature.
>
> I think this would unduly slow down opening of files, and the benefit
> is not clear since we also have the "-*- ... -*-" line.  I would
> therefore suggest to not implement this feature.
>
> Does anyone else have an opinion here?

For people who want to keep the first line short this feature could
help.

Possibly of interest:

My motivation asking for this feature was local variables at the bottom
of outline/Org files.  In my experience for those kind of files, which
typically consist of some trees, it is rather difficult to keep
something (here the local variables) at the bottom.  Too easily a
further tree gets appended at the end of the file or the trees in the
file get sorted.  On the other hand the top of those kind of files stays
relatively static.







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

* bug#24625: 26.0.50; Local variables list at beginning of a file
  2019-11-13 10:42   ` Marco Wahl
@ 2019-11-14 13:21     ` Eli Zaretskii
  2019-11-15  3:23       ` Stefan Kangas
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2019-11-14 13:21 UTC (permalink / raw)
  To: Marco Wahl; +Cc: stefan, 24625

> From: Marco Wahl <marcowahlsoft@gmail.com>
> Date: Wed, 13 Nov 2019 11:42:19 +0100
> Cc: 24625@debbugs.gnu.org
> 
> For people who want to keep the first line short this feature could
> help.
> 
> Possibly of interest:
> 
> My motivation asking for this feature was local variables at the bottom
> of outline/Org files.  In my experience for those kind of files, which
> typically consist of some trees, it is rather difficult to keep
> something (here the local variables) at the bottom.  Too easily a
> further tree gets appended at the end of the file or the trees in the
> file get sorted.  On the other hand the top of those kind of files stays
> relatively static.

If this is for Org, perhaps Org could have its own private feature?

In general, having the variables at the beginning will get in the way
of reading the file's contents by humans: you will first need to skip
the variables' section and wonder what does that do there.





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

* bug#24625: 26.0.50; Local variables list at beginning of a file
  2019-11-14 13:21     ` Eli Zaretskii
@ 2019-11-15  3:23       ` Stefan Kangas
  2019-11-15  9:07         ` Marco Wahl
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Kangas @ 2019-11-15  3:23 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Marco Wahl, 24625

Eli Zaretskii <eliz@gnu.org> writes:

>> For people who want to keep the first line short this feature could
>> help.
>> 
>> Possibly of interest:
>> 
>> My motivation asking for this feature was local variables at the bottom
>> of outline/Org files.  In my experience for those kind of files, which
>> typically consist of some trees, it is rather difficult to keep
>> something (here the local variables) at the bottom.  Too easily a
>> further tree gets appended at the end of the file or the trees in the
>> file get sorted.  On the other hand the top of those kind of files stays
>> relatively static.

I usually set up a header like the following at the end of the
file:

* org-mode configuration    :noexport:
#+STARTUP: content hidestars indent
# Local Variables:
# ispell-local-dictionary: "swedish"
# End:

That avoids accidentally exporting the header or moving it
around.  YMMV.

> If this is for Org, perhaps Org could have its own private feature?

Org already has this for various settings, but not for arbitrary Lisp
variables.  Perhaps someone could suggest to add missing options to
the org mode developer.

> In general, having the variables at the beginning will get in the way
> of reading the file's contents by humans: you will first need to skip
> the variables' section and wonder what does that do there.

Agreed.

Best regards,
Stefan Kangas





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

* bug#24625: 26.0.50; Local variables list at beginning of a file
  2019-11-15  3:23       ` Stefan Kangas
@ 2019-11-15  9:07         ` Marco Wahl
  2019-12-05 11:17           ` Stefan Kangas
  0 siblings, 1 reply; 7+ messages in thread
From: Marco Wahl @ 2019-11-15  9:07 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 24625

Stefan Kangas <stefan@marxist.se> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> For people who want to keep the first line short this feature could
>>> help.
>>> 
>>> Possibly of interest:
>>> 
>>> My motivation asking for this feature was local variables at the bottom
>>> of outline/Org files.  In my experience for those kind of files, which
>>> typically consist of some trees, it is rather difficult to keep
>>> something (here the local variables) at the bottom.  Too easily a
>>> further tree gets appended at the end of the file or the trees in the
>>> file get sorted.  On the other hand the top of those kind of files stays
>>> relatively static.
>
> I usually set up a header like the following at the end of the
> file:
>
> * org-mode configuration    :noexport:
>
> #+STARTUP: content hidestars indent
> # Local Variables:
>
> # ispell-local-dictionary: "swedish"
> # End:
>
> That avoids accidentally exporting the header or moving it
> around.  YMMV.

Thanks for this idea..

>> If this is for Org, perhaps Org could have its own private feature?
>
> Org already has this for various settings, but not for arbitrary Lisp
> variables.  Perhaps someone could suggest to add missing options to
> the org mode developer.

Good idea, I think.  Possibly I'll try to go down that (Org) path if the
issue bothers me again.

>> In general, having the variables at the beginning will get in the way
>> of reading the file's contents by humans: you will first need to skip
>> the variables' section and wonder what does that do there.
>
> Agreed.

Agreed.

Possibly it's time to close bug#24625.


Thanks all!






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

* bug#24625: 26.0.50; Local variables list at beginning of a file
  2019-11-15  9:07         ` Marco Wahl
@ 2019-12-05 11:17           ` Stefan Kangas
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Kangas @ 2019-12-05 11:17 UTC (permalink / raw)
  To: Marco Wahl; +Cc: 24625-done

Marco Wahl <marcowahlsoft@gmail.com> writes:

> Possibly it's time to close bug#24625.

No further comments within 3 weeks, so I'm closing this bug report.

Best regards,
Stefan Kangas





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

end of thread, other threads:[~2019-12-05 11:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-06  8:22 bug#24625: 26.0.50; Local variables list at beginning of a file marcowahlsoft
2019-11-08  2:55 ` Stefan Kangas
2019-11-13 10:42   ` Marco Wahl
2019-11-14 13:21     ` Eli Zaretskii
2019-11-15  3:23       ` Stefan Kangas
2019-11-15  9:07         ` Marco Wahl
2019-12-05 11:17           ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).