Giter VIP home page Giter VIP logo

Comments (11)

obar avatar obar commented on September 20, 2024 1

This is now patched in notmuch and it'll be in the next release, thanks @runekaagaard! This issue can be closed.

from org-msg.

obar avatar obar commented on September 20, 2024

I think it should go into notmuch-company as that's where the restriction happens. The code you wrote seems fine for a contribution to that package. As it stands, org-msg and notmuch are working happily together on my system with #49 and there isn't an interference with notmuch address completion.

from org-msg.

runekaagaard avatar runekaagaard commented on September 20, 2024

Guess you are right. I'm on outlook, not google so your solution at #49 does not apply to me.

from org-msg.

obar avatar obar commented on September 20, 2024

I should say that my comment in the other thread is just for an address source, and there are other options for notmuch. Have you looked through notmuch-address.el? Perhaps you'll find useful avenues to explore there.

from org-msg.

arvindsv avatar arvindsv commented on September 20, 2024

@runekaagaard This is really hacky but I use this to get past this issue:

(defun arvindsv/org-msg-notmuch-company (old-fn &rest args)
  ;; Cheat and say that this buffer, which should be org-msg-edit-mode, is derived from message-mode.
  (cl-letf (((symbol-function 'derived-mode-p) (lambda (mode) (if (eq mode 'message-mode) t (derived-mode-p mode)))))
    (apply old-fn args)))

(advice-add 'notmuch-company :around #'arvindsv/org-msg-notmuch-company)

from org-msg.

runekaagaard avatar runekaagaard commented on September 20, 2024

@arvindsv Heh, Thats great, thx!!

from org-msg.

joshuaoco avatar joshuaoco commented on September 20, 2024

@runekaagaard This is really hacky but I use this to get past this issue:

(defun arvindsv/org-msg-notmuch-company (old-fn &rest args)
  ;; Cheat and say that this buffer, which should be org-msg-edit-mode, is derived from message-mode.
  (cl-letf (((symbol-function 'derived-mode-p) (lambda (mode) (if (eq mode 'message-mode) t (derived-mode-p mode)))))
    (apply old-fn args)))

(advice-add 'notmuch-company :around #'arvindsv/org-msg-notmuch-company)

With this, I'm getting Company: backend company-capf error "Lisp nesting exceeds ‘max-lisp-eval-depth’" with args (prefix)

Any ideas why that would be?

And perhaps a slightly less hacky version (which has the same issue as above) is to add org-msg-edit-mode to the derived-mode list.

(put 'org-msg-edit-mode 'derived-mode-parent 'message-mode)

But, having said that, it doesn't work :)

from org-msg.

HyunggyuJang avatar HyunggyuJang commented on September 20, 2024

@Joshuao95, I suspect that you might have not set notmuch-company as a backend for org-msg-edit-mode, not the notmuch-message-mode, which the the default one. After setting it properly, and with your suggested tweak, I achieved posed desirable behavior. Maybe it is worth to try.

from org-msg.

joshuaoco avatar joshuaoco commented on September 20, 2024

@HyunggyuJang Perfect, thanks a lot, that solves it for me too

from org-msg.

HyunggyuJang avatar HyunggyuJang commented on September 20, 2024

@Joshuao95 ;)

from org-msg.

runekaagaard avatar runekaagaard commented on September 20, 2024

Beautiful!

from org-msg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.