unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* .emacs-settings.el
@ 2007-09-05 10:46 Robert J. Chassell
  2007-09-05 14:27 ` .emacs-settings.el Davis Herring
  0 siblings, 1 reply; 63+ messages in thread
From: Robert J. Chassell @ 2007-09-05 10:46 UTC (permalink / raw)
  To: emacs-devel

I cannot remember what you said earlier.  How is ~/.emacs-settings.el
different from the long-used settings file ~/.emacs?  How is it
different from site-start.el or default.el, if those files exist?

-- 
    Robert J. Chassell                          GnuPG Key ID: 004B4AC8
    bob@rattlesnake.com                         bob@gnu.org
    http://www.rattlesnake.com                  http://www.teak.cc

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

* Re: .emacs-settings.el
  2007-09-05 10:46 .emacs-settings.el Robert J. Chassell
@ 2007-09-05 14:27 ` Davis Herring
  2007-09-06 14:29   ` .emacs-settings.el Juri Linkov
  2007-09-07 12:14   ` .emacs-settings.el Johannes Weiner
  0 siblings, 2 replies; 63+ messages in thread
From: Davis Herring @ 2007-09-05 14:27 UTC (permalink / raw)
  To: bob; +Cc: emacs-devel

> I cannot remember what you said earlier.  How is ~/.emacs-settings.el
> different from the long-used settings file ~/.emacs?  How is it
> different from site-start.el or default.el, if those files exist?

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

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

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

* Re: .emacs-settings.el
  2007-09-05 14:27 ` .emacs-settings.el Davis Herring
@ 2007-09-06 14:29   ` Juri Linkov
  2007-09-06 15:23     ` .emacs-settings.el Robert J. Chassell
                       ` (2 more replies)
  2007-09-07 12:14   ` .emacs-settings.el Johannes Weiner
  1 sibling, 3 replies; 63+ messages in thread
From: Juri Linkov @ 2007-09-06 14:29 UTC (permalink / raw)
  To: herring; +Cc: bob, emacs-devel

>> I cannot remember what you said earlier.  How is ~/.emacs-settings.el
>> different from the long-used settings file ~/.emacs?  How is it
>> different from site-start.el or default.el, if those files exist?
>
> .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.

Since .emacs-settings.el is a confusing file name, what about a more
appropriate and shorter file name like .dir-vars.el or .dir-locals.el
or .project.el.

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: .emacs-settings.el
  2007-09-06 14:29   ` .emacs-settings.el Juri Linkov
@ 2007-09-06 15:23     ` Robert J. Chassell
  2007-09-06 15:36       ` .emacs-settings.el Ted Zlatanov
  2007-09-06 20:08     ` .emacs-settings.el Tom Tromey
  2007-09-06 20:28     ` .emacs-settings.el Stefan Monnier
  2 siblings, 1 reply; 63+ messages in thread
From: Robert J. Chassell @ 2007-09-06 15:23 UTC (permalink / raw)
  To: emacs-devel

   Since .emacs-settings.el is a confusing file name, what about a
   more appropriate and shorter file name like .dir-vars.el or
   .dir-locals.el or .project.el.

That is an excellent idea!  How about .project.el?

-- 
    Robert J. Chassell                          GnuPG Key ID: 004B4AC8
    bob@rattlesnake.com                         bob@gnu.org
    http://www.rattlesnake.com                  http://www.teak.cc

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

* Re: .emacs-settings.el
  2007-09-06 15:23     ` .emacs-settings.el Robert J. Chassell
@ 2007-09-06 15:36       ` Ted Zlatanov
  2007-09-06 16:04         ` .emacs-settings.el Michaël Cadilhac
  2007-09-06 20:10         ` .emacs-settings.el Tom Tromey
  0 siblings, 2 replies; 63+ messages in thread
From: Ted Zlatanov @ 2007-09-06 15:36 UTC (permalink / raw)
  To: emacs-devel

On Thu, 6 Sep 2007 15:23:54 +0000 (UTC) "Robert J. Chassell" <bob@rattlesnake.com> wrote: 

RJC>    Since .emacs-settings.el is a confusing file name, what about a
RJC>    more appropriate and shorter file name like .dir-vars.el or
RJC>    .dir-locals.el or .project.el.

RJC> That is an excellent idea!  How about .project.el?

I would not make it hidden, to avoid surprises: project.el

Also, C-h v and customize-variable should say that project.el has
overridden a variable, so the user doesn't have to wonder.  There should
also be a user-visible message when project.el is detected and used.

Ted

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

* Re: .emacs-settings.el
  2007-09-06 15:36       ` .emacs-settings.el Ted Zlatanov
@ 2007-09-06 16:04         ` Michaël Cadilhac
  2007-09-06 16:48           ` .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
  1 sibling, 2 replies; 63+ messages in thread
From: Michaël Cadilhac @ 2007-09-06 16:04 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 931 bytes --]

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Thu, 6 Sep 2007 15:23:54 +0000 (UTC) "Robert J. Chassell" <bob@rattlesnake.com> wrote: 
>
> RJC>    Since .emacs-settings.el is a confusing file name, what about a
> RJC>    more appropriate and shorter file name like .dir-vars.el or
> RJC>    .dir-locals.el or .project.el.
>
> RJC> That is an excellent idea!  How about .project.el?
>
> I would not make it hidden, to avoid surprises: project.el

So sad the features of project.el will not be usable in the lisp/
directory of Emacs, then :-)

FWIW, I'm for .dir-locals.el or dir-locals.el.

-- 
 |   Michaël `Micha' Cadilhac       |  Would someone please DTRT with this,  |
 |   http://michael.cadilhac.name   |        then ACK?                       |
 |   JID/MSN:                       |          -- Richard Stallman           |
 `----  michael.cadilhac@gmail.com  |                                   -  --'

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 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

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

* Re: .emacs-settings.el
  2007-09-06 16:04         ` .emacs-settings.el Michaël Cadilhac
@ 2007-09-06 16:48           ` Ted Zlatanov
  2007-09-06 19:34             ` .emacs-settings.el David Kastrup
                               ` (2 more replies)
  2007-09-06 20:22           ` .emacs-settings.el Robert J. Chassell
  1 sibling, 3 replies; 63+ messages in thread
From: Ted Zlatanov @ 2007-09-06 16:48 UTC (permalink / raw)
  To: emacs-devel

On Thu, 06 Sep 2007 18:04:30 +0200 michael@cadilhac.name (Michaël Cadilhac) wrote: 

MC> Ted Zlatanov <tzz@lifelogs.com> writes:
>> I would not make it hidden, to avoid surprises: project.el

MC> So sad the features of project.el will not be usable in the lisp/
MC> directory of Emacs, then :-)

I think surprising the user is a bad thing, so I'd rather not have a
hidden file.  The penalty of name conflicts is not as bad as using
hidden data to influence an application's behavior.

I'm ok with dir-locals.el or any other name, but in general it should
not be an .el file, right?  It's just some settings that will not be
actual Lisp code.  Maybe dir-locals.elp for "emacs lisp properties"?

Ted

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

* Re: .emacs-settings.el
  2007-09-06 16:48           ` .emacs-settings.el Ted Zlatanov
@ 2007-09-06 19:34             ` David Kastrup
  2007-09-06 20:21               ` .emacs-settings.el Ted Zlatanov
  2007-09-06 20:39             ` .emacs-settings.el Robert J. Chassell
  2007-09-07  6:31             ` .emacs-settings.el Richard Stallman
  2 siblings, 1 reply; 63+ messages in thread
From: David Kastrup @ 2007-09-06 19:34 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: emacs-devel

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Thu, 06 Sep 2007 18:04:30 +0200 michael@cadilhac.name (Michaël Cadilhac) wrote: 
>
> MC> Ted Zlatanov <tzz@lifelogs.com> writes:
>>> I would not make it hidden, to avoid surprises: project.el
>
> MC> So sad the features of project.el will not be usable in the lisp/
> MC> directory of Emacs, then :-)
>
> I think surprising the user is a bad thing, so I'd rather not have a
> hidden file.  The penalty of name conflicts is not as bad as using
> hidden data to influence an application's behavior.

Uh, you are arguing against _any_ file with a .* name right now: all
of them are used to influence an application's behavior without
cluttering directory listings.

So I don't buy this argument.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: .emacs-settings.el
  2007-09-06 14:29   ` .emacs-settings.el Juri Linkov
  2007-09-06 15:23     ` .emacs-settings.el Robert J. Chassell
@ 2007-09-06 20:08     ` Tom Tromey
  2007-09-06 20:50       ` .emacs-settings.el Juri Linkov
  2007-09-06 20:58       ` .emacs-settings.el Ted Zlatanov
  2007-09-06 20:28     ` .emacs-settings.el Stefan Monnier
  2 siblings, 2 replies; 63+ messages in thread
From: Tom Tromey @ 2007-09-06 20:08 UTC (permalink / raw)
  To: Juri Linkov; +Cc: bob, emacs-devel

>>>>> "Juri" == Juri Linkov <juri@jurta.org> writes:

Juri> Since .emacs-settings.el is a confusing file name, what about a more
Juri> appropriate and shorter file name like .dir-vars.el or .dir-locals.el
Juri> or .project.el.

Could you say what you think is confusing about it?
Obviously I don't find it confusing.  

Ted> That's what I mean by "suprising" and "hidden."  Only a few
Ted> applications put such hidden settings files outside the home
Ted> directory, I can think only of the CVS .cvsignore and Subversion
Ted> .svn directories at the moment.

Yeah, it is intentionally supposed to be similar to .cvsignore or
.svn.  The hidden-ness, in my view, is a feature; some projects don't
like to "clutter" their top-level directories with things like this.
FWIW my precedent here is Eclipse, which makes .project and .settings
directories.

Tom

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

* Re: .emacs-settings.el
  2007-09-06 15:36       ` .emacs-settings.el Ted Zlatanov
  2007-09-06 16:04         ` .emacs-settings.el Michaël Cadilhac
@ 2007-09-06 20:10         ` Tom Tromey
  2007-09-06 20:51           ` .emacs-settings.el Ted Zlatanov
                             ` (2 more replies)
  1 sibling, 3 replies; 63+ messages in thread
