all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Async processes to be persistent even after exiting Emacs
@ 2021-04-22 20:01 Boruch Baum
  2021-04-22 21:03 ` Jean Louis
  0 siblings, 1 reply; 2+ messages in thread
From: Boruch Baum @ 2021-04-22 20:01 UTC (permalink / raw)
  To: Emacs-Devel List

The standard built-in method that Emacs uses to spawn an asynchronous
processes doesn't enable those processes to survive the killing of their
process buffers, and certainly not to survive exiting emacs.

I've posted[1] a commit demonstrating a flexible method to optionally
circumvent those limitations. My use-case is my desire to be able to use
dired to open a file in an operating system's default external program
(ala xdg-open), and have that process persist even after exiting Emacs.


[1] https://github.com/Boruch-Baum/emacs-diredc/commit/a46b61817610e4ad3824b5a87393217f1b3cdd2c

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0



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

* Re: Async processes to be persistent even after exiting Emacs
  2021-04-22 20:01 Async processes to be persistent even after exiting Emacs Boruch Baum
@ 2021-04-22 21:03 ` Jean Louis
  0 siblings, 0 replies; 2+ messages in thread
From: Jean Louis @ 2021-04-22 21:03 UTC (permalink / raw)
  To: Boruch Baum; +Cc: Emacs-Devel List

* Boruch Baum <boruch_baum@gmx.com> [2021-04-22 23:16]:
> The standard built-in method that Emacs uses to spawn an asynchronous
> processes doesn't enable those processes to survive the killing of their
> process buffers, and certainly not to survive exiting emacs.

That is useful. I am launching software through Emacs and often those
programs should persist.

It would be good to have some prefix or similar command to make it
persist.

As a side note, not quite relate, but could be, some software I cannot
launch with M-! but it works with M-& -- example is rox and retext. It
is very unclear why is this happening, do you maybe know a reason?

For example this below does not work with `retext' editor neither M-!
retext works, but M-& retext does work.

(defun rcd-edit-with-external-editor ()
  (interactive)
  (let* ((buffer (current-buffer))
	 (text (buffer-substring-no-properties (point-min) (point-max)))
	 (mode major-mode)
	 (file (concat (or (getenv "TMPDIR") "/tmp/") "temp-file")))
    (string-to-file-force text file)
    (shell-command (format "retext %s" file))
    (erase-buffer)
    (insert (file-to-string file))
    (goto-char 0)))

If I use other GUI editor it does work.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/
https://rms-support-letter.github.io/




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

end of thread, other threads:[~2021-04-22 21:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-22 20:01 Async processes to be persistent even after exiting Emacs Boruch Baum
2021-04-22 21:03 ` Jean Louis

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.