unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* .desktop file for emacs
@ 2007-12-04  7:15 Dan Nicolaescu
  2007-12-04  7:32 ` Ulrich Mueller
       [not found] ` <E1IzkSJ-0005ZR-Mv@fencepost.gnu.org>
  0 siblings, 2 replies; 11+ messages in thread
From: Dan Nicolaescu @ 2007-12-04  7:15 UTC (permalink / raw)
  To: emacs-devel


It seems that the current practice is for applications to provide a
.desktop file that is used to show an icon associated+text with an
application in menus or on the desktop (and maybe more).

Shouldn't emacs provide such a file? Can someone that understands how
this is supposed to work please add one to CVS ?

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

* Re: .desktop file for emacs
  2007-12-04  7:15 .desktop file for emacs Dan Nicolaescu
@ 2007-12-04  7:32 ` Ulrich Mueller
       [not found] ` <E1IzkSJ-0005ZR-Mv@fencepost.gnu.org>
  1 sibling, 0 replies; 11+ messages in thread
From: Ulrich Mueller @ 2007-12-04  7:32 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

>>>>> On Mon, 03 Dec 2007, Dan Nicolaescu wrote:

> It seems that the current practice is for applications to provide a
> .desktop file that is used to show an icon associated+text with an
> application in menus or on the desktop (and maybe more).

> Shouldn't emacs provide such a file? Can someone that understands how
> this is supposed to work please add one to CVS ?

As a starting point, you may look at the ones that Gentoo is using for
Emacs and emacsclient:
<http://overlays.gentoo.org/proj/emacs/browser/emacs-extra/emacs-desktop>

The specification of the file format is here:
<http://standards.freedesktop.org/desktop-entry-spec/latest/>

Ulrich

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

* Re: .desktop file for emacs
       [not found]   ` <200712050447.lB54lJFP014573@oogie-boogie.ics.uci.edu>
@ 2007-12-06  2:12     ` Richard Stallman
  2007-12-08  1:41       ` Dan Nicolaescu
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2007-12-06  2:12 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

    I am not sure I understand your question. Let me restate what I was
    trying to say: a file called emacs.desktop would be installed in 
    /usr/share/applications. 
    It seems that files in /usr/share/applications are parsed and used to
    fill in the menus that appear at the top of the desktop in Gnome.

Now that I understand the idea, it sounds like a good thing to do.
Would someone like to implement this?

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

* Re: .desktop file for emacs
  2007-12-06  2:12     ` Richard Stallman
@ 2007-12-08  1:41       ` Dan Nicolaescu
  2007-12-08  8:36         ` Ulrich Mueller
                           ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Dan Nicolaescu @ 2007-12-08  1:41 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

  >     I am not sure I understand your question. Let me restate what I was
  >     trying to say: a file called emacs.desktop would be installed in 
  >     /usr/share/applications. 
  >     It seems that files in /usr/share/applications are parsed and used to
  >     fill in the menus that appear at the top of the desktop in Gnome.
  > 
  > Now that I understand the idea, it sounds like a good thing to do.
  > Would someone like to implement this?

I added an emacs.desktop file.
Reviewing for correctness would be greatly appreciated as would figuring
out how to install it correctly.  Once everything works right we can
do the same on the 22.2 branch.

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

