all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bug for .emacs.d?
@ 2009-09-05  0:27 Angelo Graziosi
  2009-09-05  2:12 ` bug#4347: " Juanma Barranquero
  0 siblings, 1 reply; 42+ 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] 42+ messages in thread

* bug#4347: Bug for .emacs.d?
  2009-09-05  0:27 Bug for .emacs.d? Angelo Graziosi
@ 2009-09-05  2:12 ` Juanma Barranquero
  2009-09-11 20:23   ` Stefan Monnier
  0 siblings, 1 reply; 42+ messages in thread
From: Juanma Barranquero @ 2009-09-05  2:12 UTC (permalink / raw)
  To: Angelo Graziosi

Package: emacs
Version: 23.1.50
X-Debbugs-CC: monnier@iro.umontreal.ca

On Sat, Sep 5, 2009 at 02:27, Angelo Graziosi<angelo.graziosi@alice.it> wrote:

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

`auto-save-list-file-prefix' does not do that. It controls the path
for auto-save files, but there are many packages that use the value of
`user-emacs-directory', so you cannot rely on auto-save-list-prefix to
determine whether ~/.emacs.d will be created or not.

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

Yes, this is really a regression. It is caused by this change:

2009-08-29  Stefan Monnier  <monnier@iro.umontreal.ca>

	* paths.el (abbrev-file-name): Move to abbrev.el.
	* abbrev.el (abbrev-file-name): Move from paths.el.
	Obey user-emacs-directory.
	* calc/calc.el (calc-settings-file): Don't autoload and instead obey
	user-emacs-directory.
	* dos-fns.el (dos-reevaluate-defcustoms): Don't reevaluate
	abbrev-file-name and calc-settings-file any more.
	* startup.el (command-line): Recompute abbrev-file-name and
	abbreviated-home-dir.
	[...]

    Juanma





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

* bug#4347: Bug for .emacs.d?
  2009-09-05  2:12 ` bug#4347: " Juanma Barranquero
@ 2009-09-11 20:23   ` Stefan Monnier
  2009-09-11 20:34     ` Juanma Barranquero
  2009-09-11 21:21     ` Angelo Graziosi
  0 siblings, 2 replies; 42+ messages in thread
From: Stefan Monnier @ 2009-09-11 20:23 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 4347, Angelo Graziosi

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

Just so I understand better: is the problem that ~/.emacs.d is created
at build-time, or that it's created at run-time?

IIUC it's done both times right now.  The build-time case is a bug
(which I think should be fixed along the lines of the patch below), but
w.r.t the run-time case, I'm not convinced it's a bug.


        Stefan


Index: lisp/abbrev.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/abbrev.el,v
retrieving revision 1.83
diff -u -r1.83 abbrev.el
--- lisp/abbrev.el	29 Aug 2009 19:22:44 -0000	1.83
+++ lisp/abbrev.el	11 Sep 2009 20:20:26 -0000
@@ -40,7 +40,8 @@
 
 (defcustom abbrev-file-name
   (locate-user-emacs-file "abbrev_defs" ".abbrev_defs")
-  "Default name of file to read abbrevs from."
+  "Default name of file from which to read abbrevs."
+  :initialize 'custom-initialize-delay
   :type 'file)
 
 (defcustom only-global-abbrevs nil
Index: lisp/custom.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/custom.el,v
retrieving revision 1.146
diff -u -r1.146 custom.el
--- lisp/custom.el	5 Jan 2009 03:18:51 -0000	1.146
+++ lisp/custom.el	11 Sep 2009 20:20:27 -0000
@@ -130,6 +119,17 @@
 	(t
 	 (set-default symbol (eval value)))))
 
+(defvar custom-delayed-init-variables nil
+  "List of variables whose initialization is pending.")
+
+(defun custom-initialize-delay (symbol value)
+  "Delay initialization of SYMBOL to the next Emacs start.
+This is used in files that are preloaded, so that the initialization is
+done in the run-time context rather than the build-time context.
+SYMBOL is temporarily initialized to nil."
+  (set symbol nil)
+  (push symbol custom-delayed-init-variables))
+
 (defun custom-declare-variable (symbol default doc &rest args)
   "Like `defcustom', but SYMBOL and DEFAULT are evaluated as normal arguments.
 DEFAULT should be an expression to evaluate to compute the default value,
