[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add file-locals and dir-locals
From: |
Leo |
Subject: |
Re: Add file-locals and dir-locals |
Date: |
Wed, 22 Jul 2009 04:49:48 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
On 2009-07-22 01:21 +0100, Juri Linkov wrote:
>>> Below is the final patch that I find useful enough to commit. I invite
>>> you and other developers to improve this further as you wish.
>>
>> Does this patch support adding local variables both in the beginning and
>> end of buffers?
>>
>> I'd love to see this applied in trunk so that it can easily tested.
>> Thanks for the patch.
>
> Right, adding local variables to the first line is necessary too.
> This requires designing a good UI for that.
I forgot to mention in the last post that there is also directory-local
variables, which I think should also be supported. But we can get
support for file local variables first and worry about that later.
> One idea is after executing `M-x add-file-local-variable RET' ask a
> question like:
>
> Add variable to the beginning or end of buffer (yes or no)
>
> which obviously always implies "yes". The problem that the prompt should
> mention both alternatives, but yes-or-no-p accepts only "y" or "n".
> Using `map-y-or-n-p' to accept other keys will complicate the prompt.
> Do you have any better idea?
I'd prefer the default to add to the end of a buffer, because file local
variables at the end of a file is more difficult to get right manually.
With one C-u, add to the header
With two C-u, add to .dir-locals.el
Another approach is to give the user a list to select:
1. head 2. foot 3. dir
--
Leo's Emacs uptime: 41 days, 13 hours, 58 minutes, 31 seconds
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, (continued)
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Lennart Borgman, 2009/07/13
- Add file-locals and dir-locals (was: Blunderbuss ".dir-locals.el" raises everything in its path!!), Juri Linkov, 2009/07/16
- Re: Add file-locals and dir-locals, martin rudalics, 2009/07/17
- Re: Add file-locals and dir-locals, Juri Linkov, 2009/07/17
- Re: Add file-locals and dir-locals, martin rudalics, 2009/07/18
- Re: Add file-locals and dir-locals, Juri Linkov, 2009/07/18
- Re: Add file-locals and dir-locals, martin rudalics, 2009/07/19
- Re: Add file-locals and dir-locals, Juri Linkov, 2009/07/19
- Re: Add file-locals and dir-locals, Leo, 2009/07/20
- Re: Add file-locals and dir-locals, Juri Linkov, 2009/07/21
- Re: Add file-locals and dir-locals,
Leo <=
- Re: Add file-locals and dir-locals, David Kastrup, 2009/07/17
- Re: Add file-locals and dir-locals, Juri Linkov, 2009/07/17
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Chong Yidong, 2009/07/12
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Alan Mackenzie, 2009/07/12
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Lennart Borgman, 2009/07/12
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Alan Mackenzie, 2009/07/12
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Lennart Borgman, 2009/07/12
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Stephen J. Turnbull, 2009/07/12
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Lennart Borgman, 2009/07/12
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, tomas, 2009/07/13