From: Johannes Weiner <hannes@saeurebad.de>
To: Davis Herring <herring@lanl.gov>
Cc: bob@rattlesnake.com, emacs-devel@gnu.org
Subject: Re: .emacs-settings.el
Date: Fri, 7 Sep 2007 14:14:55 +0200 [thread overview]
Message-ID: <20070907121455.GA22265@saeurebad.de> (raw)
In-Reply-To: <60282.128.165.123.18.1189002441.squirrel@webmail.lanl.gov>
[-- Attachment #1.1: Type: text/plain, Size: 1966 bytes --]
Hi,
On Wed, Sep 05, 2007 at 07:27:21AM -0700, Davis Herring wrote:
> .emacs-settings.el can go in other directories than ~; it affects files
> found anywhere in the directory tree that contains it. Moreover, it is
> not a file of arbitrary Lisp, but rather contains a set of buffer-local
> variables to set in the buffers visiting files it affects, subject to the
> normal risk-checking.
I would really dislike such files. Imagine every editor has a project-specific
configuration file in the project root and you have 10 hackers working on this
project with 10 different editors.
And I would dislike to have a limited set of configuration options within such
a file.
Configuration is .emacs' concern, so how about the following:
(defmacro add-project-locals (directory-action-alist)
`(add-hook 'find-file-hook
(lambda ()
,@(mapcar (lambda (dapair)
`(when (string-match (concat "^" ,(car dapair))
(buffer-file-name))
,(cdr dapair)))
directory-action-alist))))
Then you have
(add-project-locals
(("lisp/" . (message "This is a lisp project"))
("src/emacs-cvs/" . (progn
;; do some emacs code specific stuff here))))
expand to
(add-hook 'find-file-hook
(lambda ()
(when (string-match (concat "^" "lisp/"))
(buffer-file-name)
(message "This is a lisp project"))
(when (string-match (concat "^" "src/emacs-cvs/")
(buffer-file-name))
(progn
;; do some emacs code specific stuff here))))
Of course, this is just a kludgy hack, but I think the approach itself is not
as bad as having emacs-specific setup-files spread all over several
project-directories.
Hannes
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2007-09-07 12:14 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-05 10:46 .emacs-settings.el Robert J. Chassell
2007-09-05 14:27 ` .emacs-settings.el Davis Herring
2007-09-06 14:29 ` .emacs-settings.el Juri Linkov
2007-09-06 15:23 ` .emacs-settings.el Robert J. Chassell
2007-09-06 15:36 ` .emacs-settings.el Ted Zlatanov
2007-09-06 16:04 ` .emacs-settings.el Michaël Cadilhac
2007-09-06 16:48 ` .emacs-settings.el Ted Zlatanov
2007-09-06 19:34 ` .emacs-settings.el David Kastrup
2007-09-06 20:21 ` .emacs-settings.el Ted Zlatanov
2007-09-06 21:07 ` .emacs-settings.el Juri Linkov
2007-09-07 2:11 ` .emacs-settings.el Ted Zlatanov
2007-09-06 23:55 ` .emacs-settings.el Stefan Monnier
2007-09-07 2:18 ` .emacs-settings.el Ted Zlatanov
2007-09-07 2:54 ` .emacs-settings.el Miles Bader
2007-09-07 4:03 ` .emacs-settings.el Stefan Monnier
2007-09-07 12:03 ` .emacs-settings.el Ted Zlatanov
2007-09-07 6:19 ` .emacs-settings.el David Kastrup
2007-09-07 11:56 ` .emacs-settings.el Ted Zlatanov
2007-09-07 15:49 ` .emacs-settings.el Davis Herring
2007-09-06 20:39 ` .emacs-settings.el Robert J. Chassell
2007-09-06 21:00 ` .emacs-settings.el Ted Zlatanov
2007-09-07 6:31 ` .emacs-settings.el Richard Stallman
2007-09-07 12:09 ` .emacs-settings.el Ted Zlatanov
2007-09-06 20:22 ` .emacs-settings.el Robert J. Chassell
2007-09-06 20:10 ` .emacs-settings.el Tom Tromey
2007-09-06 20:51 ` .emacs-settings.el Ted Zlatanov
2007-09-07 17:40 ` .emacs-settings.el Stefan Monnier
2007-09-08 17:47 ` .emacs-settings.el Tom Tromey
2007-09-08 19:19 ` .emacs-settings.el T. V. Raman
2007-09-08 22:17 ` .emacs-settings.el Tom Tromey
2007-09-08 23:11 ` .emacs-settings.el Juri Linkov
2007-09-08 23:09 ` .emacs-settings.el Tom Tromey
2007-09-09 1:28 ` .emacs-settings.el T. V. Raman
2007-09-09 8:09 ` .emacs-settings.el David Kastrup
2007-09-10 22:21 ` .emacs-settings.el Davis Herring
2007-09-09 20:06 ` .emacs-settings.el Stefan Monnier
2007-09-10 14:08 ` .emacs-settings.el Ted Zlatanov
2007-09-12 8:46 ` .emacs-settings.el Richard Stallman
2007-09-07 19:53 ` .emacs-settings.el Richard Stallman
2007-09-06 20:08 ` .emacs-settings.el Tom Tromey
2007-09-06 20:50 ` .emacs-settings.el Juri Linkov
2007-09-07 17:43 ` .emacs-settings.el Stefan Monnier
2007-09-07 19:53 ` .emacs-settings.el Richard Stallman
2007-09-08 17:43 ` .emacs-settings.el Tom Tromey
2007-09-06 20:58 ` .emacs-settings.el Ted Zlatanov
2007-09-07 3:05 ` .emacs-settings.el Miles Bader
2007-09-07 6:17 ` .emacs-settings.el David Kastrup
2007-09-07 7:07 ` .emacs-settings.el Jason Rumney
2007-09-07 7:18 ` .emacs-settings.el David Kastrup
2007-09-07 12:08 ` .emacs-settings.el Ted Zlatanov
2007-09-07 15:52 ` .emacs-settings.el Davis Herring
2007-09-08 7:00 ` .emacs-settings.el Richard Stallman
2007-09-06 20:28 ` .emacs-settings.el Stefan Monnier
2007-09-06 20:50 ` .emacs-settings.el Juri Linkov
2007-09-06 23:52 ` .emacs-settings.el Stefan Monnier
2007-09-06 23:41 ` .emacs-settings.el Tom Tromey
2007-09-07 8:52 ` .emacs-settings.el Juri Linkov
2007-09-07 12:14 ` Johannes Weiner [this message]
2007-09-07 16:03 ` .emacs-settings.el Davis Herring
2007-09-07 16:35 ` .emacs-settings.el Drew Adams
2007-09-07 18:11 ` .emacs-settings.el joakim
2007-09-08 7:01 ` .emacs-settings.el Richard Stallman
2007-09-08 7:00 ` .emacs-settings.el Richard Stallman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070907121455.GA22265@saeurebad.de \
--to=hannes@saeurebad.de \
--cc=bob@rattlesnake.com \
--cc=emacs-devel@gnu.org \
--cc=herring@lanl.gov \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.