emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Local key binding gone wrong!


From: Marc Ihm
Subject: Re: [O] Local key binding gone wrong!
Date: Mon, 06 Jan 2014 21:46:07 +0100
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Hi Sharon !

Setting CapsLock to f13 is a neat trick !

Maybe this could help with the rest of your question:

(global-set-key (kbd "<f13>")
                (lambda (ARG) (interactive "c")
                  (org-todo (string-to-number (char-to-string ARG)))
                  (org-archive-subtree)))


at least it does this for me:

- Set the current node to the TODO state given through the second key after f13
- Archive the node afterwards.


regards
Marc


Am 05.01.2014 21:43, schrieb Sharon Kimble:
Sharon Kimble <address@hidden> wrote:

    Thanks Marc.
    Here it is -
    (if (eq window-system 'x)
    (shell-command "xmodmap -e 'clear Lock' -e 'keycode 66 = F13'"))
    (global-set-key [f13] 'execute-extended-command)  ;;sets caps-lock as 
meta-key

    Sharon.

    On Sun, 05 Jan 2014 20:36:20 +0100
    Marc-Oliver Ihm <address@hidden> wrote:

        Hi Sharon,

        not sure, what happened in your setup. Maybe things can get clearer,
        if you would supply the line of lisp that you employed to bind F13.
        Was it something like

        (global-set-key [(f13)] 'org-archive-subtree)

        ?

        regards
        Marc


        Am 05.01.201 4 04:35, schrieb Sharon Kimble:

            Whilst trying to set a key binding to archive 'DONE' todo items, by
            trying to bind F13 [aka CapsLock] to '2', so the finished intended
            result would have been - F13 + 2 = DONE & ARCHIVED. This is a global
            key binding, although I was trying for a local one. How do I know
            its 'global'? Because CapsLock now does not work for me to use in
            this email!

            So, how do I revert CapsLock to being its intended F13 please? And
            how do I set up a local key binding to avoid this situation in the
            future please?

            Thanks
            Sharon.






    --
    A taste of linux =http://www.sharons.org.uk
    efever =http://www.efever.blogspot.com/
    efever =http://sharon04.livejournal.com/
    my git repo =https://bitbucket.org/boudiccas/dots
    Debian
    testing, Fluxbox 1.3.5, LibreOffice4.1.4.2  <http://4.1.4.2>
    Registered Linux user 561944


Thinking about it, that is the original code in my .emacs which set it up 
correctly. The code that I typed in, in the mini-buffer was a local key-binding 
from the wikemacs site. Sorry I can't be more precise as I'm no longer at my 
computer.

Sharon.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]