emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marc Ihm <marc@ihm.name>
To: Sharon Kimble <boudiccas@talktalk.net>
Cc: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: Re: Local key binding gone wrong!
Date: Mon, 06 Jan 2014 21:46:07 +0100	[thread overview]
Message-ID: <52CB160F.9090701@ihm.name> (raw)
In-Reply-To: <0f5a4ca6-a760-4074-aabd-75da49a4769c@email.android.com>

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'? 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	other threads:[~2014-01-06 20:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-05  3:35 Local key binding gone wrong! Sharon Kimble
2014-01-05 19:36 ` Marc-Oliver Ihm
2014-01-05 19:59   ` Sharon Kimble
2014-01-05 20:43     ` Sharon Kimble
2014-01-06 20:46       ` Marc Ihm [this message]
2014-01-06 21:29         ` Sharon Kimble
2014-01-05 19:41 ` Nick Dokos
2014-01-05 20:59   ` Sharon Kimble
2014-01-06 15:38     ` Nick Dokos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52CB160F.9090701@ihm.name \
    --to=marc@ihm.name \
    --cc=boudiccas@talktalk.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).