0

So this is a bit specialised. I've used org-mode for a while now but never before the agenda command to list a "stuck project". The sequence built in to do this with org-agenda is C-c a #. This doesn't work out of the box for anyone with a UK keyboard because the # key is on Alt-3 and Alt is bound to Meta (I can't realistically change this) in Emacs. Actually I use Aquamacs but I don't think this is relevant.

I tried the method suggested in https://stackoverflow.com/a/4786456/1972730 namely

;; Allow hash to be entered   
(global-set-key (kbd "M-3") '(lambda () (interactive) (insert "#")))

and that does indeed allow me to enter # symbols in many contexts but when I enter the # symbol in the org-agenda context I get the error:

org-agenda-get-restriction-and-command: Wrong type argument: characterp, 134217779

So I could always type

M-x org-agenda-list-stuck-projects

but that's way too cumbersome. I suppose I could just find another key combination, but I want it to start with C-c aand I'm not so sure how to proceed with this. Suggestions?

2 Answers 2

1

You can use M-3 instead of # as part of a key definition. Use something like this in your .emacs:

;; fix agenda command with # for UK keyboard
(define-key org-mode-map (kbd "C-c a M-3") 'org-agenda-list-stuck-projects)
0

The solution I found was to change my input keyboard source to Australian as suggested by another SX user (sorry, I lost the reference). That also helps in other ways as my keyboards at work are laid out in the same way now.

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.