From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Ihm Subject: Re: Local key binding gone wrong! Date: Mon, 06 Jan 2014 21:46:07 +0100 Message-ID: <52CB160F.9090701@ihm.name> References: <20140105033510.7e86f5e9@london> <52C9B434.7040704@ihm.name> <20140105195951.5bad7c76@london> <0f5a4ca6-a760-4074-aabd-75da49a4769c@email.android.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0H4N-00036z-Eo for emacs-orgmode@gnu.org; Mon, 06 Jan 2014 15:46:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0H4I-0003hv-VS for emacs-orgmode@gnu.org; Mon, 06 Jan 2014 15:46:43 -0500 Received: from smtp04.udag.de ([62.146.106.30]:58383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0H4I-0003bz-OF for emacs-orgmode@gnu.org; Mon, 06 Jan 2014 15:46:38 -0500 In-Reply-To: <0f5a4ca6-a760-4074-aabd-75da49a4769c@email.android.com> 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: Sharon Kimble Cc: emacs-orgmode Mailinglist 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 aft= er 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 =3D 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 cle= arer, > 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 i= tems, by > trying to bind F13 [aka CapsLock] to '2', so the finished i= ntended > result would have been - F13 + 2 =3D 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 plea= se? And > how do I set up a local key binding to avoid this situation= in the > future please? > > Thanks > Sharon. > > > > > > > -- > =EF=BB=BFA taste of linux =3Dhttp://www.sharons.org.uk > efever =3Dhttp://www.efever.blogspot.com/ > efever =3Dhttp://sharon04.livejournal.com/ > my git repo =3Dhttps://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 ke= y-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.