org-mode newbie question.

I want to invoke the org agenda command that matches a tag query. Currently it is bound to C-a a m.

I found the key sequence too long and wanted to bind it to a shorter one, e.g., H-m (I've been abusing Hyper key a lot recently). But couldn't find anyway to do that.

Firstly, I tried to find the function that does org tag match. Using C-h k to describe the key sequence doesn't work because it stops at C-a a to describe agenda command.

Then, I tried to capture it with a keyboard macro like (fset 'my-search-org-by-tags "\C-cam") Ideally it should ask me to enter the tag, but it didn't work that way. It seems to pick the first tag of current entry and shows the result. So question comes to how to make a kbd-macro sequence to be interactive.

But is that the right direction?

  • 1
    Actually I just find the function for this key binding: org-tags-view. Then I can happily rebind it to another key as I want. The useful interactive function is org-search-view which search entries by keyword.
    – user10375
    Commented Apr 15, 2018 at 14:41

1 Answer 1


As you noted, org-agenda has its own dispatch mechanism so your C-a a m is not a key binding you can resolve using describe-key directly. In cases like this you might have to turn to the source code. However it turns out that org-agenda does provide the answer for you: C-h k C-a a in your case should produce a help buffer that tells you what commands are called for various keys:

m Call ‘org-tags-view’ to display headlines with tags matching a condition (the user is prompted for the condition).

So you can bind org-tags-view directly.

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.