From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [bug] orgstruct++-mode breaks backward-sentence Date: Sun, 24 May 2015 12:37:45 +0200 Message-ID: <87d21qp8g6.fsf@gmx.us> References: <87mw325is7.fsf@gmx.us> <87fv8u5ii2.fsf@gmx.us> <87d23yru77.fsf@nicolasgoaziou.fr> <87384uyrze.fsf@gmx.us> <878uegdmok.fsf@nicolasgoaziou.fr> <874mn4boe1.fsf@gmx.us> <87d21rf5o5.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwTI4-0004b1-BV for emacs-orgmode@gnu.org; Sun, 24 May 2015 06:38:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwTI0-0004x0-80 for emacs-orgmode@gnu.org; Sun, 24 May 2015 06:37:56 -0400 Received: from mout.gmx.net ([212.227.17.22]:56497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwTHz-0004ws-VJ for emacs-orgmode@gnu.org; Sun, 24 May 2015 06:37:52 -0400 Received: from W530 ([88.21.140.142]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0LnPnu-1ZdnNo1hKY-00hh1C for ; Sun, 24 May 2015 12:37:50 +0200 In-Reply-To: <87d21rf5o5.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sat, 23 May 2015 21:35:38 +0200") 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: emacs-orgmode@gnu.org Nicolas Goaziou writes: > I think the best we can do is to hijack M-a/M-e when `orgstruct-mode' is > used. `orgtbl-mode' already does it actually. I tried to do this, but somehow I cannot get the magic that builds orgstruct-mode-map to recognize org-{forward,backward}-sentence. I think it has to do with the Meta. Other Meta bindings use ?\e and the numeric value that is picked up for \M-a is pretty large... Sometimes I managed to get org-backward-sentence in the orgstruct-mode-map, but it just wans't picked up. Any hints would be appreciated. Rasmus My test: (progn (add-to-list 'load-path "~/src/code/org-mode/lisp") (require 'org) (require 'cl) (mapcar (lambda (mode) (with-temp-buffer (insert "* test - aaa baa zaa") (text-mode) (funcall mode) (call-interactively (or (local-key-binding "\M-a") (global-key-binding "\M-a"))) (cons (point) (or (local-key-binding "\M-a") (global-key-binding "\M-a"))))) '(text-mode turn-on-orgstruct++ org-mode))) -- Bang bang