* Re: .desktop file for emacs
  2007-12-08  1:41       ` Dan Nicolaescu
@ 2007-12-08  8:36         ` Ulrich Mueller
  2007-12-08 21:38           ` Dan Nicolaescu
  2007-12-08 11:49         ` Eli Zaretskii
  2007-12-09 12:37         ` Richard Stallman
  2 siblings, 1 reply; 11+ messages in thread
From: Ulrich Mueller @ 2007-12-08  8:36 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: rms, emacs-devel

[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 1623 bytes --]

>>>>> On Fri, 07 Dec 2007, Dan Nicolaescu wrote:

> I added an emacs.desktop file.
> Reviewing for correctness would be greatly appreciated

Checking the file with "desktop-file-validate" (available at
<http://www.freedesktop.org/software/desktop-file-utils/>) results in
the following output:

   $ desktop-file-validate emacs.desktop
   emacs.desktop: error: value "emacs_32.png" for key "Icon" in group
      "Desktop Entry" is an icon name with an extension, but there
      should be no extension as described in the Icon Theme
      Specification if the value is not an absolute path
   emacs.desktop: warning: value "Application;Development;TextEditor;"
      for key "Categories" in group "Desktop Entry" contains a
      deprecated value "Application"
   emacs.desktop: warning: key "Encoding" in group "Desktop Entry" is
      deprecated

Also, the argument given to the "Exec" command should probably be "%F"
instead of "%f" since more than one filename argument is allowed.
Patch for the above is attached.

One could also change the tooltip to say "Emacs is the extensible,
customizable, self-documenting real-time display editor" instead of
"Edit text", but this is of course a matter of taste.

> as would figuring out how to install it correctly.

Basically, the desktop entry should go to /usr/share/applications/ and
the icon(s) either to /usr/share/pixmaps/emacs_32.png or (preferred)
to $XDG_DATA_DIRS/icons/hicolor/{16x16,24x24,32x32,48x48}/emacs.png
(where XDG_DATA_DIRS is most likely just /usr/share), as described in
<http://standards.freedesktop.org/icon-theme-spec/latest/ar01s03.html>.

Ulrich


[-- Attachment #2: emacs.desktop.patch --]
[-- Type: text/plain, Size: 636 bytes --]

--- etc/emacs.desktop~	2007-12-08 02:39:15.000000000 +0100
+++ etc/emacs.desktop	2007-12-08 09:03:31.000000000 +0100
@@ -1,12 +1,11 @@
 [Desktop Entry]
 Name=Emacs
 GenericName=Text Editor
 Comment=Edit text
 MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
-Exec=emacs %f
-Icon=emacs_32.png
+Exec=emacs %F
+Icon=emacs_32
 Type=Application
 Terminal=false
-Categories=Application;Development;TextEditor;
-Encoding=UTF-8
+Categories=Development;TextEditor;
 StartupWMClass=Emacs

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: .desktop file for emacs
  2007-12-08  1:41       ` Dan Nicolaescu
  2007-12-08  8:36         ` Ulrich Mueller
@ 2007-12-08 11:49         ` Eli Zaretskii
  2007-12-09 12:37         ` Richard Stallman
  2 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2007-12-08 11:49 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: rms, emacs-devel

> From: Dan Nicolaescu <dann@ics.uci.edu>
> Date: Fri, 07 Dec 2007 17:41:48 -0800
> Cc: emacs-devel@gnu.org
> 
> Once everything works right we can do the same on the 22.2 branch.

What for?  22.2 is a stable branch, so only bugfixes should go there.

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

* Re: .desktop file for emacs
  2007-12-08  8:36         ` Ulrich Mueller
@ 2007-12-08 21:38           ` Dan Nicolaescu
  2007-12-09  1:53             ` Glenn Morris
  2007-12-09 10:56             ` Jan Djärv
  0 siblings, 2 replies; 11+ messages in thread
From: Dan Nicolaescu @ 2007-12-08 21:38 UTC (permalink / raw)
  To: Ulrich Mueller; +Cc: rms, emacs-devel

Ulrich Mueller <ulm@gentoo.org> writes:

  > >>>>> On Fri, 07 Dec 2007, Dan Nicolaescu wrote:
  > 
  > > I added an emacs.desktop file.
  > > Reviewing for correctness would be greatly appreciated
  > 
  > Checking the file with "desktop-file-validate" (available at
  > <http://www.freedesktop.org/software/desktop-file-utils/>) results in
  > the following output:
  > 
  >    $ desktop-file-validate emacs.desktop
  >    emacs.desktop: error: value "emacs_32.png" for key "Icon" in group
  >       "Desktop Entry" is an icon name with an extension, but there
  >       should be no extension as described in the Icon Theme
  >       Specification if the value is not an absolute path
  >    emacs.desktop: warning: value "Application;Development;TextEditor;"
  >       for key "Categories" in group "Desktop Entry" contains a
  >       deprecated value "Application"
  >    emacs.desktop: warning: key "Encoding" in group "Desktop Entry" is
  >       deprecated
  > 
  > Also, the argument given to the "Exec" command should probably be "%F"
  > instead of "%f" since more than one filename argument is allowed.
  > Patch for the above is attached.

Thanks, I installed those fixes.

  > One could also change the tooltip to say "Emacs is the extensible,
  > customizable, self-documenting real-time display editor" instead of
  > "Edit text", but this is of course a matter of taste.

Agreed. I hope someone can come up with something better than "Edit
Text" and check that in.

  > > as would figuring out how to install it correctly.
  > 
  > Basically, the desktop entry should go to /usr/share/applications/ and
  > the icon(s) either to /usr/share/pixmaps/emacs_32.png or (preferred)
  > to $XDG_DATA_DIRS/icons/hicolor/{16x16,24x24,32x32,48x48}/emacs.png
  > (where XDG_DATA_DIRS is most likely just /usr/share), as described in
  > <http://standards.freedesktop.org/icon-theme-spec/latest/ar01s03.html>.

Does this mean the icons are not installed in the correct directory
right now?

Given that you seem to understand this, do you want to provide a patch?

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

* Re: .desktop file for emacs
  2007-12-08 21:38           ` Dan Nicolaescu
