[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 18:44:39 +0200 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
* Eli Zaretskii <eliz@gnu.org> [2019-08-24 18:12]:
> Is the program iterating over the fields in some predefined order?
I can choose which field to edit, like using helm and then choosing a
field to edit. But more often I keep it without helm. There is
completing-read. And I have choices like to choose what to edit, then
it comes back.
> Also, are you feeding back each field individually, or do you need to
> have them all edited before feeding them back as a single record?
Each field individually.
> One possibility would be to let the user edit all the fields in the
> same buffer; then killing that buffer would be your signal that
> everything is ready to be fed back, and you could do that feeding in
> the hook function itself.
There are too many tables, fields, that is not a good solution, and
also not reliable to let too many information pieces waiting to be
inserted back into database.
> > It could be solved if I could hold on find-file, and to know that
> > find-file finished its job, so that Emacs Lisp can continue after
> > find-file
>
> That isn't workable, since find-file finishes its job once it has the
> file's contents in a buffer. The user didn't yet edit the buffer, so
> it is not yet time for you to do anything. Your mental model seems to
> be that find-file only returns when the user finishes editing and
> saves the edits, but that's not how this works in reality.
OK fine, it is not working that way.
Look what I have observed:
M-x shell
ยง emacsclient "file"
it works here inside of M-x shell where it says "Waiting for
Emacs..."
So I can launch emacsclient from shell within Emacs with waiting
stage.
Do you know if I could somehow invoke automatically this below?
To do some invokation like M-x shell, but with the the shell command
something like: `emacsclient file', so to launch emacsclient with such
waiting stage and upon return I could then continue program execution.
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/23
- 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?, 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 <=
- 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?, 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?, 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