Index: lisp/files.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/files.el,v
retrieving revision 1.1080
diff -u -r1.1080 files.el
--- lisp/files.el	7 Sep 2009 15:23:12 -0000	1.1080
+++ lisp/files.el	11 Sep 2009 20:20:31 -0000
@@ -204,6 +204,7 @@
 by programs that create small temporary files.  This is for systems that
 have fast storage with limited space, such as a RAM disk."
   :group 'files
+  :initialize 'custom-initialize-delay
   :type '(choice (const nil) directory))
 
 ;; The system null device. (Should reference NULL_DEVICE from C.)
@@ -385,6 +386,7 @@
   :group 'auto-save
   :type '(repeat (list (string :tag "Regexp") (string :tag "Replacement")
 					   (boolean :tag "Uniquify")))
+  :initialize 'custom-initialize-delay
   :version "21.1")
 
 (defcustom save-abbrevs t





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

* bug#4347: Bug for .emacs.d?
  2009-09-11 20:23   ` Stefan Monnier
@ 2009-09-11 20:34     ` Juanma Barranquero
  2009-09-11 21:21     ` Angelo Graziosi
  1 sibling, 0 replies; 42+ messages in thread
From: Juanma Barranquero @ 2009-09-11 20:34 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 4347, Angelo Graziosi

> Just so I understand better: is the problem that ~/.emacs.d is created
> at build-time, or that it's created at run-time?

Both, I'd say.

> IIUC it's done both times right now.  The build-time case is a bug
> (which I think should be fixed along the lines of the patch below)

I'll test it ASAP.

> but w.r.t the run-time case, I'm not convinced it's a bug.

I think it is. There's no way to prevent its creation:

  C:\temp> set HOME=C:\temp
  C:\temp> dir
                  0 bytes in 0 files and 0 dirs

  C:\temp> emacs -Q --eval "(setq user-emacs-directory \"C:/otherdir/\")"
  C:\temp> dir
  1/09/2009  22:29         <DIR>    .emacs.d
                   0 bytes in 0 files and 1 dir

while before, simply doing "emacs -Q" followed by C-x C-c wouldn't
create ~/.emacs.d/.

    Juanma





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

* bug#4347: Bug for .emacs.d?
  2009-09-11 20:23   ` Stefan Monnier
  2009-09-11 20:34     ` Juanma Barranquero
@ 2009-09-11 21:21     ` Angelo Graziosi
  2009-09-12  4:25       ` Stefan Monnier
  1 sibling, 1 reply; 42+ messages in thread
From: Angelo Graziosi @ 2009-09-11 21:21 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Juanma Barranquero, 4347

Stefan Monnier ha scritto:
> 
> Just so I understand better: is the problem that ~/.emacs.d is created
> at build-time, or that it's created at run-time?

It is created at run-time, unless it is created previously. This happens 
both on Cygwin and GNU/Linux Kubuntu 8.04 and 9.04.

They are a few years I use Emacs without seeing any empty '~/.emacs.d' 
directory at its start, and from August 29, 2009, instead, it happens...

It is a bug, unless someone explains why Emacs, NOW, have to create that 
empty directory when it starts.


Cheers,
Angelo.





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

* bug#4347: Bug for .emacs.d?
  2009-09-11 21:21     ` Angelo Graziosi
@ 2009-09-12  4:25       ` Stefan Monnier
  2009-09-12  8:29         ` Angelo Graziosi
                           ` (2 more replies)
  0 siblings, 3 replies; 42+ messages in thread
From: Stefan Monnier @ 2009-09-12  4:25 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: Juanma Barranquero, 4347

>> Just so I understand better: is the problem that ~/.emacs.d is created
>> at build-time, or that it's created at run-time?

> It is created at run-time, unless it is created previously. This happens
> both on Cygwin and GNU/Linux Kubuntu 8.04 and 9.04.

> They are a few years I use Emacs without seeing any empty '~/.emacs.d'
> directory at its start, and from August 29, 2009, instead, it happens...

> It is a bug, unless someone explains why Emacs, NOW, have to create that
> empty directory when it starts.

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.


        Stefan





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

* bug#4347: Bug for .emacs.d?
  2009-09-12  4:25       ` Stefan Monnier
  2009-09-12  8:29         ` Angelo Graziosi
@ 2009-09-12  8:29         ` Angelo Graziosi
  2009-09-12 11:16         ` Juanma Barranquero
  2 siblings, 0 replies; 42+ 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] 42+ messages in thread

* Re: bug#4347: Bug for .emacs.d?
  2009-09-12  4:25       ` Stefan Monnier
@ 2009-09-12  8:29         ` Angelo Graziosi
  2009-09-12 19:32           ` Stefan Monnier
  2009-09-12 19:32           ` Stefan Monnier
  2009-09-12  8:29         ` Angelo Graziosi
  2009-09-12 11:16         ` Juanma Barranquero
  2 siblings, 2 replies; 42+ 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] 42+ messages in thread

* bug#4347: Bug for .emacs.d?
  2009-09-12  4:25       ` Stefan Monnier
  2009-09-12  8:29         ` Angelo Graziosi
  2009-09-12  8:29         ` Angelo Graziosi
@ 2009-09-12 11:16         ` Juanma Barranquero
  2009-09-12 19:38           ` Stefan Monnier
  2 siblings, 1 reply; 42+ messages in thread
From: Juanma Barranquero @ 2009-09-12 11:16 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 4347, Angelo Graziosi

On Sat, Sep 12, 2009 at 06:25, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> There's no question that the behavior changed.  And clearly you do not
> like it.  But ... what's the harm?

IMHO, the harm is that the very existence of `user-emacs-directory'
implies that the users can change it to suit their tastes. How do you
force Emacs now to create ~/.emacs.d with another name?

> Lots of programs create a ~/.foo directory at start.

And in the best of them, there's usually a way to change both .foo's
name, and where is it created.

    Juanma





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

* bug#4347: Bug for .emacs.d?
  2009-09-12  8:29         ` Angelo Graziosi
@ 2009-09-12 19:32           ` Stefan Monnier
  2009-09-12 19:32           ` Stefan Monnier
  1 sibling, 0 replies; 42+ 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] 42+ messages in thread