@ 2007-12-09  1:53             ` Glenn Morris
  2007-12-09 10:56             ` Jan Djärv
  1 sibling, 0 replies; 11+ messages in thread
From: Glenn Morris @ 2007-12-09  1:53 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: Ulrich Mueller, rms, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 217 bytes --]


The Red Hat version of this file is /usr/share/applications/gnu-emacs.desktop.
It has a bunch of translations that may be worth adding.

I hope it is attached below, attachments often seem problematic on
this list.


[-- Attachment #2: Red Hat emacs.desktop file --]
[-- Type: application/octet-stream, Size: 1109 bytes --]

[Desktop Entry]
Name=Emacs Text Editor
Name[bg]=редактор Emacs
Name[ca]=Editor Emacs
Name[cs]=Editor Emacs
Name[da]=Emacs tekstredigerer
Name[de]=Emacs Texteditor
Name[eo]=La redaktilo Emakso
Name[et]=Võimas tekstiredaktor Emacs
Name[fi]=Emacs editori
Name[fr]=Éditeur Emacs
Name[hu]=Emacs szövegszerkesztő
Name[is]=Emacs-ritill
Name[ja]=Emacs テキスト・エディター
Name[mk]=Софистицираниот Emacs уредувач
Name[no]=Emacs-tekstredigerer
Name[pt]=Editor Emacs
Name[ro]=Editorul Emacs
Name[ru]=Редактор Emacs
Name[sk]=Editor Emacs
Name[sl]=Urejevalnik Emacs
Name[uk]=Редактор Emacs
Name[zh_TW]=Emacs 文字編輯器
GenericName=Text Editor
Comment=Edit text
Comment[zh_TW]=編輯文字
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=emacs %f
Icon=emacs.png
Type=Application
Terminal=false
Categories=Application;Development;TextEditor;X-Red-Hat-Base;
Encoding=UTF-8
StartupWMClass=Emacs

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: .desktop file for emacs
  2007-12-08 21:38           ` Dan Nicolaescu
  2007-12-09  1:53             ` Glenn Morris
@ 2007-12-09 10:56             ` Jan Djärv
  2007-12-09 17:24               ` Dan Nicolaescu
  1 sibling, 1 reply; 11+ messages in thread
From: Jan Djärv @ 2007-12-09 10:56 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: Ulrich Mueller, rms, emacs-devel



Dan Nicolaescu skrev:
> Ulrich Mueller <ulm@gentoo.org> writes:
> 
>   > >>>>> On Fri, 07 Dec 2007, Dan Nicolaescu wrote:
>   > 
>   > > as would figuring out how to install it correctly.
>   > 
>   > Basically, the desktop entry should go to /usr/share/applications/ and
>   > the icon(s) either to /usr/share/pixmaps/emacs_32.png or (preferred)
>   > to $XDG_DATA_DIRS/icons/hicolor/{16x16,24x24,32x32,48x48}/emacs.png
>   > (where XDG_DATA_DIRS is most likely just /usr/share), as described in
>   > <http://standards.freedesktop.org/icon-theme-spec/latest/ar01s03.html>.
> 
> Does this mean the icons are not installed in the correct directory
> right now?
> 
> Given that you seem to understand this, do you want to provide a patch?

Please don't.  A normal user should be able to install Emacs to a prefix of 
his choice.  I have several Emacs instances installed at different prefixes.

	Jan D.

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

* Re: .desktop file for emacs
  2007-12-08  1:41       ` Dan Nicolaescu
  2007-12-08  8:36         ` Ulrich Mueller
  2007-12-08 11:49         ` Eli Zaretskii
@ 2007-12-09 12:37         ` Richard Stallman
  2 siblings, 0 replies; 11+ messages in thread
From: Richard Stallman @ 2007-12-09 12:37 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

    Reviewing for correctness would be greatly appreciated as would figuring
    out how to install it correctly.  Once everything works right we can
    do the same on the 22.2 branch.

In general we don't want to put unnecessary changes in the Emacs 22 branch.
However, a change like this which consists of a separate new file
may be ok, because it can't possibly break anything else.

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

* Re: .desktop file for emacs
  2007-12-09 10:56             ` Jan Djärv
@ 2007-12-09 17:24               ` Dan Nicolaescu
  0 siblings, 0 replies; 11+ messages in thread
From: Dan Nicolaescu @ 2007-12-09 17:24 UTC (permalink / raw)
  To: Jan Djärv; +Cc: Ulrich Mueller, rms, emacs-devel

Jan Djärv <jan.h.d@swipnet.se> writes:

  > Dan Nicolaescu skrev:
  > > Ulrich Mueller <ulm@gentoo.org> writes:
  > >
  > >   > >>>>> On Fri, 07 Dec 2007, Dan Nicolaescu wrote:
  > >   >   > > as would figuring out how to install it correctly.
  > >   >   > Basically, the desktop entry should go to
  > > /usr/share/applications/ and
  > >   > the icon(s) either to /usr/share/pixmaps/emacs_32.png or (preferred)
  > >   > to $XDG_DATA_DIRS/icons/hicolor/{16x16,24x24,32x32,48x48}/emacs.png
  > >   > (where XDG_DATA_DIRS is most likely just /usr/share), as described in
  > >   > <http://standards.freedesktop.org/icon-theme-spec/latest/ar01s03.html>.
  > >
  > > Does this mean the icons are not installed in the correct directory
  > > right now?
  > >
  > > Given that you seem to understand this, do you want to provide a patch?
  > 
  > Please don't.  A normal user should be able to install Emacs to a
  > prefix of his choice.  I have several Emacs instances installed at
  > different prefixes.

There should not be a problem with that, if the destination directory is
relative to ${datadir}. That should make it work fine for your situation
and in the case when prefix is /usr it will do the right thing.

Ulrich's post shows that the current installation method for icons is
incorrect: they should go
$XDG_DATA_DIRS/icons/hicolor/{16x16,24x24,32x32,48x48}/emacs.png
Not sure how to test this, but it seems unlikely that whatever programs
look for icons would be able to find an icon called emacs_16.png or
emacs_48.png (no other programs seem to install icons with names like this). 

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

end of thread, other threads:[~2007-12-09 17:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-04  7:15 .desktop file for emacs Dan Nicolaescu
2007-12-04  7:32 ` Ulrich Mueller
     [not found] ` <E1IzkSJ-0005ZR-Mv@fencepost.gnu.org>
     [not found]   ` <200712050447.lB54lJFP014573@oogie-boogie.ics.uci.edu>
2007-12-06  2:12     ` Richard Stallman
2007-12-08  1:41       ` Dan Nicolaescu
2007-12-08  8:36         ` Ulrich Mueller
2007-12-08 21:38           ` Dan Nicolaescu
2007-12-09  1:53             ` Glenn Morris
2007-12-09 10:56             ` Jan Djärv
2007-12-09 17:24               ` Dan Nicolaescu
2007-12-08 11:49         ` Eli Zaretskii
2007-12-09 12:37         ` Richard Stallman

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).