Hello, I have an org-mode file, and am exporting one of its subtrees to a beamer presentation. I would like to use a keyboard macro for this, because re-exporting the presentation requires a lot of keypresses: - Jump to the appropriate heading - Start the dispatcher - Toggle subtree export (C-s) - Finally, export So, I defined a keyboard macro to do all this, but when I try to run it, Emacs simply hangs, and I need to quit with C-g. I think this might be the fault of the export dispatcher, but am not sure. Anyone have ideas on what's going wrong here, or on alternative approaches to achieve what I want? Thanks, Jack
Jack Kamm <jackkamm@gmail.com> writes:
> I would like to use a keyboard macro for this, because re-exporting the
> presentation requires a lot of keypresses:
> - Jump to the appropriate heading
> - Start the dispatcher
> - Toggle subtree export (C-s)
> - Finally, export
>
> So, I defined a keyboard macro to do all this, but when I try to run it,
> Emacs simply hangs, and I need to quit with C-g. I think this might be
> the fault of the export dispatcher, but am not sure.
>
> Anyone have ideas on what's going wrong here, or on alternative
> approaches to achieve what I want?
As an alternative, can't you type `C-u C-c C-e` (i.e. call
org-export-dispatch with a prefix argument)?
On Thu, Jan 9, 2020 at 12:24 PM Jack Kamm <jackkamm@gmail.com> wrote: > > Hello, > > I have an org-mode file, and am exporting one of its subtrees to a > beamer presentation. > > I would like to use a keyboard macro for this, because re-exporting the > presentation requires a lot of keypresses: > - Jump to the appropriate heading > - Start the dispatcher > - Toggle subtree export (C-s) > - Finally, export > > So, I defined a keyboard macro to do all this, but when I try to run it, > Emacs simply hangs, and I need to quit with C-g. I think this might be > the fault of the export dispatcher, but am not sure. Funny timing. I have used Org for maybe 10 years and just found about about macros yesterday! I have a spreadsheet with reference information per work group, coded up some R code to spit out a tree-per-group, and then wanted to export these 51 documents to their own PDFs. I've done this before, but got sick of `C-e C-s l p` for every one so I looked into it. I had no problem doing the following: - C-x ( - C-e C-s l p C-n - C-x ) - go to first of my results headlines - C-u 51 C-x e It sounds like you already tried this... are you using `C-x (` or are you defining the macros via elisp? If the latter, can we see the code? Anything in the Messages buffer? I had an error yesterday and realized that some of the group names were "Foo/Bar" and since my code titles the tree's :export_file_name property according to the group name, emacs was interpreting the `/` in the filename as a directory that didn't exist. My suggestion: - give us a stripped down, beamer file so we can reproduce (maybe with one non-exporting headline and an analog of your target subtree to export) - tell us what you run manually to accomplish your goal - give us the exact details of your macro setup John > > Anyone have ideas on what's going wrong here, or on alternative > approaches to achieve what I want? > > Thanks, > Jack >
Hello,
Kyle Meyer <kyle@kyleam.com> writes:
> As an alternative, can't you type `C-u C-c C-e` (i.e. call
> org-export-dispatch with a prefix argument)?
Thank you for the suggestion -- this accomplishes exactly what I want!
Next time, I'll remember to RTFM before asking for help :P
Cheers,
Jack
Hello,
John Hendy <jw.hendy@gmail.com> writes:
> I had no problem doing the following:
>
> - C-x (
> - C-e C-s l p C-n
> - C-x )
> - go to first of my results headlines
> - C-u 51 C-x e
>
> It sounds like you already tried this... are you using `C-x (` or are
> you defining the macros via elisp?
I'm doing the following to create the macro:
- C-x (
- C-c C-e C-s l P
- C-x )
Then executing it with `C-x e`.
Since it works for you, it seems like there must be some problem with my
configuration.
When I have a moment, I'll try to create a minimal reproducible example
as you suggest. For now, Kyle's suggestion to use a prefix argument
`C-u` solves my immediate needs.
Cheers,
Jack