From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Larry Evans Newsgroups: gmane.emacs.help Subject: Howto avoid "Overwrite desktop file" question. (was Re: .emacs (load {user-init-file, custom-file} causes duplicate load of both Date: Sat, 13 Nov 2010 06:43:44 -0600 Message-ID: References: <8339r7g1j5.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1289653662 6108 80.91.229.12 (13 Nov 2010 13:07:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 13 Nov 2010 13:07:42 +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 13 14:07:38 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PHFpO-0003d4-Jz for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Nov 2010 14:07:38 +0100 Original-Received: from localhost ([127.0.0.1]:58564 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHFpM-0000cu-9M for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Nov 2010 08:07:32 -0500 Original-Received: from [140.186.70.92] (port=50242 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHFT7-0001uY-QW for help-gnu-emacs@gnu.org; Sat, 13 Nov 2010 07:45:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PHFSa-0000ZT-1A for help-gnu-emacs@gnu.org; Sat, 13 Nov 2010 07:44:33 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:58129) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PHFSZ-0000YN-Nl for help-gnu-emacs@gnu.org; Sat, 13 Nov 2010 07:43:59 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PHFSW-00010m-OD for help-gnu-emacs@gnu.org; Sat, 13 Nov 2010 13:43:56 +0100 Original-Received: from r74-192-37-54.vctrcmta01.vctatx.tl.dh.suddenlink.net ([74.192.37.54]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 13 Nov 2010 13:43:56 +0100 Original-Received: from cppljevans by r74-192-37-54.vctrcmta01.vctatx.tl.dh.suddenlink.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 13 Nov 2010 13:43:56 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 119 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: r74-192-37-54.vctrcmta01.vctatx.tl.dh.suddenlink.net User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Lightning/1.0b1 Thunderbird/3.0.6 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:75362 Archived-At: On 11/11/10 12:44, Larry Evans wrote: > On 11/11/10 12:26, Eli Zaretskii wrote: >>> From: Larry Evans >>> Date: Thu, 11 Nov 2010 05:22:39 -0600 >>> >>> "Current desktop was not loaded from a file. Overwrite this desktop file? " >>> >>> from function desktop-save in desktop.el.gz. A trace in that function >>> showed: >>> >>> desktop-file-modtime >>> >>> was nil. Further search in that file showed the only place that was >>> set was in function desktop-read. So, in .emacs I put: >>> >>> (desktop-read) >>> >>> However, that didn't work. >> >> Didn't work how? >> >> Having `(desktop-read)' in your ~/.emacs _is_ the right way of >> activating Desktop. >> >> > When exiting emacs, I still got the error message: > > "Current desktop was not loaded from a file. Overwrite this desktop file? " > > However, as I mentioned in my last post, for some mysterious reason, > I'm no longer getting this error. > > OK *maybe* I forgot to uncomment the (desktop-read) in my .emacs, > but I thought I had. Everything is working OK now. Wait > let me check since I'm now in emacs. Exited emacs > and the error message doesn't occur. > > Sorry for noise, but unless I'm imagining things, I did > have the (desktop-read) and was getting the "not loaded from file" > error message. > > -regards, > Larry It's happening again, only now, like it did at first, the messages are displayed in a dialog box that has Question in the title, then the line: Current desktop was not loaded from a file. Overwrite this desktop file? Followed by two buttons labeled "Yes" and "No". I did not change any of my ~/.emacs or my ~/.emacs.d/init.el or my ~/.xemacs/custom.el files. It just started happening for some mysterious reason. The Nautilaus file browser show a ~/.emacs modification time of Nov 11 08:25, confirming that no changes have been made to that file as I suspected. I viewed the contents with gedit and it showed: ;(desktop-read) IOW, it was commented out. So, I changed that to: (desktop-read) and exited after pressing "Yes" and reentered and then existed and the same warning dialog appeared. So I chose the "No" option, then reentered and exited emacs. The same warning dialog containing "Overwrite desktop file" appeared. How do I prevent this warning dialog from appearing each time I exit emacs? TIA. -Larry NOTE: Just as before, the *Messages* buffer shows all the init files and the desktop being loaded: ... Loading /etc/emacs/site-start.d/60agda-stdlib.el (source)...done Loading /etc/emacs/site-start.d/60wysihtml-el.el (source)...done Loading /home/evansl/.emacs.d/init.el (source)... Loading /home/evansl/.recentf...done Cleaning up the recentf list...done (0 removed) Loading /home/evansl/.emacs.d/init.el (source)...done Loading /home/evansl/.xemacs/custom.el (source)... Loading desktop...done Loading /home/evansl/.xemacs/custom.el (source)...done Loading /usr/share/emacs/site-lisp/haskell-mode/haskell-mode.el (source)...done Note: file is write protected Scanning declarations in IoDemo.hs... ( 0%) Sorting declarations in IoDemo.hs...done Startup with window [1] imenu--make-index-alist: No items suitable for an index found in this buffer What's mysterious is the *Messages* indicates the desktop was being loaded from the ~/.xemacs/custom.el file but not from the (desktop-read) in the ~/.emacs file. However, as noted, the (desktop-read) was initially commented out. The custom.el contains: (custom-set-variables ;; custom-set-variables was added by Custom. ... '(default-input-method "latin-1-prefix") '(desktop-save t) '(desktop-save-mode t) '(ecb-cedet-url "http://cedet.sourceforge.net/")