emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Samuel Wales" <samologist@gmail.com>
To: emacs-orgmode@gnu.org
Subject: patch to fix strange key binding bug and to notate compiler warnings
Date: Sat, 6 Sep 2008 11:42:33 -0700	[thread overview]
Message-ID: <20524da70809061142s4f0a1003s2611a79431d162f1@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 140 bytes --]

The attached patch adds a variable to let you fix key bindings.  It
also provides comments for 2 places where there were compiler
warnings.

[-- Attachment #2: mydiffu --]
[-- Type: application/octet-stream, Size: 2109 bytes --]

--- org-orig.el	2008-09-06 10:37:32.000000000 -0700
+++ org-mypatch.el	2008-09-06 11:36:54.000000000 -0700
@@ -255,6 +255,19 @@
   :group 'org-startup
   :type 'boolean)
 
+(defcustom org-use-extra-keys nil
+  "Non-nil means use extra key sequence definitions for certain
+commands.  This happens automatically if you run XEmacs or if
+window-system is nil.  This variable lets you do the same
+manually.  You must set it before loading org.
+
+Example: on Carbon Emacs 22 running graphically, with an external
+keyboard on a Powerbook, the default way of setting M-left might
+not work for either Alt or ESC.  Setting this variable will make
+it work for ESC."
+  :group 'org-startup
+  :type 'boolean)
+
 (defcustom org-replace-disputed-keys nil
   "Non-nil means use alternative key bindings for some keys.
 Org-mode uses S-<cursor> keys for changing timestamps and priorities.
@@ -7036,6 +7049,7 @@
       (when (string-match "{{\\([^}]+\\)}}$" s)
 	(setq a (match-string 1 s) s (substring s 0 (match-beginning 0)))
 	(while (string-match "\\([a-zA-Z]+\\)=\"\\([^\"]*\\)\"" a start)
+          ;;are key and value dynamic variables here?
 	  (setq key (match-string 1 a) value (match-string 2 a)
 		start (match-end 0)
 		attr (plist-put attr (intern key) value))))
@@ -9470,6 +9484,7 @@
 		     `(,level-op level ,(string-to-number
 					 (match-string 4 term))))
 		    (prop-p
+                     ;;should time-p be let-bound here?
 		     (setq pn (match-string 5 term)
 			   po (match-string 6 term)
 			   pv (match-string 7 term)
@@ -12491,8 +12506,9 @@
 ;;  We only set them when really needed because otherwise the
 ;;  menus don't show the simple keys
 
-(when (or (featurep 'xemacs)   ;; because XEmacs supports multi-device stuff
-	  (not window-system))
+(when (or org-use-extra-keys
+          (featurep 'xemacs)    ; because XEmacs supports multi-device stuff
+          (not window-system))
   (org-defkey org-mode-map "\C-c\C-xc"    'org-table-copy-down)
   (org-defkey org-mode-map "\C-c\C-xM"    'org-insert-todo-heading)
   (org-defkey org-mode-map "\C-c\C-xm"    'org-meta-return)

[-- Attachment #3: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

             reply	other threads:[~2008-09-06 18:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-06 18:42 Samuel Wales [this message]
2008-09-06 19:01 ` patch to fix strange key binding bug and to notate compiler warnings Samuel Wales
2008-09-07  6:30 ` Carsten Dominik

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=20524da70809061142s4f0a1003s2611a79431d162f1@mail.gmail.com \
    --to=samologist@gmail.com \
    --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).