jeremy-compostella / org-msg

OrgMsg is a GNU/Emacs global minor mode mixing up Org mode and Message mode to compose and reply to emails in a Outlook HTML friendly style.
GNU General Public License v3.0
275 stars 58 forks source link

Notmuch support #49

Closed obar closed 4 years ago

obar commented 4 years ago

Closes #18

runekaagaard commented 4 years ago

This works very nicely for me, thank you so much!

runekaagaard commented 4 years ago

@obar Do you have a fix to getting autocomplete in the To field working? I think it's broken in org-msg, but not in default notmuch compose.

obar commented 4 years ago

@runekaagaard I am currently using goobook called from a shell script to query and cache Google Contacts for this. In my config:

(use-package notmuch-address
  :after notmuch
  :config
  (setq notmuch-address-command "/home/ori/bin/goocontactquery.sh")
  (setq notmuch-address-selection-function
        (lambda (prompt collection initial-input)
          (completing-read prompt (cons initial-input collection) nil t nil 'notmuch-address-history))))

With my completing-read taken care of by Helm and the goocontactquery.sh script:

script #!/bin/sh
goobook query "$*" | sed 's/\(.*\)\t\(.*\)\t.*/\2 \<\1\>/' | sed '/^$/d'

This is my solution to keep my phone contacts and email contacts combined. It's not org-msg related but I hope it helps!

matheuristic commented 4 years ago

@obar This works really nicely, but I noticed that "C-c C-k" (org-msg-edit-kill-buffer) does not work currently because org-msg-edit-kill-buffer (via org-msg-mua-call) attempts to call org-msg-edit-kill-buffer-notmuch which isn't defined so nothing happens.

Adding the following defalias fixes it (at least for me).

  (defalias 'org-msg-edit-kill-buffer-notmuch 'message-kill-buffer)
obar commented 4 years ago

Thanks @matheuristic! I had applied my changes which were older than 2d0540c when message-kill-buffer was split up. Will update this pull request.

runekaagaard commented 4 years ago

Hi @obar. An onexpected behaviour happens when the mail fails to send. Then the content is replaced with the html and you have to press undo in the mail buffer before resending.

obar commented 4 years ago

I suspect the same would occur for other mail clients. Perhaps this isn't a blocker for the pull request but rather its own new issue for the project?

runekaagaard commented 4 years ago

Ahh yes of course, you are right.

jeremy-compostella commented 4 years ago

I suspect the same would occur for other mail clients. Perhaps this isn't a blocker for the pull request but rather its own new issue for the project?

Right. Feel free to file an issue for this.

jeremy-compostella commented 4 years ago

Thanks for the contribution !

obar commented 4 years ago

@jeremy-compostella thank you for the very useful package!