unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Austin Clements <amdragon@MIT.EDU>
To: Xavier Maillard <xma@gnu.org>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] Set fill column to 70 in .dir-locals.el and refactor other settings.
Date: Fri, 13 Jan 2012 17:54:51 -0500	[thread overview]
Message-ID: <20120113225451.GK18625@mit.edu> (raw)
In-Reply-To: <m27h0v5imm.fsf@kcals.intra.maillard.im>

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.

  reply	other threads:[~2012-01-13 22:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-01-14 17:42       ` Xavier Maillard
2012-01-14  1:50 ` [PATCH] Set fill column to 70 in .dir-locals.el David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120113225451.GK18625@mit.edu \
    --to=amdragon@mit.edu \
    --cc=notmuch@notmuchmail.org \
    --cc=xma@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).