From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: speed keys for plain lists? Date: Mon, 09 May 2016 17:27:36 +0000 Message-ID: References: <87eg9bck3t.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1147c6e2856f3005326c2085 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azoyD-0000QK-71 for emacs-orgmode@gnu.org; Mon, 09 May 2016 13:27:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azoyB-0007x6-Uy for emacs-orgmode@gnu.org; Mon, 09 May 2016 13:27:49 -0400 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:37572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azoyB-0007x2-PN for emacs-orgmode@gnu.org; Mon, 09 May 2016 13:27:47 -0400 Received: by mail-wm0-x22c.google.com with SMTP id a17so199436962wme.0 for ; Mon, 09 May 2016 10:27:47 -0700 (PDT) In-Reply-To: <87eg9bck3t.fsf@mbork.pl> 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" To: Marcin Borkowski Cc: emacs-orgmode@gnu.org, Bill White --001a1147c6e2856f3005326c2085 Content-Type: text/plain; charset=UTF-8 On Mon, May 9, 2016 at 11:43 AM Marcin Borkowski wrote: > I guess that OP would like some key to do this only when in plain list. > It's slightly less easy then, and the preferred way (advice/new > function/maybe some hook) might depend on the particular choice of the > keys. > Right, the define-key solution was under the assumption that M-{ and M-} already do what the OP needs. They are bound to org-backward-element and org-forward-element by default in org-mode-map. So if M-{/M-} already does what he want, he can simply bind the same commands to keys of his liking. Actually org uses org-defkey instead of define-key for these bindings. But they are not context-aware keys; they apply to org-mode-map: http://orgmode.org/cgit.cgi/org-mode.git/tree/lisp/org.el?id=8127b3c30d8a2217468068a73f23bfa4945573dc#n19895 -- -- Kaushal Modi --001a1147c6e2856f3005326c2085 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Mon, May 9,= 2016 at 11:43 AM Marcin Borkowski <mb= ork@mbork.pl> wrote:
I guess that OP would like some key to do this only when in plain list.
It's slightly less easy then, and the preferred way (advice/new
function/maybe some hook) might depend on the particular choice of the
keys.

Right, the define-key solution wa= s under the assumption that M-{ and M-} already do what the OP needs.
=

They are bound to org-backward-element and org-forward-= element by default in org-mode-map. So if M-{/M-} already does what he want= , he can simply bind the same commands to keys of his liking.
Actually org uses org-defkey instead of define-key for these bi= ndings. But they are not context-aware keys; they apply to org-mode-map:

--

--
Kaushal Modi

--001a1147c6e2856f3005326c2085--