emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Keyboard macros and export dispatcher
@ 2020-01-09 18:22 Jack Kamm
  2020-01-09 18:32 ` Kyle Meyer
  2020-01-09 18:42 ` John Hendy
  0 siblings, 2 replies; 5+ messages in thread
From: Jack Kamm @ 2020-01-09 18:22 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Keyboard macros and export dispatcher
  2020-01-09 18:22 Keyboard macros and export dispatcher Jack Kamm
@ 2020-01-09 18:32 ` Kyle Meyer
  2020-01-09 19:00   ` Jack Kamm
  2020-01-09 18:42 ` John Hendy
  1 sibling, 1 reply; 5+ messages in thread
From: Kyle Meyer @ 2020-01-09 18:32 UTC (permalink / raw)
  To: Jack Kamm, emacs-orgmode

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)?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Keyboard macros and export dispatcher
  2020-01-09 18:22 Keyboard macros and export dispatcher Jack Kamm
  2020-01-09 18:32 ` Kyle Meyer
@ 2020-01-09 18:42 ` John Hendy
  2020-01-09 19:07   ` Jack Kamm
  1 sibling, 1 reply; 5+ messages in thread
From: John Hendy @ 2020-01-09 18:42 UTC (permalink / raw)
  To: Jack Kamm; +Cc: emacs-orgmode

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
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Keyboard macros and export dispatcher
  2020-01-09 18:32 ` Kyle Meyer
@ 2020-01-09 19:00   ` Jack Kamm
  0 siblings, 0 replies; 5+ messages in thread
From: Jack Kamm @ 2020-01-09 19:00 UTC (permalink / raw)
  To: Kyle Meyer, emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Keyboard macros and export dispatcher
  2020-01-09 18:42 ` John Hendy
@ 2020-01-09 19:07   ` Jack Kamm
  0 siblings, 0 replies; 5+ messages in thread
From: Jack Kamm @ 2020-01-09 19:07 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-01-09 19:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-09 18:22 Keyboard macros and export dispatcher Jack Kamm
2020-01-09 18:32 ` Kyle Meyer
2020-01-09 19:00   ` Jack Kamm
2020-01-09 18:42 ` John Hendy
2020-01-09 19:07   ` Jack Kamm

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).