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: Jean Louis
Subject: Re: How to reliably edit a file from within Emacs Lisp and return a string?
Date: Sat, 24 Aug 2019 14:20:32 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

* Robert Pluim <rpluim@gmail.com> [2019-08-23 16:15]:
> >>>>> 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.

Let me inspect that.



reply via email to

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