|
From: | Max Nikulin |
Subject: | Re: [BUG] org-open-file immediately termininates when calling xdg-open that calls emacsclient |
Date: | Thu, 26 May 2022 23:14:16 +0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 |
On 26/05/2022 21:24, Ihor Radchenko wrote:
Max Nikulin writes: Try the following: (start-process-shell-command "1" nil "emacsclient -c ~/.bashrc") (let ((process-connection-type nil)) (start-process-shell-command "1" nil "emacsclient -c ~/.bashrc")) The second command will cause flickering, though opens the file in the same frame (not the new as one would expect from -c switch).
Both commands creates a new frame in Emacs-26 and Emacs-27. I have not tried 28 yet.
You may try if the following works for you (borrowed from `browse-url-xdg-open')
(let ((url "~/.bashrc")) (call-process "xdg-open" nil 0 nil url))Such approach has an advantage: viewer remains running after exit from Emacs.
You may submit an emacs bug for `mailcap-view-file' that should have similar behavior.
P.S. I still believe that Emacs configuration for mailcap.el is broken if external handler is invoked from Emacs just to execute emacsclient. On the other hand it should not lead to Emacs crash.
[Prev in Thread] | Current Thread | [Next in Thread] |