* Re: bug#4347: Bug for .emacs.d?
  2009-09-12  8:29         ` Angelo Graziosi
  2009-09-12 19:32           ` Stefan Monnier
@ 2009-09-12 19:32           ` Stefan Monnier
  2009-09-12 21:43             ` Angelo Graziosi
                               ` (3 more replies)
  1 sibling, 4 replies; 42+ 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] 42+ messages in thread

* bug#4347: Bug for .emacs.d?
  2009-09-12 11:16         ` Juanma Barranquero
@ 2009-09-12 19:38           ` Stefan Monnier
  2009-09-12 19:42             ` Juanma Barranquero
  0 siblings, 1 reply; 42+ messages in thread
From: Stefan Monnier @ 2009-09-12 19:38 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 4347, Angelo Graziosi

>> There's no question that the behavior changed.  And clearly you do not
>> like it.  But ... what's the harm?

> IMHO, the harm is that the very existence of `user-emacs-directory'
> implies that the users can change it to suit their tastes.

If you prefer we can hardcode it in locate-user-emacs-file.  Notice that
it's not a defcustom, not a defvar with a *, not even a defvar without
a *, but a defconst.  So no, it's not meant to be changed.

> How do you force Emacs now to create ~/.emacs.d with another name?

You don't.  Just like you don't request Emacs to use another name
than ~/.emacs.  All you can do is set $HOME to use a .emacs or .emacs.d
in another directory.


        Stefan





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

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

On Sat, Sep 12, 2009 at 21:38, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> If you prefer we can hardcode it in locate-user-emacs-file.  Notice that
> it's not a defcustom, not a defvar with a *, not even a defvar without
> a *, but a defconst.  So no, it's not meant to be changed.

Ah, my mistake. No, I prefer having `user-emacs-directory', and
perhaps making a bit more clear in its docstring that it is not meant
to be changed.

    Juanma





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

