* Notmuch Emacs reply format=JSON
@ 2017-03-10 10:27 bserrao
2017-03-11 17:17 ` David Bremner
0 siblings, 1 reply; 6+ messages in thread
From: bserrao @ 2017-03-10 10:27 UTC (permalink / raw)
To: notmuch
Hello,
I need some help in changing the default reply format to JSON in
notmuch-emacs.
I've looked in the docs and there's this option:
"Supported options for reply include
--format=(default|json|sexp|headers-only)"
But i can't figure out how to setup emacs to use this option. (Sorry, i
guess it's an easy one, but i'm new to the emacs world)
Also i've searched the forum and the web, and the only thing i've found was
some old posts with patches to notmuch itself. I guess it was meant to be
used before this option has been included.
Thanks,
Cheers
--
View this message in context: http://notmuch.198994.n3.nabble.com/Notmuch-Emacs-reply-format-JSON-tp4037188.html
Sent from the notmuch mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Notmuch Emacs reply format=JSON
2017-03-10 10:27 Notmuch Emacs reply format=JSON bserrao
@ 2017-03-11 17:17 ` David Bremner
2017-03-13 10:32 ` bserrao
0 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2017-03-11 17:17 UTC (permalink / raw)
To: bserrao, notmuch
bserrao <bgserrao@gmail.com> writes:
> Hello,
>
> I need some help in changing the default reply format to JSON in
> notmuch-emacs.
> I've looked in the docs and there's this option:
>
I'm afraid I don't understand what behaviour you want. Internally
notmuch-emacs uses --format=sexp to communicate with the CLI, but this
output contains the same information --format=json.
d
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Notmuch Emacs reply format=JSON
2017-03-11 17:17 ` David Bremner
@ 2017-03-13 10:32 ` bserrao
2017-03-13 11:28 ` David Bremner
2017-03-13 17:00 ` Brian Sniffen
0 siblings, 2 replies; 6+ messages in thread
From: bserrao @ 2017-03-13 10:32 UTC (permalink / raw)
To: notmuch
Well, at work almost everyone uses Outlook (Exchange Server) and send HTML
mails. I've made a script to convert mail to html before sending, but when
replying emacs uses de '>' character has quotation and because of it the
mail gets messed up when i do the conversion.
From what i've read i've concluded that if using the format=json those HTML
pieces were handled differently...maybe i'm wrong. I was just trying to
find a solution/workaround to deal with this.
Thanks, and sorry for my bad english.
Bruno
On Sat, Mar 11, 2017 at 5:17 PM David Bremner-2 [via notmuch] <
ml-node+s198994n4037213h55@n3.nabble.com> wrote:
> bserrao <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=4037213&i=0>> writes:
>
> > Hello,
> >
> > I need some help in changing the default reply format to JSON in
> > notmuch-emacs.
> > I've looked in the docs and there's this option:
> >
>
> I'm afraid I don't understand what behaviour you want. Internally
> notmuch-emacs uses --format=sexp to communicate with the CLI, but this
> output contains the same information --format=json.
>
> d
> _______________________________________________
> notmuch mailing list
> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4037213&i=1>
> https://notmuchmail.org/mailman/listinfo/notmuch
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://notmuch.198994.n3.nabble.com/Notmuch-Emacs-reply-format-JSON-tp4037188p4037213.html
> To unsubscribe from Notmuch Emacs reply format=JSON, click here
> <http://notmuch.198994.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4037188&code=YmdzZXJyYW9AZ21haWwuY29tfDQwMzcxODh8LTIxMzM3MDk4MTg=>
> .
> NAML
> <http://notmuch.198994.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://notmuch.198994.n3.nabble.com/Notmuch-Emacs-reply-format-JSON-tp4037188p4037238.html
Sent from the notmuch mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Notmuch Emacs reply format=JSON
2017-03-13 10:32 ` bserrao
@ 2017-03-13 11:28 ` David Bremner
2017-03-13 17:00 ` Brian Sniffen
1 sibling, 0 replies; 6+ messages in thread
From: David Bremner @ 2017-03-13 11:28 UTC (permalink / raw)
To: bserrao, notmuch
bserrao <bgserrao@gmail.com> writes:
> Well, at work almost everyone uses Outlook (Exchange Server) and send HTML
> mails. I've made a script to convert mail to html before sending, but when
> replying emacs uses de '>' character has quotation and because of it the
> mail gets messed up when i do the conversion.
> From what i've read i've concluded that if using the format=json those HTML
> pieces were handled differently...maybe i'm wrong. I was just trying to
> find a solution/workaround to deal with this.
I guess the first step is to test on the command line with
% notmuch reply --format=json id:foo
and
% notmuch reply --format=sexp id:foo
where id:foo is some message-id in your notmuch database.
In both cases you'll get a kind of data structure that you can process
how you like, but I think the strings inside are pretty much the same.
If you're trying to modify elisp, the actual function is
notmuch-mua-reply
I'm afraid I don't have any specific advice about sending HTML.
d
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Notmuch Emacs reply format=JSON
2017-03-13 10:32 ` bserrao
2017-03-13 11:28 ` David Bremner
@ 2017-03-13 17:00 ` Brian Sniffen
2017-03-21 16:43 ` bserrao
1 sibling, 1 reply; 6+ messages in thread
From: Brian Sniffen @ 2017-03-13 17:00 UTC (permalink / raw)
To: bserrao, notmuch
[-- Attachment #1: Type: text/plain, Size: 570 bytes --]
You might like
[org-mime](http://orgmode.org/worg/org-contrib/org-mime.html) or
`mimedown`:
; For writing pretty mail
(defun mimedown ()
(interactive)
(save-excursion
(message-goto-body)
(mml-unsecure-message)
(let* ((sig-point (save-excursion (message-goto-signature) (forward-line -1) (point)))
(orig-txt (buffer-substring-no-properties (point) sig-point)))
(shell-command-on-region (point) sig-point "/usr/local/bin/pandoc --from markdown --to html --smart --standalone" nil t)
(insert "
[-- Attachment #2.1: Type: text/plain, Size: 52 bytes --]
\n")
(insert orig-txt)
(insert "
[-- Attachment #2.2: Type: text/html, Size: 62 bytes --]
[-- Attachment #3: Type: text/plain, Size: 2795 bytes --]
At least as seeds for your own work. Mimedown copes smoothly with `>`
for replies, and was used for this message. org-mime not so much---it
preserves line breaks, but leaves them as `>` prefixes, rather than
using a blockquote.
-Brian
bserrao <bgserrao@gmail.com> writes:
> Well, at work almost everyone uses Outlook (Exchange Server) and send HTML
> mails. I've made a script to convert mail to html before sending, but when
> replying emacs uses de '>' character has quotation and because of it the
> mail gets messed up when i do the conversion.
> From what i've read i've concluded that if using the format=json those HTML
> pieces were handled differently...maybe i'm wrong. I was just trying to
> find a solution/workaround to deal with this.
>
> Thanks, and sorry for my bad english.
>
> Bruno
>
> On Sat, Mar 11, 2017 at 5:17 PM David Bremner-2 [via notmuch] <
> ml-node+s198994n4037213h55@n3.nabble.com> wrote:
>
>> bserrao <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=4037213&i=0>> writes:
>>
>> > Hello,
>> >
>> > I need some help in changing the default reply format to JSON in
>> > notmuch-emacs.
>> > I've looked in the docs and there's this option:
>> >
>>
>> I'm afraid I don't understand what behaviour you want. Internally
>> notmuch-emacs uses --format=sexp to communicate with the CLI, but this
>> output contains the same information --format=json.
>>
>> d
>> _______________________________________________
>> notmuch mailing list
>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4037213&i=1>
>> https://notmuchmail.org/mailman/listinfo/notmuch
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://notmuch.198994.n3.nabble.com/Notmuch-Emacs-reply-format-JSON-tp4037188p4037213.html
>> To unsubscribe from Notmuch Emacs reply format=JSON, click here
>> <http://notmuch.198994.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4037188&code=YmdzZXJyYW9AZ21haWwuY29tfDQwMzcxODh8LTIxMzM3MDk4MTg=>
>> .
>> NAML
>> <http://notmuch.198994.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
>
> --
> View this message in context: http://notmuch.198994.n3.nabble.com/Notmuch-Emacs-reply-format-JSON-tp4037188p4037238.html
> Sent from the notmuch mailing list archive at Nabble.com.
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-03-21 16:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-10 10:27 Notmuch Emacs reply format=JSON bserrao
2017-03-11 17:17 ` David Bremner
2017-03-13 10:32 ` bserrao
2017-03-13 11:28 ` David Bremner
2017-03-13 17:00 ` Brian Sniffen
2017-03-21 16:43 ` bserrao
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).