Re: file-error "not a regular file"
This seems to have done the trick! Thank you so much! This is wrong for notmuch - you need to use `notmuch-mua-send' rather > than calling `message-send' directly. On Tue, Dec 29, 2015 at 4:48 PM, David Edmondson wrote: > On Tue, Dec 29 2015, Peter Salazar wrote: > > send-message-without-bullets simply turns off org-bullets-mode before > doing > > message-send, since org-bullets-mode seemed to be interfering with > > org-mime-htmlize. > > > > (defun send-message-without-bullets () > > (interactive) > > (remove-hook 'org-mode-hook 'org-bullets-mode) > > (message-send) > > This is wrong for notmuch - you need to use `notmuch-mua-send' rather > than calling `message-send' directly. > > > (add-hook 'org-mode-hook 'org-bullets-mode)) > > > > I also have this: > > > > (setq message-send-hook (quote (org-mime-htmlize))) > > > > > > On Tue, Dec 29, 2015 at 3:44 PM, David Bremner > wrote: > > > >> Peter Salazar writes: > >> > >> > >> > Yes, following your steps, emacs -q followed by "M-x load-library > >> > >> > notmuch", I was able to send an email without the error. It prompted > me > >> for > >> > my smtp server, username, and password, then returned this: > >> > > >> > >> [snip] > >> > Does this give us any leads? > >> > >> It seems to be some interaction with your configuration. I'm not > >> familiar with this "send-message-without-bullets" function. Perhaps you > >> could point us to the source? > >> > >> d > >> > >> > > ___ > > notmuch mailing list > > notmuch@notmuchmail.org > > https://notmuchmail.org/mailman/listinfo/notmuch > ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: notmuch-mua and jl-encrypt (was: file-error "not a regular file")
Hi fauno, On Wed, Dec 30 2015, fauno wrote: > Michal Sojka writes: >> can you share more details about how do you use jl-encrypt and which >> functions do not work? Recently, I posted a few patches that fix some >> problems related to the replacing message-mode with >> notmuch-message-mode. Maybe, there is more what we can do to not break >> user's setups. > > i've been using jl-encrypt unmodified with notmuch for a while now. i > just require it on my .emacs > > since 0.21, i had to rebind notmuch-message-mode C-c C-c and C-s C-s > keys: > > (define-key notmuch-message-mode-map (kbd "C-c C-c") > 'jl-message-send-and-exit) > (define-key notmuch-message-mode-map (kbd "C-c C-s") 'jl-message-send) > > and solved the issue of fcc by setting notmuch-fcc-dirs to nil and > making my mta send me bcc of my own email. > > this has worked correctly for the last week. > >> From a brief look at jl-encrypt, it seems it is tightly bound to gnus, >> because it uses gnus-message-setup-hook. Maybe it will work again with >> notmuch if you use my patch [1] and run >> >> (add-hook 'message-setup-hook 'jl-encrypt-if-possible) > > i applied your patch to the 0.21 release and byte-compiled notmuch-mua.el > > the message is sent unencrypted unless i rebind C-c C-c as before. the > email is encrypted but it asks for the recipient, which i'm guessing > emacs can't figure out for itself anymore? > > also tested with `emacs -q` and loading this file, and jl-encrypt never > asks to encrypt the email when possible: > > # /tmp/emacs > > (require 'notmuch) > (add-to-list 'load-path "~/.emacs.d/lisp/") > (require 'jl-encrypt) > (add-hook 'message-setup-hook 'jl-encrypt-if-possible) > (add-hook 'message-setup-hook 'mml-secure-message-sign-pgpmime) > > by adding the C-c C-c rebind, it gets to encrypt, but asks for recipient > again. I looked into this and I think that the following workaround could work for you: (defun jl-notmuch-message-send-and-exit (&optional arg) (interactive "P") (let ((message-fcc-handler-function #'notmuch-fcc-handler)) (jl-message-send-and-exit arg))) (defun jl-notmuch-message-send (&optional arg) (interactive "P") (let ((message-fcc-handler-function #'notmuch-fcc-handler)) (jl-message-send arg))) (define-key notmuch-message-mode-map (kbd "C-c C-c") 'jl-notmuch-message-send-and-exit) (define-key notmuch-message-mode-map (kbd "C-c C-s") 'jl-notmuch-message-send) Unfortunately, I couldn't find a less intrusive solution for now, because notmuch uses the same "trick" (remapping keyboard shortcuts) as jl-encrypt to override message sending from message.el. This means that either jl-encrypt or notmuch can be bound to these keys but not both. Notmuch has to use this mechanism until the bug [1] is fixed in Emacs. Another possibility would be to introduce something like notmuch-send-hook which would allow other packages to hook into notmuch sending process, but this could be even more complex that the above workaround, so I don't think it is worth the effort. Best regards, -Michal [1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21174 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
notmuch-mua and jl-encrypt (was: file-error "not a regular file")
Michal Sojka writes: > can you share more details about how do you use jl-encrypt and which > functions do not work? Recently, I posted a few patches that fix some > problems related to the replacing message-mode with > notmuch-message-mode. Maybe, there is more what we can do to not break > user's setups. i've been using jl-encrypt unmodified with notmuch for a while now. i just require it on my .emacs since 0.21, i had to rebind notmuch-message-mode C-c C-c and C-s C-s keys: (define-key notmuch-message-mode-map (kbd "C-c C-c") 'jl-message-send-and-exit) (define-key notmuch-message-mode-map (kbd "C-c C-s") 'jl-message-send) and solved the issue of fcc by setting notmuch-fcc-dirs to nil and making my mta send me bcc of my own email. this has worked correctly for the last week. > From a brief look at jl-encrypt, it seems it is tightly bound to gnus, > because it uses gnus-message-setup-hook. Maybe it will work again with > notmuch if you use my patch [1] and run > > (add-hook 'message-setup-hook 'jl-encrypt-if-possible) i applied your patch to the 0.21 release and byte-compiled notmuch-mua.el the message is sent unencrypted unless i rebind C-c C-c as before. the email is encrypted but it asks for the recipient, which i'm guessing emacs can't figure out for itself anymore? also tested with `emacs -q` and loading this file, and jl-encrypt never asks to encrypt the email when possible: # /tmp/emacs (require 'notmuch) (add-to-list 'load-path "~/.emacs.d/lisp/") (require 'jl-encrypt) (add-hook 'message-setup-hook 'jl-encrypt-if-possible) (add-hook 'message-setup-hook 'mml-secure-message-sign-pgpmime) by adding the C-c C-c rebind, it gets to encrypt, but asks for recipient again. i hope this info is useful :) > -Michal > > [1] id:1450690875-2111-2-git-send-email-sojk...@fel.cvut.cz -- :D signature.asc Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: file-error "not a regular file"
Hi fauno, On Tue, Dec 29 2015, fauno wrote: > David Bremner writes: > >> I guess the tl;dr is that I can't duplicate this problem. Looking at the >> traceback Peter provided, it looks like he is using >> "send-message-without-bullets" to send the message. Since this isn't a >> notmuch function, it's likely bypassing the notmuch fcc setup that >> notmuch-mua-send and notmuch-mua-send-and-exit do. > > i've found the issue. i'm using jl-encrypt that expects email written > in message-mode, and since notmuch is now a minor mode some functions > that were expected to be there didn't work anymore. can you share more details about how do you use jl-encrypt and which functions do not work? Recently, I posted a few patches that fix some problems related to the replacing message-mode with notmuch-message-mode. Maybe, there is more what we can do to not break user's setups. From a brief look at jl-encrypt, it seems it is tightly bound to gnus, because it uses gnus-message-setup-hook. Maybe it will work again with notmuch if you use my patch [1] and run (add-hook 'message-setup-hook 'jl-encrypt-if-possible) -Michal [1] id:1450690875-2111-2-git-send-email-sojk...@fel.cvut.cz ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: file-error "not a regular file"
On Tue, Dec 29 2015, Peter Salazar wrote: > send-message-without-bullets simply turns off org-bullets-mode before doing > message-send, since org-bullets-mode seemed to be interfering with > org-mime-htmlize. > > (defun send-message-without-bullets () > (interactive) > (remove-hook 'org-mode-hook 'org-bullets-mode) > (message-send) This is wrong for notmuch - you need to use `notmuch-mua-send' rather than calling `message-send' directly. > (add-hook 'org-mode-hook 'org-bullets-mode)) > > I also have this: > > (setq message-send-hook (quote (org-mime-htmlize))) > > > On Tue, Dec 29, 2015 at 3:44 PM, David Bremner wrote: > >> Peter Salazar writes: >> >> >> > Yes, following your steps, emacs -q followed by "M-x load-library >> >> > notmuch", I was able to send an email without the error. It prompted me >> for >> > my smtp server, username, and password, then returned this: >> > >> >> [snip] >> > Does this give us any leads? >> >> It seems to be some interaction with your configuration. I'm not >> familiar with this "send-message-without-bullets" function. Perhaps you >> could point us to the source? >> >> d >> >> > ___ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: file-error "not a regular file"
send-message-without-bullets simply turns off org-bullets-mode before doing message-send, since org-bullets-mode seemed to be interfering with org-mime-htmlize. (defun send-message-without-bullets () (interactive) (remove-hook 'org-mode-hook 'org-bullets-mode) (message-send) (add-hook 'org-mode-hook 'org-bullets-mode)) I also have this: (setq message-send-hook (quote (org-mime-htmlize))) On Tue, Dec 29, 2015 at 3:44 PM, David Bremner wrote: > Peter Salazar writes: > > > > Yes, following your steps, emacs -q followed by "M-x load-library > > > notmuch", I was able to send an email without the error. It prompted me > for > > my smtp server, username, and password, then returned this: > > > > [snip] > > Does this give us any leads? > > It seems to be some interaction with your configuration. I'm not > familiar with this "send-message-without-bullets" function. Perhaps you > could point us to the source? > > d > > ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: file-error "not a regular file"
Peter Salazar writes: > Yes, following your steps, emacs -q followed by "M-x load-library > notmuch", I was able to send an email without the error. It prompted me for > my smtp server, username, and password, then returned this: > [snip] > Does this give us any leads? It seems to be some interaction with your configuration. I'm not familiar with this "send-message-without-bullets" function. Perhaps you could point us to the source? d ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: file-error "not a regular file"
Hi David, Thanks for looking into this. Much appreciated. Yes, following your steps, emacs -q followed by "M-x load-library notmuch", I was able to send an email without the error. It prompted me for my smtp server, username, and password, then returned this: Sending email Sending email done Invalid image size (see `max-image-size') Mark set Saving file /Users/peter/Dropbox/mail/gmail/sent/tmp/1451367804.6837_72197_1.Infinity.local... Wrote /Users/peter/Dropbox/mail/gmail/sent/tmp/1451367804.6837_72197_1.Infinity.local Sending...done To answer your other question, yes, there is an Fcc: header when I try to send email from my regular Emacs configuration. It's the same header I saw when I sent email from the minimal configuration: Fcc: /Users/peter/Dropbox/mail/gmail/sent That directory does indeed exist: drwxr-xr-x@ 9 peter staff 306 Dec 27 21:54 *sent* And it contains: .DS_Store.mbsyncstate *.nnmaildir* .uidvalidity *cur* *new* *tmp* Does this give us any leads? Thanks again. On Mon, Dec 28, 2015 at 9:46 AM, David Bremner wrote: > fauno writes: > > > Peter Salazar writes: > > > >> Hello, > >> > >> I'm using notmuch-mode from within Emacs to send email using > async/mbsync > >> through Gmail. However, every time I send email from within Emacs, I get > >> this error: > > > > i got this message too for fcc with default values, i'm on emacs 24.5 > > with notmuch 0.21 > > > > Can either of you replicate the problem with a minimal configuration, > ideally with "emacs -q", followed by "M-x load-library > notmuch"? > > If so, does the path in the Fcc header exist? If so, what is it? a file, > a directory, a symlink? > > For me, in emacs 24.5 / notmuch 0.21, with emacs -q, if that path is > missing I am prompted to create it. If I refuse, then I later get a > message about not being a maildir. > > I guess the tl;dr is that I can't duplicate this problem. Looking at the > traceback Peter provided, it looks like he is using > "send-message-without-bullets" to send the message. Since this isn't a > notmuch function, it's likely bypassing the notmuch fcc setup that > notmuch-mua-send and notmuch-mua-send-and-exit do. > > > d > > ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: file-error "not a regular file"
David Bremner writes: > I guess the tl;dr is that I can't duplicate this problem. Looking at the > traceback Peter provided, it looks like he is using > "send-message-without-bullets" to send the message. Since this isn't a > notmuch function, it's likely bypassing the notmuch fcc setup that > notmuch-mua-send and notmuch-mua-send-and-exit do. i've found the issue. i'm using jl-encrypt that expects email written in message-mode, and since notmuch is now a minor mode some functions that were expected to be there didn't work anymore. -- :O signature.asc Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: file-error "not a regular file"
fauno writes: > Peter Salazar writes: > >> Hello, >> >> I'm using notmuch-mode from within Emacs to send email using async/mbsync >> through Gmail. However, every time I send email from within Emacs, I get >> this error: > > i got this message too for fcc with default values, i'm on emacs 24.5 > with notmuch 0.21 > Can either of you replicate the problem with a minimal configuration, ideally with "emacs -q", followed by "M-x load-library notmuch"? If so, does the path in the Fcc header exist? If so, what is it? a file, a directory, a symlink? For me, in emacs 24.5 / notmuch 0.21, with emacs -q, if that path is missing I am prompted to create it. If I refuse, then I later get a message about not being a maildir. I guess the tl;dr is that I can't duplicate this problem. Looking at the traceback Peter provided, it looks like he is using "send-message-without-bullets" to send the message. Since this isn't a notmuch function, it's likely bypassing the notmuch fcc setup that notmuch-mua-send and notmuch-mua-send-and-exit do. d ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: file-error "not a regular file"
Peter Salazar writes: > Hello, > > I'm using notmuch-mode from within Emacs to send email using async/mbsync > through Gmail. However, every time I send email from within Emacs, I get > this error: i got this message too for fcc with default values, i'm on emacs 24.5 with notmuch 0.21 -- :O signature.asc Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
file-error "not a regular file"
Hello, I'm using notmuch-mode from within Emacs to send email using async/mbsync through Gmail. However, every time I send email from within Emacs, I get this error: Debugger entered--Lisp error: (file-error "not a regular file" "/Users/peter/Dropbox/mail/gmail/sent") insert-file-contents("/Users/peter/Dropbox/mail/gmail/sent" nil 0 100) mail-file-babyl-p("/Users/peter/Dropbox/mail/gmail/sent") message-output("/Users/peter/Dropbox/mail/gmail/sent") message-do-fcc() message-send() send-message-without-bullets() call-interactively(send-message-without-bullets nil nil) command-execute(send-message-without-bullets) Does anyone know how to fix this? I can share relevant details from my .mbsyncrc if that would be helpful. Thanks! ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch