help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to reliably edit a file from within Emacs Lisp and return a stri


From: Robert Pluim
Subject: Re: How to reliably edit a file from within Emacs Lisp and return a string?
Date: Fri, 23 Aug 2019 16:14:02 +0200

>>>>> On Fri, 23 Aug 2019 16:01:45 +0200, Jean Louis <bugs@gnu.support> said:
    Jean> I would be happy if I can do something like:

    Jean> (defun emacsclient-edit (file)
    Jean>   (shell-command (format "emacsclient %s " file))
    Jean>   (file-to-string file))

    Jean> But that does not work within Emacs itself. Would that work, I would 
be fine.

    Jean> It is somehow strange that I can run emacsclient from outside
    Jean> Emacs and edit file and know that emacsclient finished its job,
    Jean> and read the string from file, and that I cannot do the same from
    Jean> Emacs.

Iʼd investigate the 'with-editor' package, which lets you use
emacsclient to talk back to the emacs itʼs run from.

Robert



reply via email to

[Prev in Thread] Current Thread [Next in Thread]