emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: [bug] orgstruct++-mode breaks backward-sentence
Date: Sun, 24 May 2015 12:37:45 +0200	[thread overview]
Message-ID: <87d21qp8g6.fsf@gmx.us> (raw)
In-Reply-To: <87d21rf5o5.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sat, 23 May 2015 21:35:38 +0200")

Nicolas Goaziou <mail@nicolasgoaziou.fr> 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

      parent reply	other threads:[~2015-05-24 10:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24 18:53 Rasmus
2015-03-24 18:59 ` Rasmus
2015-03-24 20:55   ` Nicolas Goaziou
2015-03-24 22:01     ` Rasmus
2015-03-29 12:15       ` Nicolas Goaziou
2015-05-22 15:52         ` Rasmus
2015-05-23 19:35           ` Nicolas Goaziou
2015-05-23 19:53             ` Rasmus
2015-05-23 20:03               ` Nicolas Goaziou
2015-05-23 20:05                 ` Rasmus
2015-05-24 10:37             ` Rasmus [this message]

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=87d21qp8g6.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --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).