From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Use emacs.desktop when starting emacs from a particular directory Date: Sat, 03 Nov 2018 10:03:51 +0200 Message-ID: <83lg6afuzc.fsf@gnu.org> References: <86pnvolrgq.fsf@dod.no> <83muqshcoq.fsf@gnu.org> <86ftwjl23x.fsf@dod.no> <86bm77kx0y.fsf@dod.no> <8636sjkpxh.fsf@dod.no> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1541232160 2283 195.159.176.226 (3 Nov 2018 08:02:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 3 Nov 2018 08:02:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 03 09:02:36 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIqt8-0000QQ-8B for geh-help-gnu-emacs@m.gmane.org; Sat, 03 Nov 2018 09:02:34 +0100 Original-Received: from localhost ([::1]:54669 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIqvE-0000O0-GL for geh-help-gnu-emacs@m.gmane.org; Sat, 03 Nov 2018 04:04:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIqui-0000Nq-Hp for help-gnu-emacs@gnu.org; Sat, 03 Nov 2018 04:04:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIqua-0006EZ-Ca for help-gnu-emacs@gnu.org; Sat, 03 Nov 2018 04:04:08 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIquY-0006Ct-7r for help-gnu-emacs@gnu.org; Sat, 03 Nov 2018 04:04:02 -0400 Original-Received: from [176.228.60.248] (port=3361 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gIquW-0000fG-2r for help-gnu-emacs@gnu.org; Sat, 03 Nov 2018 04:04:00 -0400 In-reply-to: (message from Stefan Monnier on Fri, 02 Nov 2018 23:15:59 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118570 Archived-At: > From: Stefan Monnier > Date: Fri, 02 Nov 2018 23:15:59 -0400 > > > emacs --eval "(progn (progn (setq desktop-path (list (expand-file-name \"~/workspaces\"))) (desktop-save-mode 1)) (desktop-save-mode 1))" >/dev/null 2>&1 & > > desktop.el only automatically reads the desktop file if > desktop-save-mode is enabled and only right after reading the init file. So perhaps a better solution to the above would be to make some part of .emacs conditional on some environment variable, and set that variable in the script?