[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 15:08:33 +0200 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
* Eli Zaretskii <eliz@gnu.org> [2019-08-24 14:31]:
> > Date: Sat, 24 Aug 2019 14:19:24 +0200
> > From: Jean Louis <bugs@gnu.support>
> > Cc: GNU Emacs Help <help-gnu-emacs@gnu.org>
> >
> > Thanks for helping. I am reading string from PostgreSQL database
> > field. And I wish to edit that string. It is best done if string is
> > first written into the file, so that I can edit the file, and after
> > killing the buffer to read the string from file, so that it can be fed
> > into the database.
>
> That can be done easily, but I cannot resist asking: why do you need
> the intermediate temporary file? Why not insert the string into a
> buffer, let the user edit that string in a buffer, and then have a
> command in that buffer that tells you the user is done editing?
>
> As for feeding the string into the database: can you tell in more
> detail how you are doing that? Are you invoking some external
> program passing it the edited string, for example?
Do you think I could go with this approach:
- use find-file, to return the buffer reference
- install async-start to verify each in a while, like few seconds, in
a loop, if buffer reference exists, and if not to read the file back
as string
Jean
- Re: How to reliably edit a file from within Emacs Lisp and return a string?, (continued)
- Re: How to reliably edit a file from within Emacs Lisp and return a string?, Eli Zaretskii, 2019/08/24
- Re: How to reliably edit a file from within Emacs Lisp and return a string?, Jean Louis, 2019/08/24
- Re: How to reliably edit a file from within Emacs Lisp and return a string?, Eli Zaretskii, 2019/08/24
- Re: How to reliably edit a file from within Emacs Lisp and return a string?, Jean Louis, 2019/08/24
- Re: How to reliably edit a file from within Emacs Lisp and return a string?, Eli Zaretskii, 2019/08/24
- Re: How to reliably edit a file from within Emacs Lisp and return a string?, Jean Louis, 2019/08/24
- Re: How to reliably edit a file from within Emacs Lisp and return a string?, Jean Louis, 2019/08/24
- Re: How to reliably edit a file from within Emacs Lisp and return a string?, Eli Zaretskii, 2019/08/24
- Re: How to reliably edit a file from within Emacs Lisp and return a string?, Yuri Khan, 2019/08/24
- Re: How to reliably edit a file from within Emacs Lisp and return a string?, Jean Louis, 2019/08/24
- Re: How to reliably edit a file from within Emacs Lisp and return a string?,
Jean Louis <=
- Re: How to reliably edit a file from within Emacs Lisp and return a string?, Marcin Borkowski, 2019/08/23
- Re: How to reliably edit a file from within Emacs Lisp and return a string?, Jean Louis, 2019/08/24