help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use emacs.desktop when starting emacs from a particular directory


From: Eli Zaretskii
Subject: Re: Use emacs.desktop when starting emacs from a particular directory
Date: Fri, 02 Nov 2018 23:32:03 +0200

> From: Steinar Bang <sb@dod.no>
> Date: Fri, 02 Nov 2018 20:18:42 +0100
> 
> >>>>> Eli Zaretskii <eliz@gnu.org>:
> 
> Thanks!  I've changed the commands starting emacs to:
>  cd ~/workspaces
>  emacs --eval "(progn (progn (push (expand-file-name \"~/workspaces\") 
> desktop-path) (desktop-save-mode 1)) (desktop-save-mode 1))" >/dev/null 2>&1 &
> 
> Now desktop-path has the following value after startup:
> ("/home/sb/workspaces" "~/.emacs.d/" "~")
> Original value was 
> ("~/.emacs.d/" "~")
> 
> However, emacs still saves and restores state from the
> ~/.emacs.d/.emacs.desktop file.

First, why do you use 'push' instead of 'setq'?  Don't you want to
replace desktop-path for this invocation?

Second, is there actually an .emacs.desktop file in the ~/workspaces
directory?

Here's what I do for a long time in my .emacs:

  (setq desktop-path '("." ".." "../.." "../../.."))
  (desktop-save-mode 1)

Then starting Emacs in a directory with a .emacs.desktop file reads
that desktop file.  So this feature works, it's just that something in
your case prevents it from working for you.  Perhaps some debugging is
in order.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]