From: Tom Tromey @ 2007-09-06 20:10 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: emacs-devel

>>>>> "Ted" == Ted Zlatanov <tzz@lifelogs.com> writes:

Ted> Also, C-h v and customize-variable should say that project.el has
Ted> overridden a variable, so the user doesn't have to wonder.  There should
Ted> also be a user-visible message when project.el is detected and used.

Do we do these things for file-local variables?

I don't mind the latter, though I imagine I would consider it noise.

I'd rather not do the former.  But if I must, I may need help here.
Offhand I don't know how I'd implement it.

Tom

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

* Re: .emacs-settings.el
  2007-09-06 19:34             ` .emacs-settings.el David Kastrup
@ 2007-09-06 20:21               ` Ted Zlatanov
  2007-09-06 21:07                 ` .emacs-settings.el Juri Linkov
                                   ` (3 more replies)
  0 siblings, 4 replies; 63+ messages in thread
From: Ted Zlatanov @ 2007-09-06 20:21 UTC (permalink / raw)
  To: emacs-devel

On Thu, 06 Sep 2007 21:34:32 +0200 David Kastrup <dak@gnu.org> wrote: 

DK> Ted Zlatanov <tzz@lifelogs.com> writes:
>> On Thu, 06 Sep 2007 18:04:30 +0200 michael@cadilhac.name (Michaël Cadilhac) wrote: 
>> 
MC> Ted Zlatanov <tzz@lifelogs.com> writes:
>>>> I would not make it hidden, to avoid surprises: project.el
>> 
MC> So sad the features of project.el will not be usable in the lisp/
MC> directory of Emacs, then :-)
>> 
>> I think surprising the user is a bad thing, so I'd rather not have a
>> hidden file.  The penalty of name conflicts is not as bad as using
>> hidden data to influence an application's behavior.

DK> Uh, you are arguing against _any_ file with a .* name right now: all
DK> of them are used to influence an application's behavior without
DK> cluttering directory listings.

DK> So I don't buy this argument.

