The PDF is attached like so:

***** Model                                                          :ATTACH:
:ID:       f1e5fc57-b85d-4a2c-b064-32523dd11901
:ORG_ATTACH_FILES: patience.RWaR.2023-12-17.p1.r1-1.pdf

As, suggested by NickD (thanks), I can eval:

(org-attach-expand "patience.RWaR.2023-12-17.p1.r1-1.pdf")

..and get this:


This is something I can use in gnus if I use a template

<#part type="application/octet-stream" filename="patience.RWaR.2023-12-17.p1.r1-1.pdf" disposition=attachment description=Foo>

, but that's quite a tedious process;) Any pointers as to how I can bind this to a key?;)

The best solution would be something like org-attach-dired-to-subtree. For org-mode, I open a Dired buffer next to my org-mode file, then I run that command and the file is attached to the org-mode heading.

Something like that for gnus;)

That would work like so:

  1. Open the buffer containing the org-attach file and another buffer with gnus
  2. Put point on :ORG_ATTACH_FILES: and issue the command org-attach-to-gnus

The org-attach file would then become an attachment to the gnus mail.

I find it hard to believe there is no simple way to do this. Let alone a simple method, to be able to do this, there are like 25 steps, currently.

  • The question is a bit broad. Can you be more specific about what you want?
    – Drew
    Commented Jan 29 at 23:42
  • Bind what to a key?
    – NickD
    Commented Jan 31 at 22:25
  • Can you explain what you mean by "This is something I can use in gnus if I use a template, but that's quite a tedious process;) Any pointers as to how I can bind this to a key?"? You seem to think that we know what you are thinking, but we don't so we are trying to puzzle out what you want. I gave it one attempt which apparently did not satisfy you. Before I can try another, I need to know what you want to accomplish: exactly and in detail.
    – NickD
    Commented Feb 1 at 19:42
  • Right now my whole Xorg crashed, so I need a few days here;). Thanks. Commented Feb 2 at 8:37

1 Answer 1


I presume you have an attachment: link in your Org mode file, like this:


You can run (org-attach-expand "foo.pdf") in the Org mode buffer to get the complete path name. That's all you need to create a MIME attachment in GNUS.

Adding a src block to your Org mode file like this:

#+begin_src elisp :results drawer
(org-attach-expand "foo.pdf")

will allow you to run the src block to produce the file path which you can then cut-and-paste into GNUS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.