From: "Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: [ANN] Edit emails in Org-mode
Date: Fri, 21 Jun 2013 09:24:09 +0200 [thread overview]
Message-ID: <861u7w6i5i.fsf@somewhere.org> (raw)
In-Reply-To: 8761x90z4o.fsf@gmail.com
HI Thorsten,
Thorsten Jolitz wrote:
> "Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org> writes:
>> Thorsten Jolitz wrote:
>>> 2.3 Usage
>>> ~~~~~~~~~
>>>
>>> There are only two commands involved:
>>>
>>> Command Keybinding Comment
>>> -----------------------------------------------------------------------
>>> M-x outorg-edit-as-org M-# M-# or M-# # outline-prefix M-#
>>> C-c ' outline-prefix C-c
>>> M-x outorg-copy-edits-and-exit M-# ---
>>
>> When I have "message" code blocks, and when I edit them in an indirect buffer
>> (for refilling them, for example), then I have a draft message that stays in
>> my Gnus/Message emails.
>>
>> Any idea how to get rid of that?
>
> its a nice idea to be able to replace the source-blocks by their results
> when composing messages (if I understood your feature request right).
No, this may be a good idea, but not what I was talking about.
I now have the following capture command:
#+begin_src emacs-lisp
(add-to-list 'org-capture-templates
`("m" "Mail to task" entry
(file+headline ,org-default-notes-file "Tasks")
"* TODO %:subject%? (from %:fromname) :mail:
%:date-timestamp-inactive
#+begin_src message
%i
#+end_src
From %a"
:immediate-finish t) t)
#+end_src
But, sometimes, I want to refill the contents of the captured email.
To do so, I go onto the email message code block, edit it in an indirect
buffer (through C-c '), refill, and quit the indirect buffer (another C-c ').
Though, after having done that, I now have the above email saved as a draft in
Gnus. Not what I was expecting.
So, my question was: how to avoid the email to be saved as a draft?
> Opens a lot of possiblilities for (semi-)automatic email creation.
>
> Here is the doc-string:
>
> #+begin_src emacs-lisp
> (defun outorg-replace-source-blocks-with-results
> (&optional arg &rest languages)
> "Replace source-blocks with their results.
>
> Only source-blocks with ':export results' in their header
> arguments will be mapped.
>
> If LANGUAGES is non-nil, only those source-blocks with a
> language found in the list are mapped.
>
> If LANGUAGES is nil but a prefix-argument ARG is given, only the
> languages read from the mini-buffer (separated by blanks) are mapped.
>
> Otherwise, all languages found in `org-babel-load-languages' are mapped." ...)
> #+end_src
>
> it basically says:
>
> - only blocks with ':export results' will be mapped
>
> - blocks for all languages found in `org-babel-load-languages' will be mapped,
> except the function ist called (from a program) with a list of language
> names (as strings) or the user calls the command with prefix arg (e.g. C-u)
> and enters language names (like this: R emacs-lisp sh org).
>
> let me know if the function does what you wanted.
>
> Do we need a keybinding for that, or should it rather be a bit oscure (only
> accessible by M-x) to avoid confusing accidents?
Best regards,
Seb
--
Sebastien Vauban
next prev parent reply other threads:[~2013-06-21 7:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-19 18:25 [ANN] Edit emails in Org-mode Thorsten Jolitz
2013-06-20 7:06 ` Sebastien Vauban
2013-06-20 12:01 ` Thorsten Jolitz
2013-06-21 7:24 ` Sebastien Vauban [this message]
2013-06-21 11:44 ` Thorsten Jolitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=861u7w6i5i.fsf@somewhere.org \
--to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.