From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sharon Kimble Subject: Re: Local key binding gone wrong! Date: Mon, 06 Jan 2014 21:29:12 +0000 Message-ID: References: <20140105033510.7e86f5e9@london> <52C9B434.7040704@ihm.name> <20140105195951.5bad7c76@london> <0f5a4ca6-a760-4074-aabd-75da49a4769c@email.android.com> <52CB160F.9090701@ihm.name> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----TVEYJEY6WC43M4IQ1QPROF5C2OLHJT" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0Hjk-00005D-GT for emacs-orgmode@gnu.org; Mon, 06 Jan 2014 16:29:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0Hjd-0007og-Ki for emacs-orgmode@gnu.org; Mon, 06 Jan 2014 16:29:28 -0500 Received: from out1.ip08ir2.opaltelecom.net ([62.24.128.244]:6563 helo=smtp.talktalk.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0Hjd-0007oQ-5q for emacs-orgmode@gnu.org; Mon, 06 Jan 2014 16:29:21 -0500 In-Reply-To: <52CB160F.9090701@ihm.name> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Marc Ihm , emacs-orgmode@gnu.org ------TVEYJEY6WC43M4IQ1QPROF5C2OLHJT Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Marc Ihm wrote: >Hi Sharon ! > >Setting CapsLock to f13 is a neat trick ! > >Maybe this could help with the rest of your question: > >(global-set-key (kbd "") > (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 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 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 >> 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. Sounds interesting, I'll have a play with it tomorrow when I'm back on the computer. And today when I went on it, caps lock had reset itself back to 'M-x' I'm glad to say. :-) Thanks Sharon. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ------TVEYJEY6WC43M4IQ1QPROF5C2OLHJT Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
Marc Ihm <marc@ihm.name> wrote:
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 <boudiccas@talktalk.net> 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 <marc@ihm.name> 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'? Becaus e 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 t he 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.




Sounds interesting, I'll have a play with it tomorrow when I'm back on the computer. And today when I went on it, caps lock had reset itself back to 'M-x' I'm glad to say. :-)

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