* bug#4347: Bug for .emacs.d?
  2009-09-12 19:32           ` Stefan Monnier
  2009-09-12 21:43             ` Angelo Graziosi
@ 2009-09-12 21:43             ` Angelo Graziosi
  2009-09-13 13:06             ` Angelo Graziosi
  2009-09-13 13:06             ` Angelo Graziosi
  3 siblings, 0 replies; 42+ 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] 42+ 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  2:31               ` bug#4347: Bug for .emacs.d? Miles Bader
  2009-09-12 21:43             ` Angelo Graziosi
                               ` (2 subsequent siblings)
  3 siblings, 2 replies; 42+ 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] 42+ messages in thread

* bug#4347: Bug for .emacs.d?
  2009-09-12 21:43             ` Angelo Graziosi
  2009-09-13  2:31               ` Miles Bader
@ 2009-09-13  2:31               ` Miles Bader
  1 sibling, 0 replies; 42+ messages in thread
From: Miles Bader @ 2009-09-13  2:31 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: Juanma Barranquero, 4347, 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] 42+ 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
  2009-09-13  2:31               ` bug#4347: Bug for .emacs.d? Miles Bader
  1 sibling, 1 reply; 42+ 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] 42+ 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; 42+ 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] 42+ 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; 42+ 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] 42+ 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; 42+ 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] 42+ 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; 42+ 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] 42+ 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; 42+ 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] 42+ 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; 42+ 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] 42+ messages in thread

* bug#4347: Bug for .emacs.d?
  2009-09-12 19:32           ` Stefan Monnier
                               ` (2 preceding siblings ...)
  2009-09-13 13:06             ` Angelo Graziosi
@ 2009-09-13 13:06             ` Angelo Graziosi
  3 siblings, 0 replies; 42+ 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] 42+ 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-12 21:43             ` Angelo Graziosi
@ 2009-09-13 13:06             ` Angelo Graziosi
  2009-09-13 13:35               ` Juanma Barranquero
                                 ` (3 more replies)
  2009-09-13 13:06             ` Angelo Graziosi
  3 siblings, 4 replies; 42+ 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] 42+ messages in thread

* bug#4347: Bug for .emacs.d?
  2009-09-13 13:06             ` Angelo Graziosi
@ 2009-09-13 13:35               ` Juanma Barranquero
  2009-09-13 13:35               ` Juanma Barranquero
                                 ` (2 subsequent siblings)
  3 siblings, 0 replies; 42+ 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] 42+ messages in thread

* Re: bug#4347: Bug for .emacs.d?
  2009-09-13 13:06             ` Angelo Graziosi
  2009-09-13 13:35               ` Juanma Barranquero
@ 2009-09-13 13:35               ` Juanma Barranquero
  2009-09-13 13:48                 ` Angelo Graziosi
  2009-09-13 13:48                 ` Angelo Graziosi
  2009-09-13 14:04               ` Stefan Monnier
  2009-09-13 14:04               ` bug#4347: Bug for .emacs.d? Stefan Monnier
  3 siblings, 2 replies; 42+ 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] 42+ messages in thread

* bug#4347: Bug for .emacs.d?
  2009-09-13 13:35               ` Juanma Barranquero
@ 2009-09-13 13:48                 ` Angelo Graziosi
  2009-09-13 13:48                 ` Angelo Graziosi
  1 sibling, 0 replies; 42+ 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] 42+ messages in thread

* Re: bug#4347: Bug for .emacs.d?
  2009-09-13 13:35               ` Juanma Barranquero
  2009-09-13 13:48                 ` Angelo Graziosi
@ 2009-09-13 13:48                 ` Angelo Graziosi
  1 sibling, 0 replies; 42+ 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] 42+ messages in thread

