unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] Set fill column to 70 in .dir-locals.el.
@ 2012-01-12 23:17 Austin Clements
  2012-01-13  7:10 ` Tomi Ollila
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Austin Clements @ 2012-01-12 23:17 UTC (permalink / raw)
  To: notmuch

This controls where comments and other text wraps.  70 is the default
value, so this simply returns it to the default for people who have
overridden it.  Most notmuch code already adheres to this.
---
 .dir-locals.el |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
index aea630b..044c214 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -20,4 +20,6 @@
   (tab-width . 8)
   (sh-basic-offset . 4)
   (sh-indentation . 4))
+ (nil
+  (fill-column . 70))
  )
-- 
1.7.7.3

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

* Re: [PATCH] Set fill column to 70 in .dir-locals.el.
  2012-01-12 23:17 [PATCH] Set fill column to 70 in .dir-locals.el Austin Clements
@ 2012-01-13  7:10 ` Tomi Ollila
  2012-01-13  9:50 ` David Edmondson
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Tomi Ollila @ 2012-01-13  7:10 UTC (permalink / raw)
  To: Austin Clements, notmuch

On Thu, 12 Jan 2012 18:17:23 -0500, Austin Clements <amdragon@MIT.EDU> wrote:
> This controls where comments and other text wraps.  70 is the default
> value, so this simply returns it to the default for people who have
> overridden it.  Most notmuch code already adheres to this.
> ---

+1

Tomi

>  .dir-locals.el |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/.dir-locals.el b/.dir-locals.el
> index aea630b..044c214 100644
> --- a/.dir-locals.el
> +++ b/.dir-locals.el
> @@ -20,4 +20,6 @@
>    (tab-width . 8)
>    (sh-basic-offset . 4)
>    (sh-indentation . 4))
> + (nil
> +  (fill-column . 70))
>   )
> -- 
> 1.7.7.3

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

* Re: [PATCH] Set fill column to 70 in .dir-locals.el.
  2012-01-12 23:17 [PATCH] Set fill column to 70 in .dir-locals.el Austin Clements
  2012-01-13  7:10 ` Tomi Ollila
@ 2012-01-13  9:50 ` David Edmondson
  2012-01-13 12:38 ` Xavier Maillard
  2012-01-14  1:50 ` [PATCH] Set fill column to 70 in .dir-locals.el David Bremner
  3 siblings, 0 replies; 9+ messages in thread
From: David Edmondson @ 2012-01-13  9:50 UTC (permalink / raw)
  To: Austin Clements, notmuch

[-- Attachment #1: Type: text/plain, Size: 295 bytes --]

On Thu, 12 Jan 2012 18:17:23 -0500, Austin Clements <amdragon@MIT.EDU> wrote:
> This controls where comments and other text wraps.  70 is the default
> value, so this simply returns it to the default for people who have
> overridden it.  Most notmuch code already adheres to this.

Makes sense.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH] Set fill column to 70 in .dir-locals.el.
  2012-01-12 23:17 [PATCH] Set fill column to 70 in .dir-locals.el Austin Clements
  2012-01-13  7:10 ` Tomi Ollila
  2012-01-13  9:50 ` David Edmondson
@ 2012-01-13 12:38 ` Xavier Maillard
  2012-01-13 22:40   ` Xavier Maillard
  2012-01-13 22:42   ` [PATCH] Set fill column to 70 in .dir-locals.el and refactor other settings Xavier Maillard
  2012-01-14  1:50 ` [PATCH] Set fill column to 70 in .dir-locals.el David Bremner
  3 siblings, 2 replies; 9+ messages in thread
From: Xavier Maillard @ 2012-01-13 12:38 UTC (permalink / raw)
  To: Austin Clements, notmuch


On Thu, 12 Jan 2012 18:17:23 -0500, Austin Clements <amdragon@MIT.EDU> wrote:
> This controls where comments and other text wraps.  70 is the default
> value, so this simply returns it to the default for people who have
> overridden it.  Most notmuch code already adheres to this.

+1

/Xavier

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

* Re: [PATCH] Set fill column to 70 in .dir-locals.el.
  2012-01-13 12:38 ` Xavier Maillard
@ 2012-01-13 22:40   ` Xavier Maillard
  2012-01-13 22:42   ` [PATCH] Set fill column to 70 in .dir-locals.el and refactor other settings Xavier Maillard
  1 sibling, 0 replies; 9+ messages in thread
From: Xavier Maillard @ 2012-01-13 22:40 UTC (permalink / raw)
  To: Austin Clements, notmuch

Sorry if it is not correct to act like this (did I ever tell how n00b I
am when it comes to git ?).

So I wanted to /amend/ your patch to add some refactoring to it.

I hope this will not hurt :/


/Xavier

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

* [PATCH] Set fill column to 70 in .dir-locals.el and refactor other settings.
  2012-01-13 12:38 ` Xavier Maillard
  2012-01-13 22:40   ` Xavier Maillard
@ 2012-01-13 22:42   ` Xavier Maillard
  2012-01-13 22:54     ` Austin Clements
  1 sibling, 1 reply; 9+ messages in thread
