From: Pankaj Jangid <pankaj@codeisgreat.org>
To: Emacs Developers <emacs-devel@gnu.org>
Subject: How to execute code after start-process completion?
Date: Sat, 26 Sep 2020 19:30:41 +0530 [thread overview]
Message-ID: <m2k0wg63jq.fsf@codeisgreat.org> (raw)
I am working on tiny customization of my Gnus. And using the function
`start-process` to call `notmuch new`.
#+BEGIN_SRC emacs-lisp
(add-hook 'gnus-after-getting-new-news-hook
(lambda ()
(start-process "notmuch" "*Notmuch*" "notmuch" "new")
;; (print (current-time-string) (get-buffer "*Notmuch*"))
))
#+END_SRC
After completion of the process (`notmuch new`), I want to execute some
code. As you can see above, I want to put the timestamp in the *Notmuch*
buffer. I know that `start-process` returns the process object. But I
couldn't find how to use it. Please share any pointers/code-snippet on
how to use that object accomplish what I want to do? Or may be there is
a different way to do the task. Please advise.
--
Pankaj Jangid
next reply other threads:[~2020-09-26 14:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-26 14:00 Pankaj Jangid [this message]
2020-09-26 14:21 ` How to execute code after start-process completion? Eli Zaretskii
2020-09-26 16:45 ` Pankaj Jangid
2020-09-26 14:22 ` Daniel Martín
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2k0wg63jq.fsf@codeisgreat.org \
--to=pankaj@codeisgreat.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.