unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Bug for .emacs.d?
@ 2009-09-05  0:27 Angelo Graziosi
       [not found] ` <f7ccd24b0909041912k3cbf7c94h7b2d55b739c0c6bb@mail.gmail.com>
  0 siblings, 1 reply; 24+ messages in thread
From: Angelo Graziosi @ 2009-09-05  0:27 UTC (permalink / raw)
  To: Emacs

The build of current CVS creates the empty directory '~/.emacs.d', each 
time one starts Emacs, even if in the '.emacs' file there is

(setq auto-save-list-file-prefix nil)

which should prohibit that!!

This strange behavior does not happen with CVS checked out on 2009.08.27.


Cheers,
Angelo.




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

* Re: bug#4347: Bug for .emacs.d?
       [not found]       ` <jwvws44lrk1.fsf-monnier+emacsbugreports@gnu.org>
@ 2009-09-12  8:29         ` Angelo Graziosi
  2009-09-12 19:32           ` Stefan Monnier
  0 siblings, 1 reply; 24+ messages in thread
From: Angelo Graziosi @ 2009-09-12  8:29 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Juanma Barranquero, 4347, Emacs

Stefan Monnier ha scritto:
> 
> There's no question that the behavior changed.  And clearly you do not
> like it.  But ... what's the harm?
> Lots of programs create a ~/.foo directory at start.

Just a question: is the creation of this empty directory (~/.emacs.d) 
the result of a design in the code for the next Emacs 23.2 or is it a 
unexpected result of that code?


Cheers,
Angelo.




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

* Re: bug#4347: Bug for .emacs.d?
  2009-09-12  8:29         ` bug#4347: " Angelo Graziosi
@ 2009-09-12 19:32           ` Stefan Monnier
  2009-09-12 21:43             ` Angelo Graziosi
  2009-09-13 13:06             ` bug#4347: Bug for .emacs.d? Angelo Graziosi
  0 siblings, 2 replies; 24+ messages in thread
From: Stefan Monnier @ 2009-09-12 19:32 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: Juanma Barranquero, 4347, Emacs

>> There's no question that the behavior changed.  And clearly you do not
>> like it.  But ... what's the harm?
>> Lots of programs create a ~/.foo directory at start.
> Just a question: is the creation of this empty directory (~/.emacs.d) the
> result of a design in the code for the next Emacs 23.2 or is it a unexpected
> result of that code?

It's not on-purpose, no.  It's not exactly unexpected, tho.  The issue
is pretty simple: Emacs packages often can use either ~/.<foo> (old
style) or ~/.emacs.d/<foo> (new style) files to store some customization
or state.

If neither of the two files exist, we prefer to use ~/.emacs.d/<foo>,
but at the time we make this choice, we usually don't know yet whether
the file will be written, and at the time the file is written, we
generally assume that the parent directory already exists.

So the ~/.emacs.d directory is created eagerly.

In other words, this behavior is clearly not a feature, but "fixing" it
is somewhat of a pain for very little gain.


        Stefan




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

* Re: bug#4347: Bug for .emacs.d?
  2009-09-12 19:32           ` Stefan Monnier
@ 2009-09-12 21:43             ` Angelo Graziosi
  2009-09-13  2:31               ` Miles Bader
  2009-09-13 13:06             ` bug#4347: Bug for .emacs.d? Angelo Graziosi
  1 sibling, 1 reply; 24+ messages in thread
From: Angelo Graziosi @ 2009-09-12 21:43 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Juanma Barranquero, 4347, Emacs

Stefan Monnier ha scritto:
> 
> In other words, this behavior is clearly not a feature, but "fixing" it
> is somewhat of a pain for very little gain.

Sincerely, it looks a little confusing to me. But you should do what you 
think is the best.

 > And clearly you do not like it

Indeed, I don't like things which create things without a clear reason.


Cheers,
Angelo.




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