I think you've missed the difference between a hidden file anywhere in
the directory tree and in a well-known location.  We're talking about a
{project,dir-locals}.el file that in /a, /a/b, /a/b/c, or /a/b/c/d could
affect the settings for /a/b/c/d/* and every file under that.  You'd
have to do a `find` to get all the hidden files (or some equivalent
shell game).  That's what I mean by "suprising" and "hidden."  Only a
few applications put such hidden settings files outside the home
directory, I can think only of the CVS .cvsignore and Subversion .svn
directories at the moment.  Emacs doesn't do that AFAIK, so it would be
at least a little surprising to current users.  I personally think it
would be a bad design decision.

Files like .emacs, .profile, etc. are in a single, well-known location,
so they are easy to find.  This compensates for their invisibility
(whether that's a good design decision is another discussion that's not
pertinent).

Ted

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

* Re: .emacs-settings.el
  2007-09-06 16:04         ` .emacs-settings.el Michaël Cadilhac
  2007-09-06 16:48           ` .emacs-settings.el Ted Zlatanov
@ 2007-09-06 20:22           ` Robert J. Chassell
  1 sibling, 0 replies; 63+ messages in thread
From: Robert J. Chassell @ 2007-09-06 20:22 UTC (permalink / raw)
  To: emacs-devel

    FWIW, I'm for .dir-locals.el or dir-locals.el.

I don't mind what name is used so long as it is not confusing.  Juri
is right!

-- 
    Robert J. Chassell                          GnuPG Key ID: 004B4AC8
    bob@rattlesnake.com                         bob@gnu.org
    http://www.rattlesnake.com                  http://www.teak.cc

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

* Re: .emacs-settings.el
  2007-09-06 14:29   ` .emacs-settings.el Juri Linkov
  2007-09-06 15:23     ` .emacs-settings.el Robert J. Chassell
  2007-09-06 20:08     ` .emacs-settings.el Tom Tromey
@ 2007-09-06 20:28     ` Stefan Monnier
  2007-09-06 20:50       ` .emacs-settings.el Juri Linkov
  2 siblings, 1 reply; 63+ messages in thread
From: Stefan Monnier @ 2007-09-06 20:28 UTC (permalink / raw)
  To: Juri Linkov; +Cc: bob, emacs-devel

>>> I cannot remember what you said earlier.  How is ~/.emacs-settings.el
>>> different from the long-used settings file ~/.emacs?  How is it
>>> different from site-start.el or default.el, if those files exist?
>> 
>> .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.

> Since .emacs-settings.el is a confusing file name, what about a more
> appropriate and shorter file name like .dir-vars.el or .dir-locals.el
> or .project.el.

Please go re-read the thread that ended up with "emacs-settings".


        Stefan

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

* Re: .emacs-settings.el
  2007-09-06 16:48           ` .emacs-settings.el Ted Zlatanov
  2007-09-06 19:34             ` .emacs-settings.el David Kastrup
@ 2007-09-06 20:39             ` Robert J. Chassell
  2007-09-06 21:00               ` .emacs-settings.el Ted Zlatanov
  2007-09-07  6:31             ` .emacs-settings.el Richard Stallman
  2 siblings, 1 reply; 63+ messages in thread
From: Robert J. Chassell @ 2007-09-06 20:39 UTC (permalink / raw)
  To: emacs-devel

    I'm ok with dir-locals.el or any other name, but in general it should
    not be an .el file, right?  It's just some settings that will not be
    actual Lisp code.  Maybe dir-locals.elp for "emacs lisp properties"?

My understanding is that an Emacs Lisp file is specified to end with
.el

herring@lanl.gov says the file in question is in Emacs Lisp, albeit
`not a file of arbitrary Lisp':

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

My understanding is that when he says `not a file of arbitrary Lisp
... a set of buffer-local variables to set in the buffers visiting
files', he means no defuns.  Only setq's are permitted.

I could easily be wrong.

-- 
    Robert J. Chassell                          GnuPG Key ID: 004B4AC8
    bob@rattlesnake.com                         bob@gnu.org
    http://www.rattlesnake.com                  http://www.teak.cc

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

* Re: .emacs-settings.el
  2007-09-06 20:08     ` .emacs-settings.el Tom Tromey
@ 2007-09-06 20:50       ` Juri Linkov
  2007-09-07 17:43         ` .emacs-settings.el Stefan Monnier
  2007-09-07 19:53         ` .emacs-settings.el Richard Stallman
  2007-09-06 20:58       ` .emacs-settings.el Ted Zlatanov
  1 sibling, 2 replies; 63+ messages in thread
From: Juri Linkov @ 2007-09-06 20:50 UTC (permalink / raw)
  To: tromey; +Cc: bob, emacs-devel

> Juri> Since .emacs-settings.el is a confusing file name, what about a more
> Juri> appropriate and shorter file name like .dir-vars.el or .dir-locals.el
> Juri> or .project.el.
>
> Could you say what you think is confusing about it?

Exactly what you can see in the message that started this thread,
i.e. when users first encounter the file .emacs-settings.el, the first
reaction is that it somehow related to general Emacs settings in .emacs.

> FWIW my precedent here is Eclipse, which makes .project and .settings
> directories.

Then why don't use similar names in Emacs?  If the package name will
remain project.el, then name the data file .project.el (the extension .el
says that this data file is for Emacs, and the leading dot says that
it's a configuration file).  If the package will be renamed to settings.el,
then name the data file .settings.el.

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: .emacs-settings.el
  2007-09-06 20:28     ` .emacs-settings.el Stefan Monnier
@ 2007-09-06 20:50       ` Juri Linkov
  2007-09-06 23:52         ` .emacs-settings.el Stefan Monnier
  0 siblings, 1 reply; 63+ messages in thread
From: Juri Linkov @ 2007-09-06 20:50 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bob, emacs-devel

>> Since .emacs-settings.el is a confusing file name, what about a more
>> appropriate and shorter file name like .dir-vars.el or .dir-locals.el
>> or .project.el.
>
> Please go re-read the thread that ended up with "emacs-settings".

I can find the following conversation:

Stefan> How 'bout "dir-local-settings" instead?
Stefan> I'm also tempted to add "emacs" in the name, but I guess that
Stefan> the ".el" extension can be considered sufficient information
Stefan> (and after all, we don't use the "Emacs" name in the "Local
Stefan> Variables" section cookies either).
Tom> Mentioning Emacs wouldn't be too bad.  "dir-local-settings" is too
Tom> long for my taste.
Tom> How about ".emacs-settings"?
Vagn> Good choice. It also follows "tradition" because dirvars.el uses
Vagn> .emacs-dirvars and dir-locals.el uses .emacs-locals.

I agree that it's a good tradition to use the same file names for
a package and its data files (dirvars.el -> .emacs-dirvars,
dir-locals.el -> .emacs-locals), but I don't see how this tradition
applies to package.el: package.el -> .emacs-settings.el?
This is confusing.

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: .emacs-settings.el
  2007-09-06 20:10         ` .emacs-settings.el Tom Tromey
@ 2007-09-06 20:51           ` Ted Zlatanov
  2007-09-07 17:40           ` .emacs-settings.el Stefan Monnier
  2007-09-07 19:53           ` .emacs-settings.el Richard Stallman
  2 siblings, 0 replies; 63+ messages in thread
From: Ted Zlatanov @ 2007-09-06 20:51 UTC (permalink / raw)
  To: emacs-devel

On Thu, 06 Sep 2007 14:10:41 -0600 Tom Tromey <tromey@redhat.com> wrote: 

>>>>>> "Ted" == Ted Zlatanov <tzz@lifelogs.com> writes:
Ted> Also, C-h v and customize-variable should say that project.el has
Ted> overridden a variable, so the user doesn't have to wonder.  There should
Ted> also be a user-visible message when project.el is detected and used.

Tom> Do we do these things for file-local variables?

I don't believe so.  But those variables are right in the file you're
editing, while emacs-settings.el lives outside the buffer, so it's not
as visible to the user.  That's the difference in scope that made me
think hiding the file would be a bad idea.

Tom> I don't mind the latter, though I imagine I would consider it noise.

Sure, as long as it's possible to filter it out :)

Ted

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

* Re: .emacs-settings.el
  2007-09-06 20:08     ` .emacs-settings.el Tom Tromey
  2007-09-06 20:50       ` .emacs-settings.el Juri Linkov
@ 2007-09-06 20:58       ` Ted Zlatanov
  2007-09-07  3:05         ` .emacs-settings.el Miles Bader
  2007-09-07  6:17         ` .emacs-settings.el David Kastrup
  1 sibling, 2 replies; 63+ messages in thread
From: Ted Zlatanov @ 2007-09-06 20:58 UTC (permalink / raw)
  To: emacs-devel

On Thu, 06 Sep 2007 14:08:00 -0600 Tom Tromey <tromey@redhat.com> wrote: 

Ted> That's what I mean by "suprising" and "hidden."  Only a few
Ted> applications put such hidden settings files outside the home
Ted> directory, I can think only of the CVS .cvsignore and Subversion
Ted> .svn directories at the moment.

Tom> Yeah, it is intentionally supposed to be similar to .cvsignore or
Tom> .svn.  The hidden-ness, in my view, is a feature; some projects don't
Tom> like to "clutter" their top-level directories with things like this.
Tom> FWIW my precedent here is Eclipse, which makes .project and .settings
Tom> directories.

I think Emacs should not default to getting default settings from a
hidden file in the path, personally, but it should be possible via
customization to choose that behavior.  I wouldn't expect Emacs to do
that by default, that's all.

Ted

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

* Re: .emacs-settings.el
  2007-09-06 20:39             ` .emacs-settings.el Robert J. Chassell
@ 2007-09-06 21:00               ` Ted Zlatanov
  0 siblings, 0 replies; 63+ messages in thread
From: Ted Zlatanov @ 2007-09-06 21:00 UTC (permalink / raw)
  To: emacs-devel

On Thu, 6 Sep 2007 20:39:48 +0000 (UTC) "Robert J. Chassell" <bob@rattlesnake.com> wrote: 

RJC>     I'm ok with dir-locals.el or any other name, but in general it should
RJC>     not be an .el file, right?  It's just some settings that will not be
RJC>     actual Lisp code.  Maybe dir-locals.elp for "emacs lisp properties"?

RJC> My understanding is that an Emacs Lisp file is specified to end with
RJC> .el

Sure.

RJC> herring@lanl.gov says the file in question is in Emacs Lisp, albeit
RJC> `not a file of arbitrary Lisp':

RJC>     ... it is not a file of arbitrary Lisp, but rather contains a set
RJC>     of buffer-local variables to set in the buffers visiting files it
RJC>     affects, subject to the normal risk-checking.

RJC> My understanding is that when he says `not a file of arbitrary Lisp
RJC> ... a set of buffer-local variables to set in the buffers visiting
RJC> files', he means no defuns.  Only setq's are permitted.

I thought it would look more like the file-local specification :)  If
it's not Lisp, we can give it pretty much any extension, but .elp would
probably be least surprising and shortest.

Ted

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

* Re: .emacs-settings.el
  2007-09-06 20:21               ` .emacs-settings.el Ted Zlatanov
@ 2007-09-06 21:07                 ` Juri Linkov
  2007-09-07  2:11                   ` .emacs-settings.el Ted Zlatanov
  2007-09-06 23:55                 ` .emacs-settings.el Stefan Monnier
                                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 63+ messages in thread
From: Juri Linkov @ 2007-09-06 21:07 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: emacs-devel

> I think you've missed the difference between a hidden file anywhere in
> the directory tree and in a well-known location.  We're talking about a
> {project,dir-locals}.el file that in /a, /a/b, /a/b/c, or /a/b/c/d could
> affect the settings for /a/b/c/d/* and every file under that.  You'd
> have to do a `find` to get all the hidden files (or some equivalent
> shell game).  That's what I mean by "suprising" and "hidden."  Only a
> few applications put such hidden settings files outside the home
> directory, I can think only of the CVS .cvsignore and Subversion .svn
> directories at the moment.  Emacs doesn't do that AFAIK, so it would be
> at least a little surprising to current users.  I personally think it
> would be a bad design decision.

I think this problem can be completely mitigated exactly with the same
solution you already proposed, i.e. C-h v and customize-variable should
say that the variable's value is overridden by .project.el or .settings.el
(like C-h f says that the function is advised).

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: .emacs-settings.el
  2007-09-06 23:52         ` .emacs-settings.el Stefan Monnier
@ 2007-09-06 23:41           ` Tom Tromey
  2007-09-07  8:52             ` .emacs-settings.el Juri Linkov
  0 siblings, 1 reply; 63+ messages in thread
From: Tom Tromey @ 2007-09-06 23:41 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Juri Linkov, bob, emacs-devel

>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I agree that it's a good tradition to use the same file names for
>> a package and its data files (dirvars.el -> .emacs-dirvars,
>> dir-locals.el -> .emacs-locals), but I don't see how this tradition
>> applies to package.el: package.el -> .emacs-settings.el?
>> This is confusing.

Stefan> In my opinion, package.el is itself a poor name, since it
Stefan> hints at other features such as CL packages or XEmacs
Stefan> packages.

FWIW -- it is "project.el"; "package.el" is that other thing I wrote
that we all argue about :-)

RMS already asked that I just put the code into files.el.  So all that
will be left are the symbol names starting with "project-".

Perhaps even "project" is a misnomer.  It is hard to say.  I do think
the best use for this feature is project-specific settings.

Tom

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

* Re: .emacs-settings.el
  2007-09-06 20:50       ` .emacs-settings.el Juri Linkov
@ 2007-09-06 23:52         ` Stefan Monnier
  2007-09-06 23:41           ` .emacs-settings.el Tom Tromey
  0 siblings, 1 reply; 63+ messages in thread
From: Stefan Monnier @ 2007-09-06 23:52 UTC (permalink / raw)
  To: Juri Linkov; +Cc: bob, emacs-devel

> I agree that it's a good tradition to use the same file names for
> a package and its data files (dirvars.el -> .emacs-dirvars,
> dir-locals.el -> .emacs-locals), but I don't see how this tradition
> applies to package.el: package.el -> .emacs-settings.el?
> This is confusing.

In my opinion, package.el is itself a poor name, since it hints at other
features such as CL packages or XEmacs packages.


        Stefan

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

* Re: .emacs-settings.el
  2007-09-06 20:21               ` .emacs-settings.el Ted Zlatanov
  2007-09-06 21:07                 ` .emacs-settings.el Juri Linkov
@ 2007-09-06 23:55                 ` 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  6:19                 ` .emacs-settings.el David Kastrup
  3 siblings, 1 reply; 63+ messages in thread
From: Stefan Monnier @ 2007-09-06 23:55 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: emacs-devel

> I think you've missed the difference between a hidden file anywhere in
> the directory tree and in a well-known location.  We're talking about a
> {project,dir-locals}.el file that in /a, /a/b, /a/b/c, or /a/b/c/d could
> affect the settings for /a/b/c/d/* and every file under that.  You'd
> have to do a `find` to get all the hidden files (or some equivalent
> shell game).  That's what I mean by "suprising" and "hidden."  Only a
> few applications put such hidden settings files outside the home
> directory, I can think only of the CVS .cvsignore and Subversion .svn
> directories at the moment.

There are many more: .arch-inventory, .arch-ids, .bzr, .hg.  Some use _darcs
or _MTN but other than CVS (which was often considered as a mistake) most
distinguish their name either with a leading . or a leading _.


        Stefan

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

* Re: .emacs-settings.el
  2007-09-06 21:07                 ` .emacs-settings.el Juri Linkov
@ 2007-09-07  2:11                   ` Ted Zlatanov
  0 siblings, 0 replies; 63+ messages in thread
From: Ted Zlatanov @ 2007-09-07  2:11 UTC (permalink / raw)
  To: emacs-devel

On Fri, 07 Sep 2007 00:07:50 +0300 Juri Linkov <juri@jurta.org> wrote: 

>> I think you've missed the difference between a hidden file anywhere in
>> the directory tree and in a well-known location.  We're talking about a
>> {project,dir-locals}.el file that in /a, /a/b, /a/b/c, or /a/b/c/d could
>> affect the settings for /a/b/c/d/* and every file under that.  You'd
>> have to do a `find` to get all the hidden files (or some equivalent
>> shell game).  That's what I mean by "suprising" and "hidden."  Only a
>> few applications put such hidden settings files outside the home
>> directory, I can think only of the CVS .cvsignore and Subversion .svn
>> directories at the moment.  Emacs doesn't do that AFAIK, so it would be
>> at least a little surprising to current users.  I personally think it
>> would be a bad design decision.

JL> I think this problem can be completely mitigated exactly with the same
JL> solution you already proposed, i.e. C-h v and customize-variable should
JL> say that the variable's value is overridden by .project.el or .settings.el
JL> (like C-h f says that the function is advised).

That would be fine with me.  A user-visible message would also be very
useful.  I'm really just trying to avoid the debugging sessions I can
imagine ensuing from a hidden file that overrides a few local settings.
With these two safeguards (C-h v/customize-variable plus decent
messaging) I think the risk is much smaller.

Ted

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

* Re: .emacs-settings.el
  2007-09-06 23:55                 ` .emacs-settings.el Stefan Monnier
@ 2007-09-07  2:18                   ` Ted Zlatanov
  0 siblings, 0 replies; 63+ messages in thread
From: Ted Zlatanov @ 2007-09-07  2:18 UTC (permalink / raw)
  To: emacs-devel

On Thu, 06 Sep 2007 19:55:36 -0400 Stefan Monnier <monnier@iro.umontreal.ca> wrote: 

>> I think you've missed the difference between a hidden file anywhere in
>> the directory tree and in a well-known location.  We're talking about a
>> {project,dir-locals}.el file that in /a, /a/b, /a/b/c, or /a/b/c/d could
>> affect the settings for /a/b/c/d/* and every file under that.  You'd
>> have to do a `find` to get all the hidden files (or some equivalent
>> shell game).  That's what I mean by "suprising" and "hidden."  Only a
>> few applications put such hidden settings files outside the home
>> directory, I can think only of the CVS .cvsignore and Subversion .svn
>> directories at the moment.

SM> There are many more: .arch-inventory, .arch-ids, .bzr, .hg.  Some use _darcs
SM> or _MTN but other than CVS (which was often considered as a mistake) most
SM> distinguish their name either with a leading . or a leading _.

Other than Eclipse, these are all VCS software packages, which is
interesting.  I've also seen hidden files used by MacOS for file
metadata and I remember .xvpics which was used for caching thumbnails.
Hidden files do tend to accumulate mostly under ~ though.

As I said in another followup, however, I'm OK with making these
override files hidden as long as messaging and C-h v/customize-variable
report their usage.  So please don't let my comments delay this very
useful functionality from making an appearance.

Ted

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

* Re: .emacs-settings.el
  2007-09-06 20:21               ` .emacs-settings.el Ted Zlatanov
  2007-09-06 21:07                 ` .emacs-settings.el Juri Linkov
  2007-09-06 23:55                 ` .emacs-settings.el Stefan Monnier
@ 2007-09-07  2:54                 ` 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
  3 siblings, 2 replies; 63+ messages in thread
From: Miles Bader @ 2007-09-07  2:54 UTC (permalink / raw)
  To: emacs-devel

Ted Zlatanov <tzz@lifelogs.com> writes:
> Emacs doesn't do that AFAIK, so it would be
> at least a little surprising to current users.  I personally think it
> would be a bad design decision.

It should be a user decision.  Just as you might not like "hidden"
files, I do not like random crap cluttering my directory listings.

Thus Emacs should probably look for both ".foo.el" and "asdfasdf.el".

(we have to be much more careful with the non-hidden name though,
because it has a much higher chance of conflicting with the directory
content)

-Miles

-- 
"I distrust a research person who is always obviously busy on a task."
   --Robert Frosch, VP, GM Research

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

* Re: .emacs-settings.el
  2007-09-06 20:58       ` .emacs-settings.el Ted Zlatanov
@ 2007-09-07  3:05         ` Miles Bader
  2007-09-07  6:17         ` .emacs-settings.el David Kastrup
  1 sibling, 0 replies; 63+ messages in thread
From: Miles Bader @ 2007-09-07  3:05 UTC (permalink / raw)
  To: emacs-devel

Ted Zlatanov <tzz@lifelogs.com> writes:
> I think Emacs should not default to getting default settings from a
> hidden file in the path, personally, but it should be possible via
> customization to choose that behavior.

No, it should do so by default, because if we add such a feature, many
projects will start to use such "hidden settings files", and expect that
Emacs users of that project will see the resulting effects.  Of course
it should be possible to disable it if you don't like that.

-Miles

-- 
My spirit felt washed.  With blood.  [Eli Shin, on "The Passion of the Christ"]

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

* Re: .emacs-settings.el
  2007-09-07  2:54                 ` .emacs-settings.el Miles Bader
@ 2007-09-07  4:03                   ` Stefan Monnier
  2007-09-07 12:03                   ` .emacs-settings.el Ted Zlatanov
  1 sibling, 0 replies; 63+ messages in thread
From: Stefan Monnier @ 2007-09-07  4:03 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel

> It should be a user decision.  Just as you might not like "hidden"
> files, I do not like random crap cluttering my directory listings.

> Thus Emacs should probably look for both ".foo.el" and "asdfasdf.el".

No need for that.  Users who don't like those files to be hidden can just
add a symlink from ThisDirectoryHasEmacsLocalSettings.el to .emacs-settings.


        Stefan

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

* Re: .emacs-settings.el
  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         ` David Kastrup
  2007-09-07  7:07           ` .emacs-settings.el Jason Rumney
  1 sibling, 1 reply; 63+ messages in thread
From: David Kastrup @ 2007-09-07  6:17 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: emacs-devel

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Thu, 06 Sep 2007 14:08:00 -0600 Tom Tromey <tromey@redhat.com> wrote: 
>
> Ted> That's what I mean by "suprising" and "hidden."  Only a few
> Ted> applications put such hidden settings files outside the home
> Ted> directory, I can think only of the CVS .cvsignore and Subversion
> Ted> .svn directories at the moment.
>
> Tom> Yeah, it is intentionally supposed to be similar to .cvsignore or
> Tom> .svn.  The hidden-ness, in my view, is a feature; some projects don't
> Tom> like to "clutter" their top-level directories with things like this.
> Tom> FWIW my precedent here is Eclipse, which makes .project and .settings
> Tom> directories.
>
> I think Emacs should not default to getting default settings from a
> hidden file in the path, personally, but it should be possible via
> customization to choose that behavior.  I wouldn't expect Emacs to
> do that by default, that's all.

I strongly disagree.  The file won't be there without the user having
taken some action to put it there, and if there is changed behavior,
the first place I would look for would be in a local hidden file.
That's what I do with other utilities as well that have local
dicrectory-relevant behavior.  If it is not there, then it becomes a
RPIT searching for the location where the stuff actually sits.  Files
starting with . are supposed to be auxiliary data, not content, and
this is _exactly_ what the scheme .* has been designed for.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: .emacs-settings.el
  2007-09-06 20:21               ` .emacs-settings.el Ted Zlatanov
                                   ` (2 preceding siblings ...)
  2007-09-07  2:54                 ` .emacs-settings.el Miles Bader
@ 2007-09-07  6:19                 ` David Kastrup
  2007-09-07 11:56                   ` .emacs-settings.el Ted Zlatanov
  2007-09-07 15:49                   ` .emacs-settings.el Davis Herring
  3 siblings, 2 replies; 63+ messages in thread
From: David Kastrup @ 2007-09-07  6:19 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: emacs-devel

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Thu, 06 Sep 2007 21:34:32 +0200 David Kastrup <dak@gnu.org> wrote: 
>
> DK> Ted Zlatanov <tzz@lifelogs.com> writes:
>>> On Thu, 06 Sep 2007 18:04:30 +0200 michael@cadilhac.name (Michaël Cadilhac) wrote: 
>>> 
> MC> Ted Zlatanov <tzz@lifelogs.com> writes:
>>>>> I would not make it hidden, to avoid surprises: project.el
>>> 
> MC> So sad the features of project.el will not be usable in the lisp/
> MC> directory of Emacs, then :-)
>>> 
>>> I think surprising the user is a bad thing, so I'd rather not have a
>>> hidden file.  The penalty of name conflicts is not as bad as using
>>> hidden data to influence an application's behavior.
>
> DK> Uh, you are arguing against _any_ file with a .* name right now: all
> DK> of them are used to influence an application's behavior without
> DK> cluttering directory listings.
>
> DK> So I don't buy this argument.
>
> I think you've missed the difference between a hidden file anywhere in
> the directory tree and in a well-known location.

In a well-known location there is no reason to hide files, since the
well-known location need not hold other files.

So no, I am not missing anything, and it is not polite of you to
presume that anybody not agreeing with you must be stupid.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: .emacs-settings.el
  2007-09-06 16:48           ` .emacs-settings.el Ted Zlatanov
  2007-09-06 19:34             ` .emacs-settings.el David Kastrup
  2007-09-06 20:39             ` .emacs-settings.el Robert J. Chassell
@ 2007-09-07  6:31             ` Richard Stallman
  2007-09-07 12:09               ` .emacs-settings.el Ted Zlatanov
  2 siblings, 1 reply; 63+ messages in thread
From: Richard Stallman @ 2007-09-07  6:31 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: emacs-devel

    I think surprising the user is a bad thing, so I'd rather not have a
    hidden file.  The penalty of name conflicts is not as bad as using
    hidden data to influence an application's behavior.

I prefer a dotfile.  It will ensure no conflicts with the user's files.
Dotfies are easy to see in dired.

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

* Re: .emacs-settings.el
  2007-09-07  6:17         ` .emacs-settings.el David Kastrup
@ 2007-09-07  7:07           ` Jason Rumney
  2007-09-07  7:18             ` .emacs-settings.el David Kastrup
                               ` (2 more replies)
  0 siblings, 3 replies; 63+ messages in thread
From: Jason Rumney @ 2007-09-07  7:07 UTC (permalink / raw)
  To: David Kastrup; +Cc: Ted Zlatanov, emacs-devel

David Kastrup wrote:
> I strongly disagree.  The file won't be there without the user having
> taken some action to put it there

s/the user/a user/

On multi-user systems this could be a security risk, so it should be
disabled by default.

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

* Re: .emacs-settings.el
  2007-09-07  7:07           ` .emacs-settings.el Jason Rumney
@ 2007-09-07  7:18             ` 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
  2 siblings, 1 reply; 63+ messages in thread
From: David Kastrup @ 2007-09-07  7:18 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Ted Zlatanov, emacs-devel

Jason Rumney <jasonr@gnu.org> writes:

> David Kastrup wrote:
>> I strongly disagree.  The file won't be there without the user having
>> taken some action to put it there
>
> s/the user/a user/
>
> On multi-user systems this could be a security risk, so it should be
> disabled by default.

If we think it a security risk, we can ignore such files unless
written by the current user.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: .emacs-settings.el
  2007-09-06 23:41           ` .emacs-settings.el Tom Tromey
@ 2007-09-07  8:52             ` Juri Linkov
  0 siblings, 0 replies; 63+ messages in thread
From: Juri Linkov @ 2007-09-07  8:52 UTC (permalink / raw)
  To: tromey; +Cc: bob, monnier, emacs-devel

>>> I agree that it's a good tradition to use the same file names for
>>> a package and its data files (dirvars.el -> .emacs-dirvars,
>>> dir-locals.el -> .emacs-locals), but I don't see how this tradition
>>> applies to package.el: package.el -> .emacs-settings.el?
>>> This is confusing.
>
> Stefan> In my opinion, package.el is itself a poor name, since it
> Stefan> hints at other features such as CL packages or XEmacs
> Stefan> packages.
>
> FWIW -- it is "project.el"; "package.el" is that other thing I wrote
> that we all argue about :-)

Oops, perhaps I mistyped the package name because you are the author of
both packages.

> RMS already asked that I just put the code into files.el.  So all that
> will be left are the symbol names starting with "project-".

Hmm, in this case the package name is irrelevant for naming data files.

> Perhaps even "project" is a misnomer.  It is hard to say.  I do think
> the best use for this feature is project-specific settings.

I agree, "project" is a misnomer.  It can be used for project-specific
settings, but not necessarily limited to this.

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: .emacs-settings.el
  2007-09-07  6:19                 ` .emacs-settings.el David Kastrup
@ 2007-09-07 11:56                   ` Ted Zlatanov
  2007-09-07 15:49                   ` .emacs-settings.el Davis Herring
  1 sibling, 0 replies; 63+ messages in thread
From: Ted Zlatanov @ 2007-09-07 11:56 UTC (permalink / raw)
  To: emacs-devel

On Fri, 07 Sep 2007 08:19:00 +0200 David Kastrup <dak@gnu.org> wrote: 

DK> Ted Zlatanov <tzz@lifelogs.com> writes:
>> I think you've missed the difference between a hidden file anywhere in
>> the directory tree and in a well-known location.

DK> In a well-known location there is no reason to hide files, since the
DK> well-known location need not hold other files.

~/.profile is hidden and well-known for example.  The reason to hide it
(visual decluttering, exclusion from '*' in shell operations) is
separate from the reason to have it in a well-known location (standard
configuration interface through a specific filename).

DK> So no, I am not missing anything, and it is not polite of you to
DK> presume that anybody not agreeing with you must be stupid.

I meant that you had missed distinguishing between a hidden file
anywhere and in a well-known location *in your post*.  Sometimes I write
English a little bit differently from native speakers since it's my
fourth language; sorry if that sounded offensive to you.

Ted

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

* Re: .emacs-settings.el
  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                   ` Ted Zlatanov
  1 sibling, 0 replies; 63+ messages in thread
From: Ted Zlatanov @ 2007-09-07 12:03 UTC (permalink / raw)
  To: emacs-devel

On Fri, 07 Sep 2007 11:54:18 +0900 Miles Bader <miles.bader@necel.com> wrote: 

MB> Ted Zlatanov <tzz@lifelogs.com> writes:
>> Emacs doesn't do that AFAIK, so it would be at least a little
>> surprising to current users.  I personally think it would be a bad
>> design decision.

MB> It should be a user decision.  Just as you might not like "hidden"
MB> files, I do not like random crap cluttering my directory listings.

We agree on both of those things.  My issue was with the default that
Emacs will offer users who have not customized things.

MB> Thus Emacs should probably look for both ".foo.el" and "asdfasdf.el".

MB> (we have to be much more careful with the non-hidden name though,
MB> because it has a much higher chance of conflicting with the directory
MB> content)

That doesn't solve the issue I raised, which is that .foo.el will
*surprise* a user who didn't put it there (or forgot it) when it
overrides some setting.  As I said previously, I'm OK with just using a
dot-filename since it's the majority's opinion that it's a fine option.

Ted

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

* Re: .emacs-settings.el
  2007-09-07  7:18             ` .emacs-settings.el David Kastrup
@ 2007-09-07 12:08               ` Ted Zlatanov
  0 siblings, 0 replies; 63+ messages in thread
From: Ted Zlatanov @ 2007-09-07 12:08 UTC (permalink / raw)
  To: emacs-devel

On Fri, 07 Sep 2007 09:18:29 +0200 David Kastrup <dak@gnu.org> wrote: 

DK> Jason Rumney <jasonr@gnu.org> writes:
>> David Kastrup wrote:
>>> I strongly disagree.  The file won't be there without the user having
>>> taken some action to put it there
>> 
>> s/the user/a user/
>> 
>> On multi-user systems this could be a security risk, so it should be
>> disabled by default.

DK> If we think it a security risk, we can ignore such files unless
DK> written by the current user.

That would make the feature much less useful.  Better to interpret the
file safely and notify the user both when it happens and after the fact
as I commented previously.  It would be extremely useful to have a
shared directory on a multi-user system with standardized code
indentation settings, for instance, through this mechanism.

Ted

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

* Re: .emacs-settings.el
  2007-09-07  6:31             ` .emacs-settings.el Richard Stallman
@ 2007-09-07 12:09               ` Ted Zlatanov
  0 siblings, 0 replies; 63+ messages in thread
From: Ted Zlatanov @ 2007-09-07 12:09 UTC (permalink / raw)
  To: emacs-devel

On Fri, 07 Sep 2007 02:31:32 -0400 Richard Stallman <rms@gnu.org> wrote: 

RS>     I think surprising the user is a bad thing, so I'd rather not have a
RS>     hidden file.  The penalty of name conflicts is not as bad as using
RS>     hidden data to influence an application's behavior.

RS> I prefer a dotfile.  It will ensure no conflicts with the user's files.
RS> Dotfies are easy to see in dired.

As I said previously, I'm OK with just using a dot-filename since it's
the majority's opinion that it's a fine option.  Let's just make sure
that there's a message when the file is used, and that 
C-h v/customize-variable note the file was used as needed.

Ted

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

* Re: .emacs-settings.el
  2007-09-05 14:27 ` .emacs-settings.el Davis Herring
  2007-09-06 14:29   ` .emacs-settings.el Juri Linkov
@ 2007-09-07 12:14   ` Johannes Weiner
  2007-09-07 16:03     ` .emacs-settings.el Davis Herring
                       ` (2 more replies)
  1 sibling, 3 replies; 63+ messages in thread
From: Johannes Weiner @ 2007-09-07 12:14 UTC (permalink / raw)
  To: Davis Herring; +Cc: bob, emacs-devel


[-- 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

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

* Re: .emacs-settings.el
  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                   ` Davis Herring
  1 sibling, 0 replies; 63+ messages in thread
From: Davis Herring @ 2007-09-07 15:49 UTC (permalink / raw)
  To: David Kastrup; +Cc: Ted Zlatanov, emacs-devel

> In a well-known location there is no reason to hide files, since the
> well-known location need not hold other files.

Unless that well-known location must for some reason hold files of
interest to the user.  $HOME is an example; the root of a project's
directory tree is another.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

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

* Re: .emacs-settings.el
  2007-09-07  7:07           ` .emacs-settings.el Jason Rumney
  2007-09-07  7:18             ` .emacs-settings.el David Kastrup
@ 2007-09-07 15:52             ` Davis Herring
  2007-09-08  7:00             ` .emacs-settings.el Richard Stallman
  2 siblings, 0 replies; 63+ messages in thread
From: Davis Herring @ 2007-09-07 15:52 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Ted Zlatanov, emacs-devel

>> I strongly disagree.  The file won't be there without the user having
>> taken some action to put it there
>
> s/the user/a user/
>
> On multi-user systems this could be a security risk, so it should be
> disabled by default.

That's why the file only can contain variable settings, and why they are
run through the usual risky/unsafe variable check.  Which is good: telling
the user "here's a nice feature, but it's unsafe to use it" means that the
feature isn't so nice.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

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

* Re: .emacs-settings.el
  2007-09-07 12:14   ` .emacs-settings.el Johannes Weiner
@ 2007-09-07 16:03     ` Davis Herring
  2007-09-07 16:35     ` .emacs-settings.el Drew Adams
  2007-09-08  7:00     ` .emacs-settings.el Richard Stallman
  2 siblings, 0 replies; 63+ messages in thread
From: Davis Herring @ 2007-09-07 16:03 UTC (permalink / raw)
  To: bob, emacs-devel

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

Surely a project with 10 hackers has much more than 10 files, so that
adding one project-settings file per editor does not dwarf the real work
of the project?  I don't imagine that the settings files would need to be
synchronized or anything, since the different editors will have very
different support for the preferences of the project.

> And I would dislike to have a limited set of configuration options within
> such
> a file.

Having a (safe) local variable `project-settings-library' which would be
loaded (with confirmation) by M-x load-project-settings ("load" in its
name to emphasize that it's executing real, unconstrained Lisp) would be
an easy way to allow other configuration in a per-project way with
reasonable security; just put a setting for that variable in the
variables-only project file we're discussing now.  The only trick would be
that the filename would need to be absolute if it were specified for any
non-trivial directory tree, since one cannot run `expand-file-name' in a
local variable setting.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

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

* RE: .emacs-settings.el
  2007-09-07 12:14   ` .emacs-settings.el Johannes Weiner
  2007-09-07 16:03     ` .emacs-settings.el Davis Herring
@ 2007-09-07 16:35     ` 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
  2 siblings, 2 replies; 63+ messages in thread
From: Drew Adams @ 2007-09-07 16:35 UTC (permalink / raw)
  To: emacs-devel

I haven't followed this thread closely. Could someone please summarize the
need for which the solutions are being discussed?

If this is about users defining their preferred settings for something, and
you want such settings to be persistent, then why not use Customize instead
of adding separate preference files?

IIUC, the separate preference files proposed would control stuff in the
directories (or perhaps in the child or parent directories?) where they are
found. If so, wouldn't it be appropriate to do all of that using a single
user option that specified the directories and the preferences for the files
in those directories?

Or is the problem that these preference files are supposed to affect
multiple users, so that they cannot be in a single user's preference file?

Sorry for not following this, but I suspect others too might have lost the
thread of this thread. A brief summary of the need could help us understand
better.

If this is about a need to share preferences among multiple users, then
perhaps we could have an "import" or "include" feature for Customize that
allows sharing of some preferences. Importing would reference the imported
custom files, rather than making explicit copies of their data, so that
changes to the imported file would be reflected in the importing files.
(Perhaps this possibility of sharing preferences has been discussed before?)

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

* Re: .emacs-settings.el
  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           ` Stefan Monnier
  2007-09-08 17:47             ` .emacs-settings.el Tom Tromey
  2007-09-07 19:53           ` .emacs-settings.el Richard Stallman
  2 siblings, 1 reply; 63+ messages in thread
From: Stefan Monnier @ 2007-09-07 17:40 UTC (permalink / raw)
  To: tromey; +Cc: Ted Zlatanov, emacs-devel

Ted> Also, C-h v and customize-variable should say that project.el has
Ted> overridden a variable, so the user doesn't have to wonder.  There should
Ted> also be a user-visible message when project.el is detected and used.

> Do we do these things for file-local variables?

No.  But it would be nice for C-h v to tell the user where the buffer-local
setting comes from (e.g. from the file-local section, with a hyperlink to
it).

> I don't mind the latter, though I imagine I would consider it noise.

Agreed.

> I'd rather not do the former.  But if I must, I may need help here.
> Offhand I don't know how I'd implement it.

I don't think it's a necessary feature, but it would be a nice addition (for
for file-local and dir-local settings).  I'm not sure how to implement it
either, but I guess we could change hack-local-variables to maintain a new
(buffer-local) variable `file-local-settings' and in C-h v we check this var
to see if the variable displayed is among the ones that were set
file-locally.


        Stefan

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

* Re: .emacs-settings.el
  2007-09-06 20:50       ` .emacs-settings.el Juri Linkov
@ 2007-09-07 17:43         ` Stefan Monnier
  2007-09-07 19:53         ` .emacs-settings.el Richard Stallman
  1 sibling, 0 replies; 63+ messages in thread
From: Stefan Monnier @ 2007-09-07 17:43 UTC (permalink / raw)
  To: Juri Linkov; +Cc: tromey, bob, emacs-devel

>> FWIW my precedent here is Eclipse, which makes .project and .settings
>> directories.

This kind of "all the world is Eclipse users and screw the rest"
attitude sucks.  I see no need to adopt it.


        Stefan

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

* Re: .emacs-settings.el
  2007-09-07 16:35     ` .emacs-settings.el Drew Adams
@ 2007-09-07 18:11       ` joakim
  2007-09-08  7:01       ` .emacs-settings.el Richard Stallman
  1 sibling, 0 replies; 63+ messages in thread
From: joakim @ 2007-09-07 18:11 UTC (permalink / raw)
  To: emacs-devel

"Drew Adams" <drew.adams@oracle.com> writes:


> I haven't followed this thread closely. Could someone please summarize the
> need for which the solutions are being discussed?
>
> If this is about users defining their preferred settings for something, and
> you want such settings to be persistent, then why not use Customize instead
> of adding separate preference files?

This is, kind of, how the JDEE (java development environment for
emacs) works. There is a project.el file which is managed by custom in
some way. I dont quite remember the details, but I think the Eieio
emacs CLOS implementation is involved also somehow.

> IIUC, the separate preference files proposed would control stuff in the
> directories (or perhaps in the child or parent directories?) where they are
> found. If so, wouldn't it be appropriate to do all of that using a single
> user option that specified the directories and the preferences for the files
> in those directories?
>
> Or is the problem that these preference files are supposed to affect
> multiple users, so that they cannot be in a single user's preference file?
>
> Sorry for not following this, but I suspect others too might have lost the
> thread of this thread. A brief summary of the need could help us understand
> better.
>
> If this is about a need to share preferences among multiple users, then
> perhaps we could have an "import" or "include" feature for Customize that
> allows sharing of some preferences. Importing would reference the imported
> custom files, rather than making explicit copies of their data, so that
> changes to the imported file would be reflected in the importing files.
> (Perhaps this possibility of sharing preferences has been discussed before?)

-- 
Joakim Verona

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

* Re: .emacs-settings.el
  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-07 19:53           ` Richard Stallman
  2 siblings, 0 replies; 63+ messages in thread
From: Richard Stallman @ 2007-09-07 19:53 UTC (permalink / raw)
  To: tromey; +Cc: tzz, emacs-devel

    Ted> Also, C-h v and customize-variable should say that project.el has
    Ted> overridden a variable, so the user doesn't have to wonder.  There should
    Ted> also be a user-visible message when project.el is detected and used.

    Do we do these things for file-local variables?

C-h v does say if the variable is buffer-local.

If you think it would be useful to give more details,
please implement that.

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

* Re: .emacs-settings.el
  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         ` Richard Stallman
  2007-09-08 17:43           ` .emacs-settings.el Tom Tromey
  1 sibling, 1 reply; 63+ messages in thread
From: Richard Stallman @ 2007-09-07 19:53 UTC (permalink / raw)
  To: Juri Linkov; +Cc: tromey, bob, emacs-devel

    Then why don't use similar names in Emacs?  If the package name will
    remain project.el, then name the data file .project.el (the extension .el
    says that this data file is for Emacs, and the leading dot says that
    it's a configuration file).  If the package will be renamed to settings.el,
    then name the data file .settings.el.

If you're talking about the file name in which the code for this feature
will be installed, that will be `files.el'.

But that's irrelevant to the question at hand.  We don't choose user
interface details based on internal implementation details.

I want to use a dotfile, to keep the directory uncluttered
and to avoid constraining names of source files.  (That is the
usual purpose of dotfiles.)  If the file name ends in `.el',
then there is no need to say `emacs' in it too.  So I think
`.dirvars.el' is a good name.

I do not want to use a non-dotfile name
because that could conflict with the user's own files.

If you want to make that file more visible, make a symlink to it
with a non-hidden name.

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

* Re: .emacs-settings.el
  2007-09-07  7:07           ` .emacs-settings.el Jason Rumney
  2007-09-07  7:18             ` .emacs-settings.el David Kastrup
  2007-09-07 15:52             ` .emacs-settings.el Davis Herring
@ 2007-09-08  7:00             ` Richard Stallman
  2 siblings, 0 replies; 63+ messages in thread
From: Richard Stallman @ 2007-09-08  7:00 UTC (permalink / raw)
  To: Jason Rumney; +Cc: tzz, emacs-devel

    On multi-user systems this could be a security risk, so it should be
    disabled by default.

Better to limit it to setting safe variables.

    If we think it a security risk, we can ignore such files unless
    written by the current user.

That would make it far less useful.  If we limit this to setting safe
variables, there is no risk, so there's no reason to care who wrote
the file.

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

* Re: .emacs-settings.el
  2007-09-07 12:14   ` .emacs-settings.el Johannes Weiner
  2007-09-07 16:03     ` .emacs-settings.el Davis Herring
  2007-09-07 16:35     ` .emacs-settings.el Drew Adams
@ 2007-09-08  7:00     ` Richard Stallman
  2 siblings, 0 replies; 63+ messages in thread
From: Richard Stallman @ 2007-09-08  7:00 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: bob, emacs-devel

I've already announced the decision about this question,
so continuing to discuss it here is not useful.

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

* Re: .emacs-settings.el
  2007-09-07 16:35     ` .emacs-settings.el Drew Adams
  2007-09-07 18:11       ` .emacs-settings.el joakim
@ 2007-09-08  7:01       ` Richard Stallman
  1 sibling, 0 replies; 63+ messages in thread
From: Richard Stallman @ 2007-09-08  7:01 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel

    I haven't followed this thread closely. Could someone please summarize the
    need for which the solutions are being discussed?

Could you please take this off the list?  I've announced the decision
about what we will do for this, so further discussion is just a
distraction.

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

* Re: .emacs-settings.el
  2007-09-07 19:53         ` .emacs-settings.el Richard Stallman
@ 2007-09-08 17:43           ` Tom Tromey
  0 siblings, 0 replies; 63+ messages in thread
From: Tom Tromey @ 2007-09-08 17:43 UTC (permalink / raw)
  To: rms; +Cc: Juri Linkov, bob, emacs-devel

>>>>> "rms" == Richard Stallman <rms@gnu.org> writes:

rms> I want to use a dotfile, to keep the directory uncluttered
rms> and to avoid constraining names of source files.  (That is the
rms> usual purpose of dotfiles.)  If the file name ends in `.el',
rms> then there is no need to say `emacs' in it too.  So I think
rms> `.dirvars.el' is a good name.

FWIW -- I purposely did not choose the name "dirvars", to avoid
confusion with the existing dirvars.el and dir-locals.el packages.

However, if you feel strongly about this, I will change the name in
the next revision of the patch.

Since you're deciding stuff, would you mind weighing in on the other
proposals in this thread?  From memory this includes messaging the
user when the settings are used, modifying the C-h v output to mention
project settings, and letting the user interactively agree to risky
settings.

I'd rather not do any of these -- KISS is more my style.  Also I am a
bit lazy :-)

Tom

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

* Re: .emacs-settings.el
  2007-09-07 17:40           ` .emacs-settings.el Stefan Monnier
@ 2007-09-08 17:47             ` Tom Tromey
  2007-09-08 19:19               ` .emacs-settings.el T. V. Raman
  2007-09-09 20:06               ` .emacs-settings.el Stefan Monnier
  0 siblings, 2 replies; 63+ messages in thread
From: Tom Tromey @ 2007-09-08 17:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Ted Zlatanov, emacs-devel

>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca> writes:

[ C-h v output ]

Stefan> I don't think it's a necessary feature, but it would be a nice
Stefan> addition (for for file-local and dir-local settings).  I'm not
Stefan> sure how to implement it either, but I guess we could change
Stefan> hack-local-variables to maintain a new (buffer-local) variable
Stefan> `file-local-settings' and in C-h v we check this var to see if
Stefan> the variable displayed is among the ones that were set
Stefan> file-locally.

I was thinking about this, and it occurred to me that we could have
"false positives".  E.g., project.el might set the variable and add it
to file-local-settings, but then some later hook might setq the
variable as well.  In this situation C-h v would incorrectly say that
the variable had a project setting -- unless every setq manipulated
file-local-settings.  The reason this is bad is that the point of
mentioning this in C-h v is to avoid confusion resulting variables
magically being set -- but in this situation you would be just as
confused trying (mistakenly) to debug your .emacs-settings.el.

Tom

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

* Re: .emacs-settings.el
  2007-09-08 17:47             ` .emacs-settings.el Tom Tromey
@ 2007-09-08 19:19               ` T. V. Raman
  2007-09-08 22:17                 ` .emacs-settings.el Tom Tromey
  2007-09-09 20:06               ` .emacs-settings.el Stefan Monnier
  1 sibling, 1 reply; 63+ messages in thread
From: T. V. Raman @ 2007-09-08 19:19 UTC (permalink / raw)
  To: tromey; +Cc: tzz, monnier, emacs-devel


while we  think of project specific settings, it would also be
nice to see if we could create the ability to export a set of
related options from custom.

The new custom-themes support is nice, but it's still difficult
to do the following:

0) once you have customized a complex package, say JDEE or org,
   it's difficult to export out   settings for just that package
   into a theme that you might then take to another machine.

2) With the custom file getting large, it's increasingly creating
a single point of failure, 
  and I've also noticed that once in a while some settings get
  inexplicably lost.

As we do project specific settings, it would be really nice  to
be first able to refactor a large custom file into a set of
package-specific files,
this will make tracking down sources of multiple settings much easier.

>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
    >>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca>
    >>>>>> writes:
    Tom> [ C-h v output ]
    Tom> 
    Stefan> I don't think it's a necessary feature, but it would
    Stefan> be a nice addition (for for file-local and dir-local
    Stefan> settings).  I'm not sure how to implement it either,
    Stefan> but I guess we could change hack-local-variables to
    Stefan> maintain a new (buffer-local) variable
    Stefan> `file-local-settings' and in C-h v we check this var
    Stefan> to see if the variable displayed is among the ones
    Stefan> that were set file-locally.
    Tom> 
    Tom> I was thinking about this, and it occurred to me that we
    Tom> could have "false positives".  E.g., project.el might
    Tom> set the variable and add it to file-local-settings, but
    Tom> then some later hook might setq the variable as well.
    Tom> In this situation C-h v would incorrectly say that the
    Tom> variable had a project setting -- unless every setq
    Tom> manipulated file-local-settings.  The reason this is bad
    Tom> is that the point of mentioning this in C-h v is to
    Tom> avoid confusion resulting variables magically being set
    Tom> -- but in this situation you would be just as confused
    Tom> trying (mistakenly) to debug your .emacs-settings.el.
    Tom> 
    Tom> Tom
    Tom> 
    Tom> 
    Tom> _______________________________________________
    Tom> Emacs-devel mailing list Emacs-devel@gnu.org
    Tom> http://lists.gnu.org/mailman/listinfo/emacs-devel

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs

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

* Re: .emacs-settings.el
  2007-09-08 19:19               ` .emacs-settings.el T. V. Raman
@ 2007-09-08 22:17                 ` Tom Tromey
  2007-09-08 23:11                   ` .emacs-settings.el Juri Linkov
                                     ` (3 more replies)
  0 siblings, 4 replies; 63+ messages in thread
From: Tom Tromey @ 2007-09-08 22:17 UTC (permalink / raw)
  To: raman; +Cc: tzz, monnier, emacs-devel

>>>>> "tvr" == T V Raman <raman@users.sourceforge.net> writes:

tvr> while we  think of project specific settings, it would also be
tvr> nice to see if we could create the ability to export a set of
tvr> related options from custom.

Yeah, that's on the project.el wish-list.

Also, it would be nice if some "project-centric" things like
compile-history, gdb command lines, and the tags buffer were made
per-project; and if desktop.el understood that and saved them as such.

For me TAGS in particular comes up quite a bit, as I often edit
different branches of GCC at the same time, and if I forget to switch
TAGS files I will occasionally editing the wrong copy of a file.

I haven't gotten around to experimenting with this stuff yet.  My
Emacs wish-list is pretty long and time is limited.  Adding useful IDE
features to Emacs is one of the bigger things on the list... I love
Emacs but recent experience with Eclipse has shown me some ways that
Emacs has fallen behind.

Tom

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

* Re: .emacs-settings.el
  2007-09-08 23:11                   ` .emacs-settings.el Juri Linkov
@ 2007-09-08 23:09                     ` Tom Tromey
  0 siblings, 0 replies; 63+ messages in thread
From: Tom Tromey @ 2007-09-08 23:09 UTC (permalink / raw)
  To: Juri Linkov; +Cc: tzz, emacs-devel, raman

>>>>> "Juri" == Juri Linkov <juri@jurta.org> writes:

>> Also, it would be nice if some "project-centric" things like
>> compile-history, gdb command lines, and the tags buffer were made
>> per-project; and if desktop.el understood that and saved them as such.

Juri> Isn't this possible by setting `compile-history', `tags-file-name'
Juri> in the common file like .dirvars.el in the project's root directory?

My idea for how this feature would be used is that a project
maintainer would check in the settings file.  Then if you check out
the project and edit it, you will automatically get the correct
settings.

In this mode, it is important not to check in settings which are
things that the user might want to modify.  So, for instance, it would
be appropriate to set indentation in this file (that is a property of
the project) but not, say, c-mode's electric key settings (since that
is a preference of the user's).

Anyway ... for compile or gud, IME the settings change from time to
time and the nicest thing is to save them automatically.  I
experimented for a while with editing these in my .emacs, but that is
too heavy-weight.

Tom

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

* Re: .emacs-settings.el
  2007-09-08 22:17                 ` .emacs-settings.el Tom Tromey
@ 2007-09-08 23:11                   ` Juri Linkov
  2007-09-08 23:09                     ` .emacs-settings.el Tom Tromey
  2007-09-09  1:28                   ` .emacs-settings.el T. V. Raman
                                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 63+ messages in thread
From: Juri Linkov @ 2007-09-08 23:11 UTC (permalink / raw)
  To: tromey; +Cc: tzz, emacs-devel, raman

> Also, it would be nice if some "project-centric" things like
> compile-history, gdb command lines, and the tags buffer were made
> per-project; and if desktop.el understood that and saved them as such.

Isn't this possible by setting `compile-history', `tags-file-name'
in the common file like .dirvars.el in the project's root directory?

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: .emacs-settings.el
  2007-09-08 22:17                 ` .emacs-settings.el Tom Tromey
  2007-09-08 23:11                   ` .emacs-settings.el Juri Linkov
@ 2007-09-09  1:28                   ` T. V. Raman
  2007-09-09  8:09                   ` .emacs-settings.el David Kastrup
  2007-09-10 22:21                   ` .emacs-settings.el Davis Herring
  3 siblings, 0 replies; 63+ messages in thread
From: T. V. Raman @ 2007-09-09  1:28 UTC (permalink / raw)
  To: tromey; +Cc: tzz, emacs-devel, monnier, raman


the closest I've come across in  the emacs world is JDEE
management of  project specific settings, and I agree that emacs
could go a lot furher. 



I finally convinced myself to cut over to custom starting about 6
years ago,
and in the interim my .emacs has become more manageable --  I let
custom save its settings in a different .customie fle.
However the .custom file is now a dumping ground that brings back
nightmarish memories of the Windows registry 

>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
    >>>>>> "tvr" == T V Raman <raman@users.sourceforge.net>
    >>>>>> writes:
    tvr> while we think of project specific settings, it would
    tvr> also be nice to see if we could create the ability to
    tvr> export a set of related options from custom.
    Tom> 
    Tom> Yeah, that's on the project.el wish-list.
    Tom> 
    Tom> Also, it would be nice if some "project-centric" things
    Tom> like compile-history, gdb command lines, and the tags
    Tom> buffer were made per-project; and if desktop.el
    Tom> understood that and saved them as such.
    Tom> 
    Tom> For me TAGS in particular comes up quite a bit, as I
    Tom> often edit different branches of GCC at the same time,
    Tom> and if I forget to switch TAGS files I will occasionally
    Tom> editing the wrong copy of a file.
    Tom> 
    Tom> I haven't gotten around to experimenting with this stuff
    Tom> yet.  My Emacs wish-list is pretty long and time is
    Tom> limited.  Adding useful IDE features to Emacs is one of
    Tom> the bigger things on the list... I love Emacs but recent
    Tom> experience with Eclipse has shown me some ways that
    Tom> Emacs has fallen behind.
    Tom> 
    Tom> Tom
    Tom> 
    Tom> 
    Tom> _______________________________________________
    Tom> Emacs-devel mailing list Emacs-devel@gnu.org
    Tom> http://lists.gnu.org/mailman/listinfo/emacs-devel

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs

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

* Re: .emacs-settings.el
  2007-09-08 22:17                 ` .emacs-settings.el Tom Tromey
  2007-09-08 23:11                   ` .emacs-settings.el Juri Linkov
  2007-09-09  1:28                   ` .emacs-settings.el T. V. Raman
@ 2007-09-09  8:09                   ` David Kastrup
  2007-09-10 22:21                   ` .emacs-settings.el Davis Herring
  3 siblings, 0 replies; 63+ messages in thread
From: David Kastrup @ 2007-09-09  8:09 UTC (permalink / raw)
  To: tromey; +Cc: tzz, emacs-devel, monnier, raman

Tom Tromey <tromey@redhat.com> writes:

>>>>>> "tvr" == T V Raman <raman@users.sourceforge.net> writes:
>
> tvr> while we  think of project specific settings, it would also be
> tvr> nice to see if we could create the ability to export a set of
> tvr> related options from custom.
>
> Yeah, that's on the project.el wish-list.
>
> Also, it would be nice if some "project-centric" things like
> compile-history, gdb command lines, and the tags buffer were made
> per-project; and if desktop.el understood that and saved them as
> such.

One thing that certainly is project specific is the setting of
c-indentation-style.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: .emacs-settings.el
  2007-09-08 17:47             ` .emacs-settings.el Tom Tromey
  2007-09-08 19:19               ` .emacs-settings.el T. V. Raman
@ 2007-09-09 20:06               ` Stefan Monnier
  2007-09-10 14:08                 ` .emacs-settings.el Ted Zlatanov
  1 sibling, 1 reply; 63+ messages in thread
From: Stefan Monnier @ 2007-09-09 20:06 UTC (permalink / raw)
  To: tromey; +Cc: Ted Zlatanov, emacs-devel

Stefan> I don't think it's a necessary feature, but it would be a nice
Stefan> addition (for for file-local and dir-local settings).  I'm not
Stefan> sure how to implement it either, but I guess we could change
Stefan> hack-local-variables to maintain a new (buffer-local) variable
Stefan> `file-local-settings' and in C-h v we check this var to see if
Stefan> the variable displayed is among the ones that were set
Stefan> file-locally.

> I was thinking about this, and it occurred to me that we could have
> "false positives".  E.g., project.el might set the variable and add it

Of course.  The obvious solution is to record to value set, so if the value
is still the same, you can reasonably presume that there's still
a relationship between the setting and the variable's current value.

Of course, maybe there isn't, but most likely if the setting is a problem,
the user will see "this setting comes from ...", it will go there, remove
the file-local or project-local setting and try again and will then see that
the same problem is still present but without the "this setting comes from
..." at which it'll know that there's something more to it.


        Stefan

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

* Re: .emacs-settings.el
  2007-09-09 20:06               ` .emacs-settings.el Stefan Monnier
@ 2007-09-10 14:08                 ` Ted Zlatanov
  2007-09-12  8:46                   ` .emacs-settings.el Richard Stallman
  0 siblings, 1 reply; 63+ messages in thread
From: Ted Zlatanov @ 2007-09-10 14:08 UTC (permalink / raw)
  To: emacs-devel

On Sun, 09 Sep 2007 16:06:14 -0400 Stefan Monnier <monnier@iro.umontreal.ca> wrote: 

Stefan> I don't think it's a necessary feature, but it would be a nice
Stefan> addition (for for file-local and dir-local settings).  I'm not
Stefan> sure how to implement it either, but I guess we could change
Stefan> hack-local-variables to maintain a new (buffer-local) variable
Stefan> `file-local-settings' and in C-h v we check this var to see if
Stefan> the variable displayed is among the ones that were set
Stefan> file-locally.

>> I was thinking about this, and it occurred to me that we could have
>> "false positives".  E.g., project.el might set the variable and add it

SM> Of course.  The obvious solution is to record to value set, so if the value
SM> is still the same, you can reasonably presume that there's still
SM> a relationship between the setting and the variable's current value.

SM> Of course, maybe there isn't, but most likely if the setting is a problem,
SM> the user will see "this setting comes from ...", it will go there, remove
SM> the file-local or project-local setting and try again and will then see that
SM> the same problem is still present but without the "this setting comes from
SM> ..." at which it'll know that there's something more to it.

What about recording a stack of modifications, e.g.

this variable was created in x.el line 300
it was modified by Customize in y.el line 400
it was overridden by a buffer-local version in z.el line 500
(file and line are not always available)

I don't know how hard it is to implement this, but it would be great for
general debugging too.  If the new value of the variable could be
recorded as well (optionally), this would be even more useful.

Ted

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

* Re: .emacs-settings.el
  2007-09-08 22:17                 ` .emacs-settings.el Tom Tromey
                                     ` (2 preceding siblings ...)
  2007-09-09  8:09                   ` .emacs-settings.el David Kastrup
@ 2007-09-10 22:21                   ` Davis Herring
  3 siblings, 0 replies; 63+ messages in thread
From: Davis Herring @ 2007-09-10 22:21 UTC (permalink / raw)
  To: tromey; +Cc: tzz, emacs-devel, monnier, raman

> Also, it would be nice if some "project-centric" things like
> compile-history, gdb command lines, and the tags buffer were made
> per-project; and if desktop.el understood that and saved them as such.

desktop.el isn't supposed to save semipermanent user settings, but rather
the otherwise-ephemeral global and buffer-specific state of an editing
session.  Perhaps what you want is some sort of Custom theme-like
arrangement where the values of variables are saved back to the files from
which they were read?

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

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

* Re: .emacs-settings.el
  2007-09-10 14:08                 ` .emacs-settings.el Ted Zlatanov
@ 2007-09-12  8:46                   ` Richard Stallman
  0 siblings, 0 replies; 63+ messages in thread
From: Richard Stallman @ 2007-09-12  8:46 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: emacs-devel

    What about recording a stack of modifications, e.g.

    this variable was created in x.el line 300
    it was modified by Customize in y.el line 400
    it was overridden by a buffer-local version in z.el line 500
    (file and line are not always available)

I think that would be hard to implement
because the necessary data is not known.

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

end of thread, other threads:[~2007-09-12  8:46 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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   ` .emacs-settings.el Johannes Weiner
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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).