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: Steinar Bang
Subject: Re: Use emacs.desktop when starting emacs from a particular directory
Date: Fri, 02 Nov 2018 20:18:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (windows-nt)

>>>>> Eli Zaretskii <eliz@gnu.org>:

>> The way I've tried to accomplish it is by starting emacs with the
>> following commands:
>> cd ~/workspaces
>> emacs --eval "(progn (setq desktop-path (expand-file-name \"~/workspaces\")) 
>> (desktop-save-mode 1))" >/dev/null 2>&1 &

> AFAIK, the above is a mistake: desktop-path should be a list of
> strings, not a single string.  (I use this feature since time
> immemoriam, and it works for me every time.)

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.



reply via email to

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