* bug#4347: Bug for .emacs.d?
  2009-09-13 13:06             ` Angelo Graziosi
                                 ` (2 preceding siblings ...)
  2009-09-13 14:04               ` Stefan Monnier
@ 2009-09-13 14:04               ` Stefan Monnier
  3 siblings, 0 replies; 42+ 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] 42+ messages in thread

* Re: bug#4347: Bug for .emacs.d?
  2009-09-13 13:06             ` Angelo Graziosi
  2009-09-13 13:35               ` Juanma Barranquero
  2009-09-13 13:35               ` Juanma Barranquero
@ 2009-09-13 14:04               ` Stefan Monnier
  2009-09-13 14:12                 ` Angelo Graziosi
                                   ` (2 more replies)
  2009-09-13 14:04               ` bug#4347: Bug for .emacs.d? Stefan Monnier
  3 siblings, 3 replies; 42+ 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] 42+ messages in thread

* bug#4347: Bug for .emacs.d?
  2009-09-13 14:04               ` Stefan Monnier
@ 2009-09-13 14:12                 ` Angelo Graziosi
  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
  2 siblings, 0 replies; 42+ 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] 42+ 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 14:12                 ` Angelo Graziosi
  2009-09-13 17:41                   ` Juanma Barranquero
  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
  2 siblings, 2 replies; 42+ 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] 42+ 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 14:12                 ` Angelo Graziosi
@ 2009-09-13 16:06                 ` Reiner Steib
  2009-09-14  1:26                   ` desktop and ~/.emacs.d/ Stefan Monnier
  2 siblings, 1 reply; 42+ 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] 42+ messages in thread

* bug#4347: Bug for .emacs.d?
  2009-09-13 14:12                 ` Angelo Graziosi
@ 2009-09-13 17:41                   ` Juanma Barranquero
  2009-09-13 17:41                   ` Juanma Barranquero
  1 sibling, 0 replies; 42+ messages in thread
From: Juanma Barranquero @ 2009-09-13 17:41 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: 4347, 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] 42+ messages in thread

* Re: bug#4347: Bug for .emacs.d?
  2009-09-13 14:12                 ` Angelo Graziosi
  2009-09-13 17:41                   ` Juanma Barranquero
@ 2009-09-13 17:41                   ` Juanma Barranquero
  1 sibling, 0 replies; 42+ 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] 42+ 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; 42+ 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] 42+ 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; 42+ 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] 42+ 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; 42+ 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] 42+ 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; 42+ 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] 42+ 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; 42+ 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] 42+ 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; 42+ 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] 42+ messages in thread

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

Thread overview: 42+ 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
2009-09-05  2:12 ` bug#4347: " Juanma Barranquero
2009-09-11 20:23   ` Stefan Monnier
2009-09-11 20:34     ` Juanma Barranquero
2009-09-11 21:21     ` Angelo Graziosi
2009-09-12  4:25       ` Stefan Monnier
2009-09-12  8:29         ` Angelo Graziosi
2009-09-12 19:32           ` Stefan Monnier
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  2:31               ` bug#4347: Bug for .emacs.d? Miles Bader
2009-09-12 21:43             ` Angelo Graziosi
2009-09-13 13:06             ` Angelo Graziosi
2009-09-13 13:35               ` Juanma Barranquero
2009-09-13 13:35               ` Juanma Barranquero
2009-09-13 13:48                 ` Angelo Graziosi
2009-09-13 13:48                 ` Angelo Graziosi
2009-09-13 14:04               ` Stefan Monnier
2009-09-13 14:12                 ` Angelo Graziosi
2009-09-13 14:12                 ` Angelo Graziosi
2009-09-13 17:41                   ` Juanma Barranquero
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
2009-09-13 14:04               ` bug#4347: Bug for .emacs.d? Stefan Monnier
2009-09-13 13:06             ` Angelo Graziosi
2009-09-12  8:29         ` Angelo Graziosi
2009-09-12 11:16         ` Juanma Barranquero
2009-09-12 19:38           ` Stefan Monnier
2009-09-12 19:42             ` Juanma Barranquero

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.