[PATCH] emacs: Add compatibility for org-msg.el
Enable `notmuch-company` with `org-msg`, which does not derive from `message-mode` in composing. This change was first proposed in the discussion here: https://github.com/jeremy-compostella/org-msg/issues/53 --- NEWS | 2 ++ emacs/notmuch-company.el | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 09456f60..c167c9a2 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,8 @@ Emacs previous behaviour of using notmuch to send mail by default, customize `mail-user-agent` to `notmuch-user-agent`. +`notmuch-company` now works in `org-msg`. + Vim --- diff --git a/emacs/notmuch-company.el b/emacs/notmuch-company.el index c6a004ae..7e05dc8f 100644 --- a/emacs/notmuch-company.el +++ b/emacs/notmuch-company.el @@ -70,7 +70,8 @@ (completion-ignore-case t)) (cl-case command (interactive (company-begin-backend 'notmuch-company)) - (prefix (and (derived-mode-p 'message-mode) + (prefix (and (or (derived-mode-p 'message-mode) + (derived-mode-p 'org-msg-edit-mode)) (looking-back (concat notmuch-address-completion-headers-regexp ".*") (line-beginning-position)) ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: [PATCH] emacs: Add compatibility for org-msg.el
Thanks for the suggestion, David. Can the commit message be changed or should I resubmit? An elaborated version: - Enable `notmuch-company` with `org-msg`, which does not derive from `message-mode` in composing. This change was first proposed in the discussion here: <https://github.com/jeremy-compostella/org-msg/issues/53> - Thanks, Ori ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
[PATCH] emacs: Add compatibility for org-msg.el
See https://github.com/jeremy-compostella/org-msg/issues/53 --- NEWS | 2 ++ emacs/notmuch-company.el | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 09456f60..c167c9a2 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,8 @@ Emacs previous behaviour of using notmuch to send mail by default, customize `mail-user-agent` to `notmuch-user-agent`. +`notmuch-company` now works in `org-msg`. + Vim --- diff --git a/emacs/notmuch-company.el b/emacs/notmuch-company.el index c6a004ae..7e05dc8f 100644 --- a/emacs/notmuch-company.el +++ b/emacs/notmuch-company.el @@ -70,7 +70,8 @@ (completion-ignore-case t)) (cl-case command (interactive (company-begin-backend 'notmuch-company)) - (prefix (and (derived-mode-p 'message-mode) + (prefix (and (or (derived-mode-p 'message-mode) + (derived-mode-p 'org-msg-edit-mode)) (looking-back (concat notmuch-address-completion-headers-regexp ".*") (line-beginning-position)) -- 2.25.1 ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: Emacs: make browsing URLs friendlier with Helm
Hi David, Keegan Carruthers-Smith posted a patch with a suggested change for this in id:m2r1wrxin8@gmail.com. Could you try that and see if it addresses your concerns? That patch is now in HEAD, but I presume not yet in a release. Yes that patch fixes the issue in Helm. My mistake for searching the list archives for "helm" but not for "ivy"! I had suspected the issue might be similar for other completion frameworks and Keegan confirms this. Ori ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Emacs: make browsing URLs friendlier with Helm
Hi, This is a fairly small point and was easy for me to locally address, and that in itself may be valuable in sharing, but I wondered if it would be worth putting a change behind a defcustom option, or depending on how this works with other completion frameworks, changing it altogether? The "B" shortcut calls notmuch-show-browse-urls, which calls completing-read with an INITIAL-INPUT of the first URL in the message. On Helm, this shows a near-blank list (blank unless other URLs have the first one as a substring). It's a nicer behavior for Helm to start off with no initial input, as that first URL is highlighted automatically anyway. Locally I simply redefine the function with a minor change (highlighted) after loading notmuch: (defun notmuch-show-browse-urls ( kill) "Offer to browse any URLs in the current message. With a prefix argument, copy the URL to the kill ring rather than browsing." (interactive "P") (let ((urls (notmuch-show--gather-urls)) (prompt (if kill "Copy URL to kill ring: " "Browse URL: ")) (fn (if kill #'kill-new #'browse-url))) (if urls (funcall fn (completing-read prompt urls)) (message "No URLs found." For reference, in notmuch-show.el that highlighted part is: (completing-read prompt (cdr urls) nil nil (car urls)) As I said, I'm not sure how this works with other popular completion alternatives like ivy and if the redefined function is better or worse with those. Perhaps this post is only here to be useful for other Helm users! Ori ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch