* [PATCH] Add dir-locals style variables for C++ and Elisp code.
@ 2011-06-07 5:20 Austin Clements
2011-06-07 5:27 ` Dmitry Kurochkin
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Austin Clements @ 2011-06-07 5:20 UTC (permalink / raw)
To: notmuch; +Cc: Austin Clements
Also, slightly reformat dir-locals.el so that the settings align and
to make it friendlier for future additions.
---
.dir-locals.el | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/.dir-locals.el b/.dir-locals.el
index cbdb1f9..eff29fc 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,7 +1,17 @@
; emacs local configuration settings for notmuch source
; surmised by dkg on 2010-11-23 13:43:18-0500
+; amended by amdragon on 2011-06-06
-((c-mode . ((indent-tabs-mode . t)
- (tab-width . 8)
- (c-basic-offset . 4)
- (c-file-style . "linux"))))
+((c-mode
+ (indent-tabs-mode . t)
+ (tab-width . 8)
+ (c-basic-offset . 4)
+ (c-file-style . "linux"))
+ (c++-mode
+ (indent-tabs-mode . t)
+ (tab-width . 8)
+ (c-basic-offset . 4)
+ (c-file-style . "linux"))
+ (emacs-lisp-mode
+ (indent-tabs-mode . t))
+ )
--
1.7.5.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Add dir-locals style variables for C++ and Elisp code.
2011-06-07 5:20 [PATCH] Add dir-locals style variables for C++ and Elisp code Austin Clements
@ 2011-06-07 5:27 ` Dmitry Kurochkin
2011-06-07 6:57 ` Austin Clements
2011-06-07 6:38 ` Dima Kogan
2011-06-10 1:28 ` [PATCH] Add dir-locals style variables for C++, Elisp, and shell code Austin Clements
2 siblings, 1 reply; 7+ messages in thread
From: Dmitry Kurochkin @ 2011-06-07 5:27 UTC (permalink / raw)
To: Austin Clements, notmuch
Hi Austin.
On Tue, 7 Jun 2011 01:20:25 -0400, Austin Clements <amdragon@MIT.EDU> wrote:
> Also, slightly reformat dir-locals.el so that the settings align and
> to make it friendlier for future additions.
> ---
> .dir-locals.el | 18 ++++++++++++++----
> 1 files changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/.dir-locals.el b/.dir-locals.el
> index cbdb1f9..eff29fc 100644
> --- a/.dir-locals.el
> +++ b/.dir-locals.el
> @@ -1,7 +1,17 @@
> ; emacs local configuration settings for notmuch source
> ; surmised by dkg on 2010-11-23 13:43:18-0500
> +; amended by amdragon on 2011-06-06
>
> -((c-mode . ((indent-tabs-mode . t)
> - (tab-width . 8)
> - (c-basic-offset . 4)
> - (c-file-style . "linux"))))
> +((c-mode
> + (indent-tabs-mode . t)
> + (tab-width . 8)
> + (c-basic-offset . 4)
> + (c-file-style . "linux"))
> + (c++-mode
> + (indent-tabs-mode . t)
> + (tab-width . 8)
> + (c-basic-offset . 4)
> + (c-file-style . "linux"))
> + (emacs-lisp-mode
> + (indent-tabs-mode . t))
> + )
Why tab-width is not set for the emacs-lisp-mode?
Also, perhaps we should set these variables for all modes? Setting
c-basic-offset and c-file-style should not hurt. And indent-tabs-mode
and tab-width should be relevant for any file in notmuch (shell, python,
probably even text files), no?
Regards,
Dmitry
> --
> 1.7.5.1
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add dir-locals style variables for C++ and Elisp code.
2011-06-07 5:27 ` Dmitry Kurochkin
@ 2011-06-07 6:57 ` Austin Clements
0 siblings, 0 replies; 7+ messages in thread
From: Austin Clements @ 2011-06-07 6:57 UTC (permalink / raw)
To: Dmitry Kurochkin; +Cc: notmuch
Quoth Dmitry Kurochkin on Jun 07 at 9:27 am:
> Hi Austin.
>
> On Tue, 7 Jun 2011 01:20:25 -0400, Austin Clements <amdragon@MIT.EDU> wrote:
> > Also, slightly reformat dir-locals.el so that the settings align and
> > to make it friendlier for future additions.
> > ---
> > .dir-locals.el | 18 ++++++++++++++----
> > 1 files changed, 14 insertions(+), 4 deletions(-)
> >
> > diff --git a/.dir-locals.el b/.dir-locals.el
> > index cbdb1f9..eff29fc 100644
> > --- a/.dir-locals.el
> > +++ b/.dir-locals.el
> > @@ -1,7 +1,17 @@
> > ; emacs local configuration settings for notmuch source
> > ; surmised by dkg on 2010-11-23 13:43:18-0500
> > +; amended by amdragon on 2011-06-06
> >
> > -((c-mode . ((indent-tabs-mode . t)
> > - (tab-width . 8)
> > - (c-basic-offset . 4)
> > - (c-file-style . "linux"))))
> > +((c-mode
> > + (indent-tabs-mode . t)
> > + (tab-width . 8)
> > + (c-basic-offset . 4)
> > + (c-file-style . "linux"))
> > + (c++-mode
> > + (indent-tabs-mode . t)
> > + (tab-width . 8)
> > + (c-basic-offset . 4)
> > + (c-file-style . "linux"))
> > + (emacs-lisp-mode
> > + (indent-tabs-mode . t))
> > + )
>
> Why tab-width is not set for the emacs-lisp-mode?
Because I forgot to set it. ]:--8)
> Also, perhaps we should set these variables for all modes? Setting
> c-basic-offset and c-file-style should not hurt. And indent-tabs-mode
> and tab-width should be relevant for any file in notmuch (shell, python,
> probably even text files), no?
Personally, I would prefer to keep .dir-locals conservative, rather
than make sweeping settings. For example, the Python code isn't (and
definitely shouldn't be) using tabs. Adding settings for shell is a
good idea, though.
> Regards,
> Dmitry
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add dir-locals style variables for C++ and Elisp code.
2011-06-07 5:20 [PATCH] Add dir-locals style variables for C++ and Elisp code Austin Clements
2011-06-07 5:27 ` Dmitry Kurochkin
@ 2011-06-07 6:38 ` Dima Kogan
2011-06-07 7:00 ` Austin Clements
2011-06-10 1:28 ` [PATCH] Add dir-locals style variables for C++, Elisp, and shell code Austin Clements
2 siblings, 1 reply; 7+ messages in thread
From: Dima Kogan @ 2011-06-07 6:38 UTC (permalink / raw)
To: notmuch
> On Tue, 7 Jun 2011 01:20:25 -0400
> Austin Clements <amdragon@MIT.EDU> wrote:
>
> Also, slightly reformat dir-locals.el so that the settings align and
> to make it friendlier for future additions.
Should we also add:
(tab-always-indent . nil)
(indent-tabs-mode . t)
Otherwise the setups of people who normally use spaces will still
insert spaces when 'tab' is depressed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add dir-locals style variables for C++ and Elisp code.
2011-06-07 6:38 ` Dima Kogan
@ 2011-06-07 7:00 ` Austin Clements
0 siblings, 0 replies; 7+ messages in thread
From: Austin Clements @ 2011-06-07 7:00 UTC (permalink / raw)
To: Dima Kogan; +Cc: notmuch
On Tue, Jun 7, 2011 at 2:38 AM, Dima Kogan <notmuch@dima.secretsauce.net> wrote:
>> On Tue, 7 Jun 2011 01:20:25 -0400
>> Austin Clements <amdragon@MIT.EDU> wrote:
>>
>> Also, slightly reformat dir-locals.el so that the settings align and
>> to make it friendlier for future additions.
>
> Should we also add:
>
> (tab-always-indent . nil)
tab-always-indent is a user-interface preference and definitely
shouldn't be overridden by .dir-locals. (Personally, I would go crazy
if I had tab-always-indent set to nil.)
> (indent-tabs-mode . t)
I'll add this for shell-mode. As I pointed out in my reply to Dmitry,
this shouldn't be set globally. Are there any other specific modes it
should be set for?
> Otherwise the setups of people who normally use spaces will still
> insert spaces when 'tab' is depressed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] Add dir-locals style variables for C++, Elisp, and shell code.
2011-06-07 5:20 [PATCH] Add dir-locals style variables for C++ and Elisp code Austin Clements
2011-06-07 5:27 ` Dmitry Kurochkin
2011-06-07 6:38 ` Dima Kogan
@ 2011-06-10 1:28 ` Austin Clements
2011-06-24 0:03 ` Carl Worth
2 siblings, 1 reply; 7+ messages in thread
From: Austin Clements @ 2011-06-10 1:28 UTC (permalink / raw)
To: notmuch; +Cc: Austin Clements
Also, slightly reformat dir-locals.el so that the settings align and
to make it friendlier for future additions.
---
.dir-locals.el | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/.dir-locals.el b/.dir-locals.el
index cbdb1f9..aea630b 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,7 +1,23 @@
; emacs local configuration settings for notmuch source
; surmised by dkg on 2010-11-23 13:43:18-0500
+; amended by amdragon on 2011-06-06
-((c-mode . ((indent-tabs-mode . t)
- (tab-width . 8)
- (c-basic-offset . 4)
- (c-file-style . "linux"))))
+((c-mode
+ (indent-tabs-mode . t)
+ (tab-width . 8)
+ (c-basic-offset . 4)
+ (c-file-style . "linux"))
+ (c++-mode
+ (indent-tabs-mode . t)
+ (tab-width . 8)
+ (c-basic-offset . 4)
+ (c-file-style . "linux"))
+ (emacs-lisp-mode
+ (indent-tabs-mode . t)
+ (tab-width . 8))
+ (shell-mode
+ (indent-tabs-mode . t)
+ (tab-width . 8)
+ (sh-basic-offset . 4)
+ (sh-indentation . 4))
+ )
--
1.7.5.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Add dir-locals style variables for C++, Elisp, and shell code.
2011-06-10 1:28 ` [PATCH] Add dir-locals style variables for C++, Elisp, and shell code Austin Clements
@ 2011-06-24 0:03 ` Carl Worth
0 siblings, 0 replies; 7+ messages in thread
From: Carl Worth @ 2011-06-24 0:03 UTC (permalink / raw)
To: Austin Clements, notmuch; +Cc: Austin Clements
[-- Attachment #1: Type: text/plain, Size: 257 bytes --]
On Thu, 9 Jun 2011 21:28:51 -0400, Austin Clements <amdragon@MIT.EDU> wrote:
> Also, slightly reformat dir-locals.el so that the settings align and
> to make it friendlier for future additions.
Thanks. Pushed.
-Carl
--
carl.d.worth@intel.com
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-06-24 0:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-07 5:20 [PATCH] Add dir-locals style variables for C++ and Elisp code Austin Clements
2011-06-07 5:27 ` Dmitry Kurochkin
2011-06-07 6:57 ` Austin Clements
2011-06-07 6:38 ` Dima Kogan
2011-06-07 7:00 ` Austin Clements
2011-06-10 1:28 ` [PATCH] Add dir-locals style variables for C++, Elisp, and shell code Austin Clements
2011-06-24 0:03 ` Carl Worth
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.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).