unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10977: 24.0.94; filename "emacs.desktop" collides with kde xy*.desktop logic
@ 2012-03-09  9:55 Thomas Rikl
  2012-03-09 10:04 ` Eli Zaretskii
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Thomas Rikl @ 2012-03-09  9:55 UTC (permalink / raw)
  To: 10977



Can you please give the "~/.emacs.desktop" an other filename
resp. extension or (default path)
than ".desktop". It collides with some KDE mimic which i don't want to
describe here. I think an extension of ".el" or default name like
".emacs-desktop.el" would be perfect. I mean the file created as a
result of (desktop-save-mode 1)  in the startup-file.


In GNU Emacs 24.0.94.9 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
 of 2012-03-09 on aptosidbox
Windowing system distributor `The X.Org Foundation', version 11.0.11104000
Configured using:
 `configure '--with-x-toolkit=lucid' '--prefix=/data/emacs'
 '--without-compress-info' '--with-dbus''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  global-linum-mode: t
  linum-mode: t
  desktop-save-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <menu-bar> <help-menu> <send-emacs-bug
-report>

Recent messages:
Loading /home/tom/quicklisp/slime-helper.el (source)...done
Wrote /home/tom/.emacs.desktop.lock
Desktop: 0 buffers restored.
For information about GNU Emacs and the GNU system, type C-h C-a.
call-interactively: End of buffer

Load-path shadows:
/home/tom/.emacs.d/elpa/auctex-11.86/tex hides /data/emacs/share/emacs/site-
lisp/auctex/tex
/home/tom/.emacs.d/elpa/auctex-11.86/tex-style hides 
/data/emacs/share/emacs/site-lisp/auctex/tex-style
/home/tom/.emacs.d/elpa/auctex-11.86/multi-prompt hides 
/data/emacs/share/emacs/site-lisp/auctex/multi-prompt
/home/tom/.emacs.d/elpa/auctex-11.86/tex-bar hides 
/data/emacs/share/emacs/site-lisp/auctex/tex-bar
/home/tom/.emacs.d/elpa/auctex-11.86/toolbar-x hides 
/data/emacs/share/emacs/site-lisp/auctex/toolbar-x
/home/tom/.emacs.d/elpa/auctex-11.86/context-nl hides 
/data/emacs/share/emacs/site-lisp/auctex/context-nl
/home/tom/.emacs.d/elpa/auctex-11.86/latex hides /data/emacs/share/emacs/site-
lisp/auctex/latex
/home/tom/.emacs.d/elpa/auctex-11.86/context hides 
/data/emacs/share/emacs/site-lisp/auctex/context
/home/tom/.emacs.d/elpa/auctex-11.86/font-latex hides 
/data/emacs/share/emacs/site-lisp/auctex/font-latex
/home/tom/.emacs.d/elpa/auctex-11.86/tex-mik hides 
/data/emacs/share/emacs/site-lisp/auctex/tex-mik
/home/tom/.emacs.d/elpa/auctex-11.86/context-en hides 
/data/emacs/share/emacs/site-lisp/auctex/context-en
/home/tom/.emacs.d/elpa/auctex-11.86/tex-font hides 
/data/emacs/share/emacs/site-lisp/auctex/tex-font
/home/tom/.emacs.d/elpa/auctex-11.86/prv-emacs hides 
/data/emacs/share/emacs/site-lisp/auctex/prv-emacs
/home/tom/.emacs.d/elpa/auctex-11.86/texmathp hides 
/data/emacs/share/emacs/site-lisp/auctex/texmathp
/home/tom/.emacs.d/elpa/auctex-11.86/tex-fold hides 
/data/emacs/share/emacs/site-lisp/auctex/tex-fold
/home/tom/.emacs.d/elpa/auctex-11.86/tex-buf hides 
/data/emacs/share/emacs/site-lisp/auctex/tex-buf
/home/tom/.emacs.d/elpa/auctex-11.86/tex-info hides 
/data/emacs/share/emacs/site-lisp/auctex/tex-info
/home/tom/.emacs.d/elpa/auctex-11.86/preview hides 
/data/emacs/share/emacs/site-lisp/auctex/preview
/home/tom/.emacs.d/elpa/auctex-11.86/bib-cite hides 
/data/emacs/share/emacs/site-lisp/auctex/bib-cite
/home/tom/.emacs.d/elpa/auctex-11.86/tex-jp hides 
/data/emacs/share/emacs/site-lisp/auctex/tex-jp
/home/tom/.emacs.d/elpa/auctex-11.86/tex-site hides 
/data/emacs/share/emacs/site-lisp/tex-site

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils auctex-autoloads info easymenu
buffer-move-autoloads paredit-autoloads tuareg-autoloads caml-autoloads
package tabulated-list slime-autoloads preview-latex tex-site auto-loads
ido linum desktop time-date tooltip ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs
button faces cus-face files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dynamic-setting system-font-setting
font-render-setting x-toolkit x multi-tty emacs)





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: 24.0.94; filename "emacs.desktop" collides with kde xy*.desktop logic
  2012-03-09  9:55 bug#10977: 24.0.94; filename "emacs.desktop" collides with kde xy*.desktop logic Thomas Rikl
@ 2012-03-09 10:04 ` Eli Zaretskii
  2012-03-09 18:21 ` Glenn Morris
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2012-03-09 10:04 UTC (permalink / raw)
  To: Thomas Rikl; +Cc: 10977

> From: Thomas Rikl <trikl@online.de>
> Date: Fri, 9 Mar 2012 10:55:38 +0100
> 
> Can you please give the "~/.emacs.desktop" an other filename
> resp. extension or (default path) than ".desktop". It collides with
> some KDE mimic which i don't want to describe here.

Too late for that, I'd say: this name was used by Emacs for almost 20
years (since 1993).





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: 24.0.94; filename "emacs.desktop" collides with kde xy*.desktop logic
  2012-03-09  9:55 bug#10977: 24.0.94; filename "emacs.desktop" collides with kde xy*.desktop logic Thomas Rikl
  2012-03-09 10:04 ` Eli Zaretskii
