all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* desktop-dirname can't be modified?
@ 2008-11-15 12:42 anhnmncb
  2008-11-15 13:29 ` Juanma Barranquero
  0 siblings, 1 reply; 5+ messages in thread
From: anhnmncb @ 2008-11-15 12:42 UTC (permalink / raw
  To: help-gnu-emacs

I try to change it to "~/.emacs.d/" but without lucky, everytime I
restart emacs, it always restores to "~/home/myname", why? What should I
have missed?





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

* Re: desktop-dirname can't be modified?
  2008-11-15 12:42 desktop-dirname can't be modified? anhnmncb
@ 2008-11-15 13:29 ` Juanma Barranquero
  2008-11-15 14:09   ` anhnmncb
  0 siblings, 1 reply; 5+ messages in thread
From: Juanma Barranquero @ 2008-11-15 13:29 UTC (permalink / raw
  To: anhnmncb; +Cc: help-gnu-emacs

On Sat, Nov 15, 2008 at 13:42, anhnmncb <anhnmncb@sina.com> wrote:

> I try to change it to "~/.emacs.d/" but without lucky, everytime I
> restart emacs, it always restores to "~/home/myname", why? What should I
> have missed?

What are you trying to do, exactly?

If what you want is to have just one desktop file, stored in
~/.emacs.d/, you can add this to your .emacs:

   (desktop-save-mode 1)
   (add-to-list 'desktop-path "~/.emacs.d/")

though, if you occasionally want to have directory-specific desktop
files is better to put it after ".":

  (setq desktop-path '("." "~/.emacs.d/" "~"))

Does this help you?

  Juanma




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

* Re: desktop-dirname can't be modified?
  2008-11-15 13:29 ` Juanma Barranquero
@ 2008-11-15 14:09   ` anhnmncb
  2008-11-15 14:55     ` Juanma Barranquero
  0 siblings, 1 reply; 5+ messages in thread
From: anhnmncb @ 2008-11-15 14:09 UTC (permalink / raw
  To: help-gnu-emacs

"Juanma Barranquero" <lekktu@gmail.com> writes:

> On Sat, Nov 15, 2008 at 13:42, anhnmncb <anhnmncb@sina.com> wrote:
>
>> I try to change it to "~/.emacs.d/" but without lucky, everytime I
>> restart emacs, it always restores to "~/home/myname", why? What should I
>> have missed?
>
> What are you trying to do, exactly?
>
> If what you want is to have just one desktop file, stored in
> ~/.emacs.d/, you can add this to your .emacs:
>
>    (desktop-save-mode 1)
>    (add-to-list 'desktop-path "~/.emacs.d/")

It works, thank you, I think the desktop-dirname's docstring makes me
confused:

desktop-dirname is a variable defined in `desktop.el'.
Its value is "/home/anhnmncb/"

Documentation:
The directory in which the desktop file should be saved.

>
> though, if you occasionally want to have directory-specific desktop
> files is better to put it after ".":
>
>   (setq desktop-path '("." "~/.emacs.d/" "~"))
>
> Does this help you?
>
>   Juanma





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

* Re: desktop-dirname can't be modified?
  2008-11-15 14:09   ` anhnmncb
@ 2008-11-15 14:55     ` Juanma Barranquero
  2008-11-15 17:00       ` Peter Dyballa
  0 siblings, 1 reply; 5+ messages in thread
From: Juanma Barranquero @ 2008-11-15 14:55 UTC (permalink / raw
  To: anhnmncb; +Cc: help-gnu-emacs

On Sat, Nov 15, 2008 at 15:09, anhnmncb <anhnmncb@sina.com> wrote:

> It works, thank you, I think the desktop-dirname's docstring makes me
> confused:

> Documentation:
> The directory in which the desktop file should be saved.

I agree that it is a bit confusing. `desktop-dirname' is not for the
user to change; it is not a defcustom, and both `desktop-read' and
`desktop-save' assign it unconditionally. However, it is mentioned in
several docstrings almost as if it were a user's option.

  Juanma




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

* Re: desktop-dirname can't be modified?
  2008-11-15 14:55     ` Juanma Barranquero
@ 2008-11-15 17:00       ` Peter Dyballa
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2008-11-15 17:00 UTC (permalink / raw
  To: Juanma Barranquero; +Cc: help-gnu-emacs, anhnmncb


Am 15.11.2008 um 15:55 schrieb Juanma Barranquero:

>> Documentation:
>> The directory in which the desktop file should be saved.
>
> I agree that it is a bit confusing. `desktop-dirname' is not for the
> user to change; it is not a defcustom, and both `desktop-read' and
> `desktop-save' assign it unconditionally.


For me this works with a few versions of GNU Emacs:

	(setq desktop-dirname (format "%sPDesktop-%d" user-emacs-directory  
ETyp))

I have in ~/.emacs.d

	drwxrwxr-x     7 pete     238 10 Aug 23:42 PDesktop-20
	drwxrwxr-x     7 pete     238  5 Sep 11:32 PDesktop-21
	drwxrwxr-x    18 pete     612 15 Nov 00:38 PDesktop-22
	drwxrwxr-x    20 pete     680 15 Nov 00:45 PDesktop-23


--
Greetings

   Pete
                       ~  o
                        ~_\\_/\
                       ~  O   O






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

end of thread, other threads:[~2008-11-15 17:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-15 12:42 desktop-dirname can't be modified? anhnmncb
2008-11-15 13:29 ` Juanma Barranquero
2008-11-15 14:09   ` anhnmncb
2008-11-15 14:55     ` Juanma Barranquero
2008-11-15 17:00       ` Peter Dyballa

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.