efar icon indicating copy to clipboard operation
efar copied to clipboard

Option for opening all files in Emacs

Open enzuru opened this issue 2 years ago • 6 comments

I use Emacs in a terminal at work, so xdg-open which is for GUI desktops is not really an appropriate solution for me. Here is my suggested solution.

enzuru avatar Feb 15 '23 20:02 enzuru

Ah nevermind, I see there is a separate key for this. My apologies.

enzuru avatar Feb 15 '23 21:02 enzuru

@suntsov I've been using eFar for about a month now, and now that I have some experience under my belt, I really think this PR would be helpful for us that use Emacs without a GUI inside a Linux terminal. Using XDG doesn't make sense for us terminal users. You can use the other buttons to open or preview a file in Emacs, but it becomes confusing because "Enter" is used for everything else.

I could put a hack that would fix this for me, but I think we should find a way to fix this for all terminal users.

enzuru avatar Mar 06 '23 16:03 enzuru

@enzuru, wouldn't it be the solution, for those who need, just to swap key bindings for efar-do-read-file and efar-do-open-file-in-external-app?

suntsov avatar Mar 07 '23 16:03 suntsov

@suntsov yes agreed, that could also be another hack. But shouldn't eFar have a non-hack support for terminal users right out of the box? It seems unusual that eFar, which can run in Emacs in a terminal, has a dependency on a desktop tool.

There are many terminal users of Emacs, on machines with no X11. Not just *nix servers, but many people use WSL in this fashion, for instance.

Another option is that we find a non-desktop way to determine the external application, but I am not familiar with any other major method.

enzuru avatar Mar 07 '23 17:03 enzuru

OK, agreed. Might it be better to use display-graphic-p instead of new customization variable then? https://www.gnu.org/software/emacs/manual/html_node/elisp/Display-Feature-Testing.html

suntsov avatar Mar 08 '23 04:03 suntsov

@suntsov I like that idea, but one problem is that it is also possible that some people with GUI desktops use Emacs in a terminal, and would want their terminal Emacs to open up files on their desktop, so we do not want to harm those users either.

So many kinds of Emacs users, it's tough to cater to all their use cases :D

enzuru avatar Mar 08 '23 16:03 enzuru