@ 2012-03-09 18:21 ` Glenn Morris
  2012-03-09 20:59 ` bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop Th. Rikl
  2012-06-21  7:27 ` bug#10977: 24.0.94; filename "emacs.desktop" collides with kde xy*.desktop logic Chong Yidong
  3 siblings, 0 replies; 19+ messages in thread
From: Glenn Morris @ 2012-03-09 18:21 UTC (permalink / raw)
  To: Thomas Rikl; +Cc: 10977

Thomas Rikl wrote:

> Can you please give the "~/.emacs.desktop" an other filename
> resp. extension or (default path)
> than ".desktop". It collides with some KDE mimic which i don't want to
> describe here. I think an extension of ".el" or default name like
> ".emacs-desktop.el" would be perfect. I mean the file created as a
> result of (desktop-save-mode 1)  in the startup-file.

You can customize desktop-base-file-name to whatever you like.
Without any details about whatever it is that you don't want to
describe, it's impossible to say if it is appropriate to change the
default (it probably isn't).





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop
  2012-03-09  9:55 bug#10977: 24.0.94; filename "emacs.desktop" collides with kde xy*.desktop logic Thomas Rikl
  2012-03-09 10:04 ` Eli Zaretskii
  2012-03-09 18:21 ` Glenn Morris
@ 2012-03-09 20:59 ` Th. Rikl
  2012-03-09 21:33   ` Glenn Morris
  2012-06-21  7:27 ` bug#10977: 24.0.94; filename "emacs.desktop" collides with kde xy*.desktop logic Chong Yidong
  3 siblings, 1 reply; 19+ messages in thread
From: Th. Rikl @ 2012-03-09 20:59 UTC (permalink / raw)
  To: 10977

kded(1748) PowerDevilUPowerBackend::brightness: 
org.kde.powerdevil.backlighthelper.brightness failed
kded(1748) PowerDevilUPowerBackend::setBrightness: 
org.kde.powerdevil.backlighthelper.setbrightness failed
kded(1748) PowerDevilUPowerBackend::setBrightness: 
org.kde.powerdevil.backlighthelper.setbrightness failed
kded(1748) PowerDevilUPowerBackend::setBrightness: 
org.kde.powerdevil.backlighthelper.setbrightness failed
"KConfigIni: In file /home/tom/.emacs.desktop, line 1: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 2: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 3: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 4: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 5: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 6: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 7: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 9: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 10: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 11: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 12: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 13: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 14: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 15: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 16: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 18: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 19: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 20: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 21: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 22: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 23: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 24: " Invalid entry 
(missing '=')
"KConfigIni: In file /home/tom/.emacs.desktop, line 25: " Invalid entry 
(missing '=')
"KConfigIn