* Re: bug#4347: Bug for .emacs.d?
  2009-09-12 21:43             ` Angelo Graziosi
@ 2009-09-13  2:31               ` Miles Bader
  2009-09-13  2:57                 ` message creates ~/Mail [was Re: bug#4347: Bug for .emacs.d?] Glenn Morris
  0 siblings, 1 reply; 24+ messages in thread
From: Miles Bader @ 2009-09-13  2:31 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: Juanma Barranquero, 4347, Stefan Monnier, Emacs

Angelo Graziosi <angelo.graziosi@alice.it> writes:
> Indeed, I don't like things which create things without a clear reason.

At least it's a hidden directory though...

[unlike, for instance, the stupid "~/Desktop" etc directories, which
many GUI apps constantly recreate without]

-Miles

-- 
Alone, adj. In bad company.




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

* message creates ~/Mail [was Re: bug#4347: Bug for .emacs.d?]
  2009-09-13  2:31               ` Miles Bader
@ 2009-09-13  2:57                 ` Glenn Morris
  2009-09-13  3:23                   ` message creates ~/Mail Miles Bader
  2009-09-13  4:16                   ` Stefan Monnier
  0 siblings, 2 replies; 24+ messages in thread
From: Glenn Morris @ 2009-09-13  2:57 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel

[resend due to address typo]

Miles Bader wrote:

> At least it's a hidden directory though...
>
> [unlike, for instance, the stupid "~/Desktop" etc directories, which
> many GUI apps constantly recreate without]

On this topic, I find this behaviour of message-mode irritating:

emacs -Q
C-x m
C-x k RET

bam, you have a ~/Mail directory.




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

* Re: message creates ~/Mail
  2009-09-13  2:57                 ` message creates ~/Mail [was Re: bug#4347: Bug for .emacs.d?] Glenn Morris
@ 2009-09-13  3:23                   ` Miles Bader
  2009-09-13  8:20                     ` Reiner Steib
  2009-09-13  4:16                   ` Stefan Monnier
  1 sibling, 1 reply; 24+ messages in thread
From: Miles Bader @ 2009-09-13  3:23 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

Glenn Morris <rgm@gnu.org> writes:
>> [unlike, for instance, the stupid "~/Desktop" etc directories, which
>> many GUI apps constantly recreate without]
>
> On this topic, I find this behaviour of message-mode irritating:
...
> bam, you have a ~/Mail directory.

Hmm, yeah it probably shouldn't do that -- though it may be related to
message auto-saving, so I'm not sure it's entirely trivial to avoid --
but you can customize the directory (`message-directory').

-Miles

-- 
Run away!  Run away!




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

* Re: message creates ~/Mail
  2009-09-13  2:57                 ` message creates ~/Mail [was Re: bug#4347: Bug for .emacs.d?] Glenn Morris
  2009-09-13  3:23                   ` message creates ~/Mail Miles Bader
@ 2009-09-13  4:16                   ` Stefan Monnier
  1 sibling, 0 replies; 24+ messages in thread
From: Stefan Monnier @ 2009-09-13  4:16 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel, Miles Bader

> On this topic, I find this behaviour of message-mode irritating:

> emacs -Q
> C-x m
> C-x k RET

> bam, you have a ~/Mail directory.

I'd tend to agree.  Make it a bug-report?


        Stefan




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

* Re: message creates ~/Mail
  2009-09-13  3:23                   ` message creates ~/Mail Miles Bader
@ 2009-09-13  8:20                     ` Reiner Steib
  2009-09-13  8:56                       ` Miles Bader
  2009-09-14 19:07                       ` Glenn Morris
  0 siblings, 2 replies; 24+ messages in thread
From: Reiner Steib @ 2009-09-13  8:20 UTC (permalink / raw)
  To: emacs-devel, ding

On Sun, Sep 13 2009, Miles Bader wrote:

> Glenn Morris <rgm@gnu.org> writes:
>> On this topic, I find this behaviour of message-mode irritating:
> ...
>> bam, you have a ~/Mail directory.
>
> Hmm, yeah it probably shouldn't do that -- though it may be related to
> message auto-saving, so I'm not sure it's entirely trivial to avoid --
> but you can customize the directory (`message-directory').

Yes, it this code, I'd guess:

(defun message-set-auto-save-file-name ()
  "Associate the message buffer with a file in the drafts directory."
  (when message-auto-save-directory
    (unless (file-directory-p
	     (directory-file-name message-auto-save-directory))
      (make-directory message-auto-save-directory t))
[...]

On Sun, Sep 13 2009, Stefan Monnier wrote:

> I'd tend to agree.  Make it a bug-report?

What do you suggest to do instead?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: message creates ~/Mail
  2009-09-13  8:20                     ` Reiner Steib
@ 2009-09-13  8:56                       ` Miles Bader
  2009-09-13 11:12                         ` Daniel Clemente
  2009-09-14 19:07                       ` Glenn Morris
  1 sibling, 1 reply; 24+ messages in thread
From: Miles Bader @ 2009-09-13  8:56 UTC (permalink / raw)
  To: emacs-devel; +Cc: ding

Reiner Steib <reinersteib+gmane@imap.cc> writes:
>> I'd tend to agree.  Make it a bug-report?
>
> What do you suggest to do instead?

I suppose it could have a backup list of places to autosave mail if
message-directory doesn't exist... (e.g., "~/.emacs.d", "~", etc)?

Or perhaps, a default value for message-directory, like "~/.emacs.d/mail"
would be more generally palatable than ~/Mail.

-Miles

-- 
Accord, n. Harmony.




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

* Re: message creates ~/Mail
  2009-09-13  8:56                       ` Miles Bader
@ 2009-09-13 11:12                         ` Daniel Clemente
  0 siblings, 0 replies; 24+ messages in thread
From: Daniel Clemente @ 2009-09-13 11:12 UTC (permalink / raw)
  To: emacs-devel; +Cc: ding


> Or perhaps, a default value for message-directory, like "~/.emacs.d/mail"
> would be more generally palatable than ~/Mail.

  And it would make clear that this directory is only related to Emacs, and not to any other client like mutt or Thunderbird.






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

* Re: bug#4347: Bug for .emacs.d?
  2009-09-12 19:32           ` Stefan Monnier
  2009-09-12 21:43             ` Angelo Graziosi
@ 2009-09-13 13:06             ` Angelo Graziosi
  2009-09-13 13:35               ` Juanma Barranquero
  2009-09-13 14:04               ` Stefan Monnier
  1 sibling, 2 replies; 24+ messages in thread
From: Angelo Graziosi @ 2009-09-13 13:06 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Juanma Barranquero, 4347, Emacs

Stefan Monnier ha scritto:
>>> There's no question that the behavior changed.  And clearly you do not
>>> like it.  But ... what's the harm?
>>> Lots of programs create a ~/.foo directory at start.
>> Just a question: is the creation of this empty directory (~/.emacs.d) the
>> result of a design in the code for the next Emacs 23.2 or is it a unexpected
>> result of that code?
> 
> It's not on-purpose, no.  It's not exactly unexpected, tho.  The issue
> is pretty simple: Emacs packages often can use either ~/.<foo> (old
> style) or ~/.emacs.d/<foo> (new style) files to store some customization
> or state.
> 
> If neither of the two files exist, we prefer to use ~/.emacs.d/<foo>,
> but at the time we make this choice, we usually don't know yet whether
> the file will be written, and at the time the file is written, we
> generally assume that the parent directory already exists.
> 
> So the ~/.emacs.d directory is created eagerly.
> 
> In other words, this behavior is clearly not a feature, but "fixing" it
> is somewhat of a pain for very little gain.

OK. If you want to give a more deep meaning to that ~/-emacs.d 
directory, you can left that Emacs creates it, *and* move ALL 
files/directories which Emacs creates in $HOME, there!!

So, instead to have:

~/.emacs
~/.emacs.desktop
~/.emacs.desktop.lock
...

we could have:

~/.emacs.d/.emacs
~/.emacs.d/.emacs.desktop
~/.emacs.d/.emacs.desktop.lock
~/.emacs.d/mail
...

In this way we could have a more clean HOME!!!


Cheers,
Angelo.





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

* Re: bug#4347: Bug for .emacs.d?
  2009-09-13 13:06             ` bug#4347: Bug for .emacs.d? Angelo Graziosi
@ 2009-09-13 13:35               ` Juanma Barranquero
  2009-09-13 13:48                 ` Angelo Graziosi
  2009-09-13 14:04               ` Stefan Monnier
  1 sibling, 1 reply; 24+ messages in thread
From: Juanma Barranquero @ 2009-09-13 13:35 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: 4347, Emacs

On Sun, Sep 13, 2009 at 15:06, Angelo Graziosi <angelo.graziosi@alice.it> wrote:

> OK. If you want to give a more deep meaning to that ~/-emacs.d directory,
> you can left that Emacs creates it, *and* move ALL files/directories which
> Emacs creates in $HOME, there!!

It'd be good to have more of them in ~/.emacs.d by default, but
currently you can use

> ~/.emacs.d/.emacs

~/.emacs.d/init.el instead

> ~/.emacs.d/.emacs.desktop
> ~/.emacs.d/.emacs.desktop.lock

and desktop-base-(file|lock)-name to assign these.

    Juanma




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

* Re: bug#4347: Bug for .emacs.d?
  2009-09-13 13:35               ` Juanma Barranquero
@ 2009-09-13 13:48                 ` Angelo Graziosi
  0 siblings, 0 replies; 24+ messages in thread
From: Angelo Graziosi @ 2009-09-13 13:48 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 4347, Emacs

Juanma Barranquero ha scritto:
> On Sun, Sep 13, 2009 at 15:06, Angelo Graziosi <angelo.graziosi@alice.it> wrote:
> 
>> OK. If you want to give a more deep meaning to that ~/-emacs.d directory,
>> you can left that Emacs creates it, *and* move ALL files/directories which
>> Emacs creates in $HOME, there!!
> 
> It'd be good to have more of them in ~/.emacs.d by default, but
> currently you can use
> 
>> ~/.emacs.d/.emacs
> 
> ~/.emacs.d/init.el instead
> 
>> ~/.emacs.d/.emacs.desktop
>> ~/.emacs.d/.emacs.desktop.lock
> 
> and desktop-base-(file|lock)-name to assign these.

Oh yes, but I was asking *by default*, of course. :-)

Cheers,
Angelo.






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

* Re: bug#4347: Bug for .emacs.d?
  2009-09-13 13:06             ` bug#4347: Bug for .emacs.d? Angelo Graziosi
  2009-09-13 13:35               ` Juanma Barranquero
@ 2009-09-13 14:04               ` Stefan Monnier
  2009-09-13 14:12                 ` Angelo Graziosi
  2009-09-13 16:06                 ` desktop and ~/.emacs.d/ (was: bug#4347: Bug for .emacs.d?) Reiner Steib
  1 sibling, 2 replies; 24+ messages in thread
From: Stefan Monnier @ 2009-09-13 14:04 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: Juanma Barranquero, 4347, Emacs

> So, instead to have:

> ~/.emacs
> ~/.emacs.desktop
> ~/.emacs.desktop.lock
> ...

> we could have:

> ~/.emacs.d/.emacs
> ~/.emacs.d/.emacs.desktop
> ~/.emacs.d/.emacs.desktop.lock
> ~/.emacs.d/mail
> ...

> In this way we could have a more clean HOME!!!

That's the intention.  Currently the strategy is to keep using the old
name if the file already exists, and to use the new name otherwise.

The strategy is not completely consistent in how to do it, because most
files in ~/.emacs.d are files which in $HOME should be hidden, but in
~/.emacs.d they don't have any reason to be hidden any more (nor to
include "emacs" in their name), so often the file in ~/.emacs.d doesn't
have the same name as in ~.  In the case of desktop.el, OTOH you can
indeed move ~/.emacs.desktop to ~/.emacs.d.


        Stefan




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

* Re: bug#4347: Bug for .emacs.d?
  2009-09-13 14:04               ` Stefan Monnier
@ 2009-09-13 14:12                 ` Angelo Graziosi
  2009-09-13 17:41                   ` Juanma Barranquero
  2009-09-13 16:06                 ` desktop and ~/.emacs.d/ (was: bug#4347: Bug for .emacs.d?) Reiner Steib
  1 sibling, 1 reply; 24+ messages in thread
From: Angelo Graziosi @ 2009-09-13 14:12 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Juanma Barranquero, 4347, Emacs

Stefan Monnier ha scritto:
>> So, instead to have:
> 
>> ~/.emacs
>> ~/.emacs.desktop
>> ~/.emacs.desktop.lock
>> ...
> 
>> we could have:
> 
>> ~/.emacs.d/.emacs
>> ~/.emacs.d/.emacs.desktop
>> ~/.emacs.d/.emacs.desktop.lock
>> ~/.emacs.d/mail
>> ...
> 
>> In this way we could have a more clean HOME!!!
> 
> That's the intention.  Currently the strategy is to keep using the old
> name if the file already exists, and to use the new name otherwise.
> 
> The strategy is not completely consistent in how to do it, because most
> files in ~/.emacs.d are files which in $HOME should be hidden, but in
> ~/.emacs.d they don't have any reason to be hidden any more (nor to
> include "emacs" in their name), so often the file in ~/.emacs.d doesn't
> have the same name as in ~.  In the case of desktop.el, OTOH you can
> indeed move ~/.emacs.desktop to ~/.emacs.d.

Obviously one can have:

~/.emacs.d/init                  (instead of .emacs)
~/.emacs.d/desktop               (instead of .emacs.desktop)
~/.emacs.d/desktop.lock          (instead of .emacs.desktop.lock)
~/.emacs.d/mail

and so on.

When will all the above be implemented?


Cheers,
Angelo.




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

* desktop and ~/.emacs.d/ (was: bug#4347: Bug for .emacs.d?)
  2009-09-13 14:04               ` Stefan Monnier
  2009-09-13 14:12                 ` Angelo Graziosi
@ 2009-09-13 16:06                 ` Reiner Steib
  2009-09-14  1:26                   ` desktop and ~/.emacs.d/ Stefan Monnier
  1 sibling, 1 reply; 24+ messages in thread
From: Reiner Steib @ 2009-09-13 16:06 UTC (permalink / raw)
  To: emacs-devel

On Sun, Sep 13 2009, Stefan Monnier wrote:

> In the case of desktop.el, OTOH you can indeed move ~/.emacs.desktop
> to ~/.emacs.d.

You need to cd to ~/.emacs.d/ before starting Emacs or add
"~/.emacs.d" to `desktop-path' to make it work as in ~/.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/





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

* Re: bug#4347: Bug for .emacs.d?
  2009-09-13 14:12                 ` Angelo Graziosi
@ 2009-09-13 17:41                   ` Juanma Barranquero
  0 siblings, 0 replies; 24+ messages in thread
From: Juanma Barranquero @ 2009-09-13 17:41 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: 4347, Stefan Monnier, Emacs

On Sun, Sep 13, 2009 at 16:12, Angelo Graziosi <angelo.graziosi@alice.it> wrote:

> Obviously one can have:
>
> ~/.emacs.d/init                  (instead of .emacs)
> ~/.emacs.d/desktop               (instead of .emacs.desktop)
> ~/.emacs.d/desktop.lock          (instead of .emacs.desktop.lock)
> ~/.emacs.d/mail
>
> and so on.
>
> When will all the above be implemented?

~/.emacs.d/init.el is already implemented; just move and rename your .emacs.

As for .emacs.desktop and .emacs.deskop.lock, they are not necessarily
found only on $HOME; you can have desktop files in every project's
directory, for example. So it does not make much sense to force them
to ~/.emacs.d/desktop; and if you do want them there, you already have
the means to make it so.

    Juanma




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

* Re: desktop and ~/.emacs.d/
  2009-09-13 16:06                 ` desktop and ~/.emacs.d/ (was: bug#4347: Bug for .emacs.d?) Reiner Steib
@ 2009-09-14  1:26                   ` Stefan Monnier
  2009-09-14  1:30                     ` Juanma Barranquero
  2009-09-14 14:22                     ` Davis Herring
  0 siblings, 2 replies; 24+ messages in thread
From: Stefan Monnier @ 2009-09-14  1:26 UTC (permalink / raw)
  To: emacs-devel

>> In the case of desktop.el, OTOH you can indeed move ~/.emacs.desktop
>> to ~/.emacs.d.

> You need to cd to ~/.emacs.d/ before starting Emacs or add
> "~/.emacs.d" to `desktop-path' to make it work as in ~/.

Duh! Sorry, I've made that change locally so long ago that I forgot that
it's not yet standard.
Any objection to the patch below?


        Stefan


--- desktop.el.~1.137.~	2009-08-12 00:33:24.000000000 -0400
+++ desktop.el	2009-09-13 21:26:00.000000000 -0400
@@ -220,7 +220,7 @@
   :group 'desktop
   :version "22.2")
 
-(defcustom desktop-path '("." "~")
+(defcustom desktop-path (list "." user-emacs-directory "~")
   "List of directories to search for the desktop file.
 The base name of the file is specified in `desktop-base-file-name'."
   :type '(repeat directory)




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

* Re: desktop and ~/.emacs.d/
  2009-09-14  1:26                   ` desktop and ~/.emacs.d/ Stefan Monnier
@ 2009-09-14  1:30                     ` Juanma Barranquero
  2009-09-14 14:22                     ` Davis Herring
  1 sibling, 0 replies; 24+ messages in thread
From: Juanma Barranquero @ 2009-09-14  1:30 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On Mon, Sep 14, 2009 at 03:26, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> Duh! Sorry, I've made that change locally so long ago that I forgot that
> it's not yet standard.

I set desktop-path to that exact value in my .emacs, too.

    Juanma




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

* Re: desktop and ~/.emacs.d/
  2009-09-14  1:26                   ` desktop and ~/.emacs.d/ Stefan Monnier
  2009-09-14  1:30                     ` Juanma Barranquero
@ 2009-09-14 14:22                     ` Davis Herring
  2009-09-14 14:43                       ` Lennart Borgman
  1 sibling, 1 reply; 24+ messages in thread
From: Davis Herring @ 2009-09-14 14:22 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> Duh! Sorry, I've made that change locally so long ago that I forgot that
> it's not yet standard.
> Any objection to the patch below?

Sounds fine to me; in fact, it might make sense for .emacs.d to be offered
as the default location (rather than the directory current at the first
invocation of `desktop-save', that `interactive' picks).

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] 24+ messages in thread

* Re: desktop and ~/.emacs.d/
  2009-09-14 14:22                     ` Davis Herring
@ 2009-09-14 14:43                       ` Lennart Borgman
  2009-09-14 15:17                         ` Davis Herring
  0 siblings, 1 reply; 24+ messages in thread
From: Lennart Borgman @ 2009-09-14 14:43 UTC (permalink / raw)
  To: herring; +Cc: Stefan Monnier, emacs-devel

On Mon, Sep 14, 2009 at 4:22 PM, Davis Herring <herring@lanl.gov> wrote:
>> Duh! Sorry, I've made that change locally so long ago that I forgot that
>> it's not yet standard.
>> Any objection to the patch below?
>
> Sounds fine to me; in fact, it might make sense for .emacs.d to be offered
> as the default location (rather than the directory current at the first
> invocation of `desktop-save', that `interactive' picks).

A very welcome patch... ;-)




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

* Re: desktop and ~/.emacs.d/
  2009-09-14 14:43                       ` Lennart Borgman
@ 2009-09-14 15:17                         ` Davis Herring
  0 siblings, 0 replies; 24+ messages in thread
From: Davis Herring @ 2009-09-14 15:17 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: Stefan Monnier, emacs-devel

>> Sounds fine to me; in fact, it might make sense for .emacs.d to be
>> offered as the default location (rather than the directory current at
>> the first invocation of `desktop-save', that `interactive' picks).
>
> A very welcome patch... ;-)

Hey, isn't that my line? ;)

It occurs to me that `user-emacs-directory' isn't always the right
default, because if you want to create multiple desktops, you'll probably
want them near some file that's current when you issue `desktop-save'.  So
here's a heuristic: if `desktop-dirname' is nil, so no desktop is loaded,
offer `user-emacs-directory' as a default; otherwise offer the current
directory as before.  The only place this seems wrong is when you, say,
abort loading ~/.emacs.d/.emacs.desktop, so that the default would
overwrite it when you probably meant to make a new one elsewhere.  But
it's safe: `desktop-save' will prompt intelligently before overwriting it.

Davis

*** cvs/desktop.el	2009-09-14 08:46:20.910215000 -0600
--- new/desktop.el	2009-09-14 09:09:17.649462000 -0600
***************
*** 519,524 ****
--- 519,528 ----
  (defvar desktop-dirname nil
    "The directory in which the desktop file should be saved.")

+ (defun desktop-read-dirname ()
+   (read-directory-name "Directory to save desktop file in: "
+ 		       (and (not desktop-dirname) user-emacs-directory) nil t))
+
  (defun desktop-full-file-name (&optional dirname)
    "Return the full name of the desktop file in DIRNAME.
  DIRNAME omitted or nil means use `desktop-dirname'."
***************
*** 625,634 ****
                          (and exists (eq desktop-save 'ask-if-exists)))
                      (y-or-n-p "Save desktop? ")))))
      (unless desktop-dirname
!       (setq desktop-dirname
!             (file-name-as-directory
!              (expand-file-name
! 	      (read-directory-name "Directory for desktop file: " nil nil t)))))
      (condition-case err
  	(desktop-save desktop-dirname t)
        (file-error
--- 629,636 ----
                          (and exists (eq desktop-save 'ask-if-exists)))
                      (y-or-n-p "Save desktop? ")))))
      (unless desktop-dirname
!       (setq desktop-dirname (file-name-as-directory
! 			     (expand-file-name (desktop-read-dirname)))))
      (condition-case err
  	(desktop-save desktop-dirname t)
        (file-error
***************
*** 850,856 ****
  Parameter DIRNAME specifies where to save the desktop file.
  Optional parameter RELEASE says whether we're done with this desktop.
  See also `desktop-base-file-name'."
!   (interactive "DDirectory to save desktop file in: ")
    (setq desktop-dirname (file-name-as-directory (expand-file-name
dirname)))
    (save-excursion
      (let ((eager desktop-restore-eager)
--- 852,858 ----
  Parameter DIRNAME specifies where to save the desktop file.
  Optional parameter RELEASE says whether we're done with this desktop.
  See also `desktop-base-file-name'."
!   (interactive (list (desktop-read-dirname)))
    (setq desktop-dirname (file-name-as-directory (expand-file-name
dirname)))
    (save-excursion
      (let ((eager desktop-restore-eager)

-- 
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] 24+ messages in thread

* Re: message creates ~/Mail
  2009-09-13  8:20                     ` Reiner Steib
  2009-09-13  8:56                       ` Miles Bader
@ 2009-09-14 19:07                       ` Glenn Morris
  1 sibling, 0 replies; 24+ messages in thread
From: Glenn Morris @ 2009-09-14 19:07 UTC (permalink / raw)
  To: emacs-devel; +Cc: ding

Reiner Steib wrote:

> On Sun, Sep 13 2009, Stefan Monnier wrote:
>
>> Make it a bug-report?

#4432

> What do you suggest to do instead?

I'm reporting it partly as another difference from mail-mode, which
used ~ for this IIUC.




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

end of thread, other threads:[~2009-09-14 19:07 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-05  0:27 Bug for .emacs.d? Angelo Graziosi
     [not found] ` <f7ccd24b0909041912k3cbf7c94h7b2d55b739c0c6bb@mail.gmail.com>
     [not found]   ` <jwv1vmdnsu6.fsf-monnier+emacsbugreports@gnu.org>
     [not found]     ` <4AAABF56.40802@alice.it>
     [not found]       ` <jwvws44lrk1.fsf-monnier+emacsbugreports@gnu.org>
2009-09-12  8:29         ` bug#4347: " Angelo Graziosi
2009-09-12 19:32           ` Stefan Monnier
2009-09-12 21:43             ` Angelo Graziosi
2009-09-13  2:31               ` Miles Bader
2009-09-13  2:57                 ` message creates ~/Mail [was Re: bug#4347: Bug for .emacs.d?] Glenn Morris
2009-09-13  3:23                   ` message creates ~/Mail Miles Bader
2009-09-13  8:20                     ` Reiner Steib
2009-09-13  8:56                       ` Miles Bader
2009-09-13 11:12                         ` Daniel Clemente
2009-09-14 19:07                       ` Glenn Morris
2009-09-13  4:16                   ` Stefan Monnier
2009-09-13 13:06             ` bug#4347: Bug for .emacs.d? Angelo Graziosi
2009-09-13 13:35               ` Juanma Barranquero
2009-09-13 13:48                 ` Angelo Graziosi
2009-09-13 14:04               ` Stefan Monnier
2009-09-13 14:12                 ` Angelo Graziosi
2009-09-13 17:41                   ` Juanma Barranquero
2009-09-13 16:06                 ` desktop and ~/.emacs.d/ (was: bug#4347: Bug for .emacs.d?) Reiner Steib
2009-09-14  1:26                   ` desktop and ~/.emacs.d/ Stefan Monnier
2009-09-14  1:30                     ` Juanma Barranquero
2009-09-14 14:22                     ` Davis Herring
2009-09-14 14:43                       ` Lennart Borgman
2009-09-14 15:17                         ` Davis Herring

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