Re: [PATCH] emacs: new notmuch-tree-process-hook
On Tue, Aug 16 2022, j...@gnu.org wrote: > Hook run when the tree insertion process finishes its job. > > -- > > Right now, it can be used for silly things like removing or changing > the the "End of search." hardcoded message in the tree buffer. But > also for more sophisticated things like folding all threads in add-ons > like my outline mode for tree buffers (to be submitted). 2 things: - is the name matching to the functionality enough - IIRC if "hook" function takes args it should not be named as *-hook (?) (but *-functions) Tomi > > Signed-off-by: jao > --- > emacs/notmuch-tree.el | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el > index f63ac9a5..265f7c1f 100644 > --- a/emacs/notmuch-tree.el > +++ b/emacs/notmuch-tree.el > @@ -1084,6 +1084,12 @@ Complete list of currently available key bindings: >(setq buffer-read-only t) >(setq truncate-lines t)) > > +(defvar notmuch-tree-process-hook nil > + "Hook executed when the process inserting a tree of results finishes. > + > +Functions in this hook are called with one argument, the process > +object, with the tree results buffer as the current buffer.") > + > (defun notmuch-tree-process-sentinel (proc _msg) >"Add a message to let user know when \"notmuch tree\" exits." >(let ((buffer (process-buffer proc)) > @@ -1102,7 +1108,8 @@ Complete list of currently available key bindings: > (insert "End of search results.") > (unless (= exit-status 0) > (insert (format " (process returned %d)" exit-status))) > - (insert "\n") > + (insert "\n" > + (run-hook-with-args 'notmuch-tree-process-hook proc)) > > (defun notmuch-tree-process-filter (proc string) >"Process and filter the output of \"notmuch show\" for tree view." > -- > 2.37.2 > > ___ > notmuch mailing list -- notmuch@notmuchmail.org > To unsubscribe send an email to notmuch-le...@notmuchmail.org ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
[PATCH] emacs: new notmuch-tree-process-hook
Hook run when the tree insertion process finishes its job. -- Right now, it can be used for silly things like removing or changing the the "End of search." hardcoded message in the tree buffer. But also for more sophisticated things like folding all threads in add-ons like my outline mode for tree buffers (to be submitted). Signed-off-by: jao --- emacs/notmuch-tree.el | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index f63ac9a5..265f7c1f 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -1084,6 +1084,12 @@ Complete list of currently available key bindings: (setq buffer-read-only t) (setq truncate-lines t)) +(defvar notmuch-tree-process-hook nil + "Hook executed when the process inserting a tree of results finishes. + +Functions in this hook are called with one argument, the process +object, with the tree results buffer as the current buffer.") + (defun notmuch-tree-process-sentinel (proc _msg) "Add a message to let user know when \"notmuch tree\" exits." (let ((buffer (process-buffer proc)) @@ -1102,7 +1108,8 @@ Complete list of currently available key bindings: (insert "End of search results.") (unless (= exit-status 0) (insert (format " (process returned %d)" exit-status))) - (insert "\n") + (insert "\n" + (run-hook-with-args 'notmuch-tree-process-hook proc)) (defun notmuch-tree-process-filter (proc string) "Process and filter the output of \"notmuch show\" for tree view." -- 2.37.2 ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: [Emacs] Using notmuch-address with EUDC, and completion-at-point
Hello David, David Bremner writes: > [...] >> You could do >> >> (require 'eudcb-notmuch-address) >> (eudc-notmuch-address-set-server "localhost") >> >> and bind the function eudc-expand-inline to a key chord of your choice >> in message-mode-map. >> >> Then you'd no longer have to tweak message-completion-alist. > > I stopped my investigations at the point it looked like I needed to edit > notmuch-address.el. I guess another patch or two is needed to do notmuch > integration. And of course we would need tests (in the notmuch test > suite) and documentation before actually merging the functionality, but > those can probably wait until we have a clearer idea what benefits the > change would bring. I agree with your assessment that the benefit in the very short term is not too big. If and when the proposal I made on emacs-devel, to modify how email address completion is handled in Emacs's message.el should get accepted & merged, then the enabled changes would be much bigger: no integration with message.el needed (i.e. no more need to hook into message-completion-alist), single point of interface will be EUDC, no more integration with company needed. >From what it sound s like, it would seem to make more sense to wait for that Emacs patch to get merged? Bundling the new code with notmuch, but without any integration with the rest of it, effectively leaving it to users to figure out how to make use of it wouldn't seem to make too much sense, OTOH. >> This assumes that eudc-expand-inline is present in Emacs 27, of course, >> which I admittedly haven't checked. > > The function exists here in Emacs 27.1. > [...] Thanks for confirming! Cheers, --alexander ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: [PATCH] test: increase cffi timeout
michaeljgruber+grubix+...@gmail.com writes: > From: Michael J Gruber > > By default, the test suite uses 2min for other tests and 5s for cffi > tests. Sporadically, this leads to test failures caused by the timeout > on slower or loaded test infrastructure (as seen on ppc64le in Fedora's > infrastructure during branch time). > > Increase the cffi timeout to the same 2m=120s. > > Signed-off-by: Michael J Gruber > --- > It's the first time I encountered this on Fedora's infrastructure during > a test build. In any case, having the timeouts similar may make sense in > general, unless we typically run into them in normal (local) use. > Applied to release and master. It is still not exactly consistent with the other tests, since the remaining tests have a 2 minute timeout per test script T*.sh, not per subtest. The python CFFI tests have timeouts for both. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org