and so on for every line in .emacs.desktop. I knew my option to 
customize the filename and directory and i knew from eli z. that this 
filename is in use for emacs since 20 years or so.
I does not know, what KConfigIni is good for and intends to get from 
.emacs.desktop. In my eyes (perhaps only in the left ;-) ) it was easier 
to adapt the "desktop.el source" to avoid the extension ".desktop" to 
get out of the way for KConfigIni.

Thanks





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop
  2012-03-09 20:59 ` bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop Th. Rikl
@ 2012-03-09 21:33   ` Glenn Morris
  2012-03-10  7:21     ` Eli Zaretskii
  0 siblings, 1 reply; 19+ messages in thread
From: Glenn Morris @ 2012-03-09 21:33 UTC (permalink / raw)
  To: Th. Rikl; +Cc: 10977

"Th. Rikl" wrote:

> "KConfigIni: In file /home/tom/.emacs.desktop, line 1: " Invalid entry
> (missing '=')

If that is all that happens, it seems like a harmless irritation.
Perhaps you can find a way to restrict KConfigIni's search path to
something more sensible.

But in the future it probably would be more consistent with the rest of
Emacs if desktop used user-emacs-directory in preference to the home
directory, if no desktop-file already exists in the home directory.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop
  2012-03-09 21:33   ` Glenn Morris
@ 2012-03-10  7:21     ` Eli Zaretskii
  2012-03-10 14:31       ` Stefan Monnier
  0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2012-03-10  7:21 UTC (permalink / raw)
  To: Glenn Morris; +Cc: trikl, 10977

> From: Glenn Morris <rgm@gnu.org>
> Date: Fri, 09 Mar 2012 16:33:32 -0500
> Cc: 10977@debbugs.gnu.org
> 
> But in the future it probably would be more consistent with the rest of
> Emacs if desktop used user-emacs-directory in preference to the home
> directory, if no desktop-file already exists in the home directory.

I agree, FWIW.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop
  2012-03-10  7:21     ` Eli Zaretskii
@ 2012-03-10 14:31       ` Stefan Monnier
  2012-03-10 19:16         ` Thomas Rikl
  2012-03-10 19:25         ` Glenn Morris
  0 siblings, 2 replies; 19+ messages in thread
From: Stefan Monnier @ 2012-03-10 14:31 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 10977, trikl

>> But in the future it probably would be more consistent with the rest of
>> Emacs if desktop used user-emacs-directory in preference to the home
>> directory, if no desktop-file already exists in the home directory.
> I agree, FWIW.

