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

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

Re: problem reading ~/.emacs.desktop


From: ken
Subject: Re: problem reading ~/.emacs.desktop
Date: Sat, 19 Sep 2009 23:04:35 -0400
User-agent: Thunderbird 2.0.0.22 (X11/20090625)

On 09/16/2009 04:39 AM Juanma Barranquero wrote:
> [sorry for the previous unfinished post]

That's quite alright.

> 
> On Wed, Sep 16, 2009 at 10:14, ken <gebser@mousecar.com> wrote:
> 
>> In the newly created ".emacs.desktop" file (created by the upgraded
>> version of emacs), this same argument is displayed as an 'I' with a
>> diacritical mark over it-- the same as the old one was in the Debugger.
>>  (?)  The value of that character (as determined by "C-x =") is 205.
> 
> ?? With Emacs 23.1, the version should be 206 in a newly created .desktop.
> 
> I'd like to know what happens when you do the following
> 
>  - create an empty directory and cd to it
>  - set HOME to that directory
>  - create a test file (let's call it test.txt) with a couple lines
>  - then
>       emacs -Q test.txt
>       M-x desktop-save <RET> <RET>      ; to create a new desktop file
>       C-x C-c
>   followed by
>       emacs -Q -f desktop-load

Very cool idea.  Here's what happened.

Created new directory, made it HOME, created a file there.

"emacs -Q test.txt" loaded fine.

"M-x desktop-save RET RET" did create a new "~/.emacs.desktop".  Here it is:

============================ start ================================
;; -*- mode: emacs-lisp; coding: emacs-mule; -*-
;;
--------------------------------------------------------------------------
;; Desktop File for Emacs
;;
--------------------------------------------------------------------------
;; Created Sat Sep 19 20:02:35 2009
;; Desktop file format version 206
;; Emacs version 23.1.1

;; Global section:
(setq desktop-missing-file-warning nil)
(setq tags-file-name nil)
(setq tags-table-list nil)
(setq search-ring nil)
(setq regexp-search-ring nil)
(setq register-alist nil)

;; Buffer section -- buffers listed in same order as in buffer list:
(desktop-create-buffer 206
  "/home/zl/emtmp/test.txt"
  "test.txt"
  'text-mode
  nil
  1
  '(nil nil)
  nil
  nil
  '((buffer-file-coding-system . undecided-unix)))

=========================== end ========================

[Note: I displayed the above from the shell, not in emacs (just to keep
with the test.  Also worth noting: the version is *not* 205, but 206.]

After exiting emacs and going back in with "emacs -Q -f desktop-load", I
got the error message in the minibuffer

Symbol's function definition is void: desktop-load

and so test.txt wasn't loaded, "C-x C-b" showed just

------------------------ start -----------------------
.   *scratch*                0  Lisp Interaction
  * *Messages*             132  Fundamental
------------------------- end ------------------------

If, however, I do "M-x desktop-read" test.txt is loaded as expected.




> 
>> So then I edited ".emacs.desktop" to replace the 'I' with the
>> diacritical mark with "205" (without the quotes).  And I comment out the
>> code in ~/.emacs which invokes "desktop-read" and "desktop-save" and
>> reload emacs and run these by hand.
> 
> You shouldn't use `desktop-save' and `desktop-read' in you ~/.emacs, just
> 
>   (desktop-save-mode 1)
> 
> is enough.

Great!  That's a pile of code I can pull out of my .emacs from years back.


> 
>> Debugger entered--Lisp error: (error "Local variables entry is missing
>> the suffix")
>>  signal(error ("Local variables entry is missing the suffix"))
>>  error("Local variables entry is missing the suffix")
> 
>> This error isn't clear enough for me to figure out.
> 
> This is not related to desktop. Emacs is complaining about a problem
> with the Local variables section in the file, i.e., the
> 
>   Local Variables:
>   one-variable: whatever
>   another-variable: blah blah
>   End:
> 
> section near the end of the file.

Hey, you're good.  Yeah, I've got some of that in one of my files.  But
what's the "suffix" that's missing?


> 
> Just out of curiosity: it is possible you're using CRLF files in a
> context that does not expect them, or that some of the files have
> mixed LF and CRLF line endings?

Not likely, but, yeah, possible.  Occasionally I'll work on a file that
came from Windows.  Do you mean an emacs configuration file?  Given the
results above, is it relevant?


Juanma, thanks very much for your help.
ken

> 
>     Juanma





reply via email to

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