Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 547792 - app-emacs/emacs-common-gentoo-1.5 emacsclient.desktop has NoDisplay=true
Summary: app-emacs/emacs-common-gentoo-1.5 emacsclient.desktop has NoDisplay=true
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-26 11:00 UTC by José Romildo Malaquias
Modified: 2015-05-04 07:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description José Romildo Malaquias 2015-04-26 11:00:02 UTC
The file emacsclient.desktop has the line "NoDisplay=true".

Is there any reason to not enabling displaying the Emacsclient application entry in the menu?

I would like to be able to select it in a menu, and I do not see any reason for not allowing it.

Please, remove the line NoDisplay=true" from emacsclient.desktop.
Comment 1 Ulrich Müller gentoo-dev 2015-05-02 16:16:15 UTC
This is intentional. Calling emacsclient without an argument doesn't make much sense, therefore it's hidden from the menu.
Comment 2 José Romildo Malaquias 2015-05-03 01:16:10 UTC
(In reply to Ulrich Müller from comment #1)
> This is intentional. Calling emacsclient without an argument doesn't make
> much sense, therefore it's hidden from the menu.

I do not agree. There are many things that can be done with emacsclient without an argument to the command line.

If there is an already running emacs server, why it cannot be used through emacsclient for instance to run a calculator, to read a man page, to read an info page, to interactively open a file, and so on. I should not have to launch emacs again for those activities, as a server is already running and it could be used.

In my current setup I have a key binding to launch emacsclient, but it would be nice if it could be also launched from the menu.

So in my point of view your argument is invalid.
Comment 3 Ulrich Müller gentoo-dev 2015-05-03 08:36:39 UTC
(In reply to José Romildo Malaquias from comment #2)
> I do not agree. There are many things that can be done with emacsclient
> without an argument to the command line.

$ emacsclient
emacsclient: file name or argument required
Try `emacsclient --help' for more information
$ echo $?
1

> If there is an already running emacs server, why it cannot be used through
> emacsclient for instance to run a calculator, to read a man page, to read an
> info page, to interactively open a file, and so on. I should not have to
> launch emacs again for those activities, as a server is already running and
> it could be used.
> 
> In my current setup I have a key binding to launch emacsclient, but it would
> be nice if it could be also launched from the menu.

And how exactly would this work from the menu? It would call /usr/bin/emacsclient without an argument and it would fail (see above). Or am I missing something?
Comment 4 José Romildo Malaquias 2015-05-03 13:38:52 UTC
(In reply to Ulrich Müller from comment #3)
[...]
> And how exactly would this work from the menu? It would call
> /usr/bin/emacsclient without an argument and it would fail (see above). Or
> am I missing something?

With the "-c" command line option. From the help:

-c, --create-frame    	Create a new frame instead of trying to
			use the current Emacs frame

With the "-c" option emacsclient just opens a new frame from where you can start working with emacs.

$ emacsclient -c
Waiting for Emacs...

It just works.
Comment 5 Ulrich Müller gentoo-dev 2015-05-04 07:57:09 UTC
(In reply to José Romildo Malaquias from comment #4)
> With the "-c" command line option. From the help:
> 
> -c, --create-frame    	Create a new frame instead of trying to
> 			use the current Emacs frame
> 
> With the "-c" option emacsclient just opens a new frame from where you can
> start working with emacs.

We currently have this in the desktop file:

   Exec=/usr/bin/emacsclient %F

which doesn't create a new frame. Since this behaviour is in place since 7 years, I must assume that most users are happy with it. So I am not going to change it by adding the --create-frame option.

One could think about having a second desktop entry for emacsclient with "NoDisplay=false" and "Exec=/usr/bin/emacsclient --create-frame --alternate-editor= %F" but I guess that would cause confusion.

If you really need a custom desktop entry then creating one in ~/.local/share/applications/ is easy.