That's already the case at least for searching:

   (defcustom desktop-path (list "." user-emacs-directory "~")


-- Stefan





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop
  2012-03-10 14:31       ` Stefan Monnier
@ 2012-03-10 19:16         ` Thomas Rikl
  2012-03-10 19:25         ` Glenn Morris
  1 sibling, 0 replies; 19+ messages in thread
From: Thomas Rikl @ 2012-03-10 19:16 UTC (permalink / raw)
  To: 10977

Am 10.03.2012 15:31, schrieb Stefan Monnier:
>>> But in the future it probably would be more consistent with the rest of
>>> Emacs if desktop used user-emacs-directory in preference to the home
>>> directory, if no desktop-file already exists in the home directory.
>> I agree, FWIW.
> That's already the case at least for searching:
>
>     (defcustom desktop-path (list "." user-emacs-directory "~")
>
>
> -- Stefan
After login "." and "~" are the same place, this prevents from nothing. 
In my eyes a smart migration to a name *desktop_whatever*.el  is a 
robust and straitforward solution. In case of a new creation take the 
new name, in case of searching an already existing desktop search first 
for the new name then for the "old" name.

After 5 years or so drop the handling of the old scheme mentioned in the 
"release notes" alternative cleanup the mechanism with the intro of 24.1 
. (Perhaps I'm naive)

For me the extension .desktop is associated with graphical desktops like 
KDE independent how long and since when emacs made use of this expression.

The lines:  (setq desktop-base-file-name ".emacs-desktop.el")
(desktop-save-mode 1) in  ~/.emacs satisfy me.


What are computers good for ? They solve problems we never had without them.







^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop
  2012-03-10 14:31       ` Stefan Monnier
  2012-03-10 19:16         ` Thomas Rikl
@ 2012-03-10 19:25         ` Glenn Morris
  2012-03-10 19:28           ` Glenn Morris
  2012-03-12  9:34           ` Chong Yidong
  1 sibling, 2 replies; 19+ messages in thread
From: Glenn Morris @ 2012-03-10 19:25 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: trikl, 10977

Stefan Monnier wrote:

> That's already the case at least for searching:
>
>    (defcustom desktop-path (list "." user-emacs-directory "~")

I think the necessary change would be to make desktop-read set
desktop-dirname to user-emacs-directory if no existing desktop is found
in any of those three locations (and no DIRNAME arg was specified).





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop
  2012-03-10 19:25         ` Glenn Morris
@ 2012-03-10 19:28           ` Glenn Morris
  2012-03-11  1:39             ` Stefan Monnier
  2012-03-12  9:34           ` Chong Yidong
  1 sibling, 1 reply; 19+ messages in thread
From: Glenn Morris @ 2012-03-10 19:28 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: trikl, 10977

Glenn Morris wrote:

> I think the necessary change would be to make desktop-read set
> desktop-dirname to user-emacs-directory if no existing desktop is found
> in any of those three locations (and no DIRNAME arg was specified).

Only in the case where "." = "~", I should have said.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop
  2012-03-10 19:28           ` Glenn Morris
@ 2012-03-11  1:39             ` Stefan Monnier
  2012-03-12 16:42               ` Glenn Morris
  0 siblings, 1 reply; 19+ messages in thread
From: Stefan Monnier @ 2012-03-11  1:39 UTC (permalink / raw)
  To: Glenn Morris; +Cc: trikl, 10977

>> I think the necessary change would be to make desktop-read set
>> desktop-dirname to user-emacs-directory if no existing desktop is found
>> in any of those three locations (and no DIRNAME arg was specified).

Agreed.

> Only in the case where "." = "~", I should have said.

Disagreed.  I would agree to special case the "."="~" in the sense of
ignoring "." from desktop-path when "." is "~" (so that
user-emacs-directory takes precedence over ~), but special casing it
when setting desktop-dirname doesn't seem to bring us anything.


        Stefan





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop
  2012-03-10 19:25         ` Glenn Morris
  2012-03-10 19:28           ` Glenn Morris
@ 2012-03-12  9:34           ` Chong Yidong
  2012-03-12 12:38             ` Stefan Monnier
  1 sibling, 1 reply; 19+ messages in thread
From: Chong Yidong @ 2012-03-12  9:34 UTC (permalink / raw)
  To: Glenn Morris; +Cc: trikl, 10977

Glenn Morris <rgm@gnu.org> writes:

> Stefan Monnier wrote:
>
>> That's already the case at least for searching:
>>
>>    (defcustom desktop-path (list "." user-emacs-directory "~")
>
> I think the necessary change would be to make desktop-read set
> desktop-dirname to user-emacs-directory if no existing desktop is found
> in any of those three locations (and no DIRNAME arg was specified).

I think it would be cleaner to obsolete the
`desktop-path'/`desktop-base-file-name' rigmarole, and define the
desktop file name explicitly using locate-user-emacs-file.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop
  2012-03-12  9:34           ` Chong Yidong
@ 2012-03-12 12:38             ` Stefan Monnier
  2012-03-12 13:58               ` bug#10977: detail from .xession-errors concerning .desktopextension " Drew Adams
  0 siblings, 1 reply; 19+ messages in thread
From: Stefan Monnier @ 2012-03-12 12:38 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 10977, trikl

>>> That's already the case at least for searching:
>>> (defcustom desktop-path (list "." user-emacs-directory "~")
>> I think the necessary change would be to make desktop-read set
>> desktop-dirname to user-emacs-directory if no existing desktop is found
>> in any of those three locations (and no DIRNAME arg was specified).
> I think it would be cleaner to obsolete the
> `desktop-path'/`desktop-base-file-name' rigmarole, and define the
> desktop file name explicitly using locate-user-emacs-file.

That'd be fine by me, except that I'd be surprised if nobody uses the
"multiple desktop files" setup which is currently supported.


        Stefan





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: detail from .xession-errors concerning .desktopextension of ~./emacs.desktop
  2012-03-12 12:38             ` Stefan Monnier
@ 2012-03-12 13:58               ` Drew Adams
  0 siblings, 0 replies; 19+ messages in thread
From: Drew Adams @ 2012-03-12 13:58 UTC (permalink / raw)
  To: 'Stefan Monnier', 'Chong Yidong'; +Cc: trikl, 10977

> That'd be fine by me, except that I'd be surprised if nobody uses the
> "multiple desktop files" setup which is currently supported.

I and other Bookmark+ users use it often.  It should continue to be simple for
users to use multiple desktop files, located anywhere.  The code should make no
hard-and-fast assumptions regarding location etc.

I have not followed this thread, so I don't yet know whether any changes being
proposed would break my code.

I'm just confirming that using multiple desktop files is useful.  (In Bookmark+
you can have desktop bookmarks - "jumping" to one switches to that desktop.)






^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop
  2012-03-11  1:39             ` Stefan Monnier
@ 2012-03-12 16:42               ` Glenn Morris
  2012-03-12 18:14                 ` Stefan Monnier
  0 siblings, 1 reply; 19+ messages in thread
From: Glenn Morris @ 2012-03-12 16:42 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: trikl, 10977

Stefan Monnier wrote:

>>> I think the necessary change would be to make desktop-read set
>>> desktop-dirname to user-emacs-directory if no existing desktop is found
>>> in any of those three locations (and no DIRNAME arg was specified).
>
> Agreed.
>
>> Only in the case where "." = "~", I should have said.
>
> Disagreed.  I would agree to special case the "."="~" in the sense of
> ignoring "." from desktop-path when "." is "~" (so that
> user-emacs-directory takes precedence over ~), but special casing it
> when setting desktop-dirname doesn't seem to bring us anything.

echo '(desktop-save-mode 1)' >| ~/.emacs
emacs
C-h v desktop-dirname

You'll find it set to the value of PWD. This controls where the desktop
gets saved on exit. I'm saying that when you start in HOME, Emacs should
prefer to save in user-emacs-directory rather than PWD; but not when you
start in /some/other/place (you could never have more than one desktop
then; I make use of multiple desktops).

Another option:
Save all desktops to ~/.emacs.d/desktops/; either with the directory
name encoded in the name of the desktop file, or have an index file that
maps starting directories to desktop files. That would also allow for
named desktops (desktop-project1, desktop-project2, etc).

PS I've also changed my mind and think that .desktop.el would be a
better name than .emacs.desktop. Would need compat code to load
.emacs.desktop if it exists, but prefer saving to .desktop.el.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop
  2012-03-12 16:42               ` Glenn Morris
@ 2012-03-12 18:14                 ` Stefan Monnier
  2012-03-12 18:49                   ` Glenn Morris
  0 siblings, 1 reply; 19+ messages in thread
From: Stefan Monnier @ 2012-03-12 18:14 UTC (permalink / raw)
  To: Glenn Morris; +Cc: trikl, 10977

>>>> I think the necessary change would be to make desktop-read set
>>>> desktop-dirname to user-emacs-directory if no existing desktop is found
>>>> in any of those three locations (and no DIRNAME arg was specified).
>> Agreed.
>>> Only in the case where "." = "~", I should have said.
>> Disagreed.  I would agree to special case the "."="~" in the sense of
>> ignoring "." from desktop-path when "." is "~" (so that
>> user-emacs-directory takes precedence over ~), but special casing it
>> when setting desktop-dirname doesn't seem to bring us anything.

> echo '(desktop-save-mode 1)' >| ~/.emacs
> emacs
> C-h v desktop-dirname

> You'll find it set to the value of PWD.

Yes, and that should be user-emacs-directory instead.

> This controls where the desktop gets saved on exit. I'm saying that
> when you start in HOME, Emacs should prefer to save in
> user-emacs-directory rather than PWD;

We agree on this case.

> but not when you start in /some/other/place

Here I disagree.  If a desktop file is found somewhere up from
/some/other/place, then we should use it, but otherwise desktop-dirname
should be set to user-emacs-directory.

> (you could never have more than one desktop then; I make use of
> multiple desktops).

You could still have them.  The user would simply have to explicitly
save it in /some/other/place.

> Another option:
> Save all desktops to ~/.emacs.d/desktops/; either with the directory
> name encoded in the name of the desktop file, or have an index file that
> maps starting directories to desktop files. That would also allow for
> named desktops (desktop-project1, desktop-project2, etc).

That'd be OK as well.

> PS I've also changed my mind and think that .desktop.el would be a
> better name than .emacs.desktop. Would need compat code to load
> .emacs.desktop if it exists, but prefer saving to .desktop.el.

FWIW, I think that ".el" should be reserved for files containing Elisp
code, rather than any Elisp data; IOW it should be intended for `load'
rather than for `read'.  Not sure what to use for Elisp data,
tho... maybe ".eld"?


        Stefan





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop
  2012-03-12 18:14                 ` Stefan Monnier
@ 2012-03-12 18:49                   ` Glenn Morris
  2012-03-12 19:35                     ` Stefan Monnier
  0 siblings, 1 reply; 19+ messages in thread
From: Glenn Morris @ 2012-03-12 18:49 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: trikl, 10977

Stefan Monnier wrote:

> You could still have them.  The user would simply have to explicitly
> save it in /some/other/place.

OIC.

> FWIW, I think that ".el" should be reserved for files containing Elisp
> code, rather than any Elisp data; IOW it should be intended for `load'
> rather than for `read'.  Not sure what to use for Elisp data,
> tho... maybe ".eld"?

desktop-read does:

;; Evaluate desktop buffer and remember when it was modified.
(load (desktop-full-file-name) t t t)





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop
  2012-03-12 18:49                   ` Glenn Morris
@ 2012-03-12 19:35                     ` Stefan Monnier
  0 siblings, 0 replies; 19+ messages in thread
From: Stefan Monnier @ 2012-03-12 19:35 UTC (permalink / raw)
  To: Glenn Morris; +Cc: trikl, 10977

>> You could still have them.  The user would simply have to explicitly
>> save it in /some/other/place.
> OIC.
>> FWIW, I think that ".el" should be reserved for files containing Elisp
>> code, rather than any Elisp data; IOW it should be intended for `load'
>> rather than for `read'.  Not sure what to use for Elisp data,
>> tho... maybe ".eld"?

> desktop-read does:
> ;; Evaluate desktop buffer and remember when it was modified.
> (load (desktop-full-file-name) t t t)

Wonderful, then ".emacs.d/desktop.el" would be fine,


        Stefan





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#10977: 24.0.94; filename "emacs.desktop" collides with kde xy*.desktop logic
  2012-03-09  9:55 bug#10977: 24.0.94; filename "emacs.desktop" collides with kde xy*.desktop logic Thomas Rikl
                   ` (2 preceding siblings ...)
  2012-03-09 20:59 ` bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop Th. Rikl
@ 2012-06-21  7:27 ` Chong Yidong
  3 siblings, 0 replies; 19+ messages in thread
From: Chong Yidong @ 2012-06-21  7:27 UTC (permalink / raw)
  To: Thomas Rikl; +Cc: 10977

> Can you please give the "~/.emacs.desktop" an other filename
> resp. extension or (default path) than ".desktop". It collides with
> some KDE mimic which i don't want to describe here. I think an
> extension of ".el" or default name like ".emacs-desktop.el" would be
> perfect. I mean the file created as a result of (desktop-save-mode 1)
> in the startup-file.

I've changed `desktop-path' in trunk so that the desktop file now
defaults to being created in .emacs.d.





^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-06-21  7:27 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-09  9:55 bug#10977: 24.0.94; filename "emacs.desktop" collides with kde xy*.desktop logic Thomas Rikl
2012-03-09 10:04 ` Eli Zaretskii
2012-03-09 18:21 ` Glenn Morris
2012-03-09 20:59 ` bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop Th. Rikl
2012-03-09 21:33   ` Glenn Morris
2012-03-10  7:21     ` Eli Zaretskii
2012-03-10 14:31       ` Stefan Monnier
2012-03-10 19:16         ` Thomas Rikl
2012-03-10 19:25         ` Glenn Morris
2012-03-10 19:28           ` Glenn Morris
2012-03-11  1:39             ` Stefan Monnier
2012-03-12 16:42               ` Glenn Morris
2012-03-12 18:14                 ` Stefan Monnier
2012-03-12 18:49                   ` Glenn Morris
2012-03-12 19:35                     ` Stefan Monnier
2012-03-12  9:34           ` Chong Yidong
2012-03-12 12:38             ` Stefan Monnier
2012-03-12 13:58               ` bug#10977: detail from .xession-errors concerning .desktopextension " Drew Adams
2012-06-21  7:27 ` bug#10977: 24.0.94; filename "emacs.desktop" collides with kde xy*.desktop logic Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).