From: Xavier Maillard @ 2012-01-13 22:42 UTC (permalink / raw)
  To: Austin Clements, notmuch


This controls where comments and other text wraps.  70 is the default
value, so this simply returns it to the default for people who have
overridden it.  Most notmuch code already adheres to this.
---
SO here is the patch (still sorry if I did it wrongly and very badly).

 .dir-locals.el |   19 ++++++-------------
 1 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
index aea630b..27f01c0 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,23 +1,16 @@
-; 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
+;; 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
+((nil
   (indent-tabs-mode . t)
   (tab-width . 8)
   (c-basic-offset . 4)
+  (fill-column . 70))
+ (c-mode
   (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.1

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

* Re: [PATCH] Set fill column to 70 in .dir-locals.el and refactor other settings.
  2012-01-13 22:42   ` [PATCH] Set fill column to 70 in .dir-locals.el and refactor other settings Xavier Maillard
@ 2012-01-13 22:54     ` Austin Clements
  2012-01-14 17:42       ` Xavier Maillard
  0 siblings, 1 reply; 9+ messages in thread
From: Austin Clements @ 2012-01-13 22:54 UTC (permalink / raw)
  To: Xavier Maillard; +Cc: notmuch

Quoth Xavier Maillard on Jan 13 at 11:42 pm:
> 
> This controls where comments and other text wraps.  70 is the default
> value, so this simply returns it to the default for people who have
> overridden it.  Most notmuch code already adheres to this.
> ---
> SO here is the patch (still sorry if I did it wrongly and very badly).
> 
>  .dir-locals.el |   19 ++++++-------------
>  1 files changed, 6 insertions(+), 13 deletions(-)
> 
> diff --git a/.dir-locals.el b/.dir-locals.el
> index aea630b..27f01c0 100644
> --- a/.dir-locals.el
> +++ b/.dir-locals.el
> @@ -1,23 +1,16 @@
> -; 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
> +;; 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
> +((nil
>    (indent-tabs-mode . t)
>    (tab-width . 8)
>    (c-basic-offset . 4)
> +  (fill-column . 70))
> + (c-mode
>    (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))
>   )

You ammended it right, but actually the configuration is intentionally
repeated for the various modes.  For some programming languages
(notably Python), it's inappropriate to mess with the tab settings
(especially indent-tabs-mode), hence I took a "whitelist" approach to
be on the safe side, rather than using global settings and then
enumerating the modes I happened to know would break.

This is admittedly subtle.  There should probably be a comment in the
file explaining this.

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

* Re: [PATCH] Set fill column to 70 in .dir-locals.el.
  2012-01-12 23:17 [PATCH] Set fill column to 70 in .dir-locals.el Austin Clements
                   ` (2 preceding siblings ...)
  2012-01-13 12:38 ` Xavier Maillard
@ 2012-01-14  1:50 ` David Bremner
  3 siblings, 0 replies; 9+ messages in thread
From: David Bremner @ 2012-01-14  1:50 UTC (permalink / raw)
  To: Austin Clements, notmuch

On Thu, 12 Jan 2012 18:17:23 -0500, Austin Clements <amdragon@MIT.EDU> wrote:
> This controls where comments and other text wraps.  70 is the default
> value, so this simply returns it to the default for people who have
> overridden it.  Most notmuch code already adheres to this.
> ---

pushed.

d

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

* Re: [PATCH] Set fill column to 70 in .dir-locals.el and refactor other settings.
  2012-01-13 22:54     ` Austin Clements
@ 2012-01-14 17:42       ` Xavier Maillard
  0 siblings, 0 replies; 9+ messages in thread
From: Xavier Maillard @ 2012-01-14 17:42 UTC (permalink / raw)
  To: Austin Clements; +Cc: notmuch

On Fri, 13 Jan 2012 17:54:51 -0500, Austin Clements <amdragon@MIT.EDU> wrote:
> Quoth Xavier Maillard on Jan 13 at 11:42 pm:
> > 
> > This controls where comments and other text wraps.  70 is the default
> > value, so this simply returns it to the default for people who have
> > overridden it.  Most notmuch code already adheres to this.
> > ---
> > SO here is the patch (still sorry if I did it wrongly and very badly).
> 
> You ammended it right, but actually the configuration is intentionally
> repeated for the various modes.

That's ok.

Maybe I will find an easier way to build and to send patches

/Xavier

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

end of thread, other threads:[~2012-01-14 17:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-12 23:17 [PATCH] Set fill column to 70 in .dir-locals.el Austin Clements
2012-01-13  7:10 ` Tomi Ollila
2012-01-13  9:50 ` David Edmondson
2012-01-13 12:38 ` Xavier Maillard
2012-01-13 22:40   ` Xavier Maillard
2012-01-13 22:42   ` [PATCH] Set fill column to 70 in .dir-locals.el and refactor other settings Xavier Maillard
2012-01-13 22:54     ` Austin Clements
2012-01-14 17:42       ` Xavier Maillard
2012-01-14  1:50 ` [PATCH] Set fill column to 70 in .dir-locals.el David Bremner

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).