Re: Emacs local variables

2011-04-30 Thread Jim Meyering
Reuben Thomas wrote: > On 30 April 2011 07:03, Jim Meyering wrote: >> >> Actually, there is not requirement for space-based indentation in >> ChangeLog.  I prefer consistent TAB-based indentation and have >> periodically performed the s/^ {8}/\t/ global substitution on ChangeLog. >> I've just done

Re: Emacs local variables

2011-04-30 Thread Reuben Thomas
On 30 April 2011 07:03, Jim Meyering wrote: > > Actually, there is not requirement for space-based indentation in > ChangeLog.  I prefer consistent TAB-based indentation and have > periodically performed the s/^ {8}/\t/ global substitution on ChangeLog. > I've just done that again. Thanks. It wou

Re: Emacs local variables

2011-04-29 Thread Jim Meyering
Reuben Thomas wrote: > On 29 April 2011 21:48, Bruno Haible wrote: >> >> But first, did you try / are you using the code from gnulib/README? >> >>      ;; In gnulib, indent with spaces everywhere (not TABs). >>      ;; Exceptions: Makefile and ChangeLog modes. >>      (add-hook 'find-file-hook '(

Re: Emacs local variables

2011-04-29 Thread Reuben Thomas
On 29 April 2011 21:58, Reuben Thomas wrote: > > And now I cannot get whitespace-mode to work with ChangeLogs, because > while the body of ChangeLog entries require leading tabs, the second > and subsequent lines of author headers require leading spaces. So I > guess I have to turn off whitespace-

Re: Emacs local variables

2011-04-29 Thread Reuben Thomas
On 29 April 2011 22:02, Eric Blake wrote: > On 04/29/2011 02:58 PM, Reuben Thomas wrote: >> And now I cannot get whitespace-mode to work with ChangeLogs, because >> while the body of ChangeLog entries require leading tabs, the second >> and subsequent lines of author headers require leading spaces

Re: Emacs local variables

2011-04-29 Thread Eric Blake
On 04/29/2011 02:58 PM, Reuben Thomas wrote: > And now I cannot get whitespace-mode to work with ChangeLogs, because > while the body of ChangeLog entries require leading tabs, the second > and subsequent lines of author headers require leading spaces. Huh? Where is that requirement written? I'v

Re: Emacs local variables

2011-04-29 Thread Reuben Thomas
On 29 April 2011 21:48, Bruno Haible wrote: > > But first, did you try / are you using the code from gnulib/README? > >      ;; In gnulib, indent with spaces everywhere (not TABs). >      ;; Exceptions: Makefile and ChangeLog modes. >      (add-hook 'find-file-hook '(lambda () >        (if (and bu

Re: Emacs local variables

2011-04-29 Thread Bruno Haible
Hi Reuben, > Basically, the bug (at least in 23.3) is that when a file's mode is > set by its local variables, as in the case for example of > announce-gen, then any directory-local variables are ignored. > > To work around this, would it be alright to add a setting for > indent-tabs-mode to such

Emacs local variables

2011-04-29 Thread Reuben Thomas
I've just been puzzling out a bug in Emacs which stops me correcting my setting of indent-tabs-mode to t for GNU files (I have it customized to nil). Basically, the bug (at least in 23.3) is that when a file's mode is set by its local variables, as in the case for example of announce-gen, then any

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Ralf Wildenhues
Hello, * Karl Berry wrote on Wed, Feb 23, 2011 at 01:25:11AM CET: > The minor advantage of having time stamps in the text > > Minor? How else can we have an accurate version number? Doing it by > hand, or doing anything related to particular vc systems, proved > completely untenable for the

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Karl Berry
it's just that this feature of timestamp or checksum text in source files is more trouble than it's really worth. Hmm, I'm surprised to find that I don't agree with you. I find it extremely helpful to have a human-comprehensible version number embedded in the file. I am continually deali

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Paul Eggert
On 02/22/2011 04:25 PM, Karl Berry wrote: The minor advantage of having time stamps in the text Minor? How else can we have an accurate version number? sha256sum comes to mind. :-) It's not a big deal; it's just that this feature of timestamp or checksum text in source files is more tro

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Glenn Morris
Glenn Morris wrote (on Tue, 22 Feb 2011 at 19:29 -0500): > With regards to dir-locals, I think you can do it using a file containing: > > ((nil . ((eval . (add-hook 'before-save-hook 'time-stamp) And you could of course put the other settings in there, which ought to make things much tidi

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Eric Blake
On 02/22/2011 05:29 PM, Glenn Morris wrote: >> Do you have a suggestion for an alternate way to ensure that the >> timestamps are consistently updated when edited in their primary >> upstream repo, without the use of the eval? For example, would creating >> a .dir-locals.el in the same repository

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Glenn Morris
Eric Blake wrote (on Tue, 22 Feb 2011 at 16:38 -0700): > > Firstly, a minor point. write-file-hooks is obsolete since Emacs 22.1, > > replaced by write-file-functions. (Actually, the Emacs documentation > > suggests using before-save-hook for time-stamping.) > > And what's the portable fallback,

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Karl Berry
The minor advantage of having time stamps in the text Minor? How else can we have an accurate version number? Doing it by hand, or doing anything related to particular vc systems, proved completely untenable for these widespread files. That's the whole reason we introduced the timestamps in

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Paul Eggert
On 02/22/2011 03:24 PM, Glenn Morris wrote: Because `eval' is potentially risky Yes, and I'd rather that we removed that stuff entirely. The minor advantage of having time stamps in the text of the files is outweighed by the major disadvantage of the files' all being attack vectors. Even if th

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Eric Blake
On 02/22/2011 04:24 PM, Glenn Morris wrote: > contain stuff like this: > > # Local Variables: > # mode: shell-script > # sh-indentation: 2 > # eval: (add-hook 'write-file-hooks 'time-stamp) > # time-stamp-start: "scriptversion=" > # time-stamp-format: "%:y-%02m-%02d.%02H" >

Emacs local variables sections in files; time-stamping

2011-02-22 Thread Glenn Morris
Hi, I'm not sure if I should be reporting this to gnulib or to the various upstreams from which the relevant files derive; but it seems to be a common feature... We have various files in Emacs that are synced from gnulib now. Several of them: compile, config.guess, config.sub, depcomp, doc/mi