[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Bug (regression) in org-replace-disputed-keys. Bisected.
From: |
Teika Kazura |
Subject: |
Re: [O] Bug (regression) in org-replace-disputed-keys. Bisected. |
Date: |
Wed, 01 Oct 2014 10:22:27 +0900 (JST) |
(The entire thread can be viewed at:
http://thread.gmane.org/gmane.emacs.orgmode/90626 . cc: Miro Bezjak.)
I propose fixes, but first I explain the whole picture.
TOC
1. Backgrounds
2. Fixes I propose
1. Backgrounds
In fact, beginning from org-8.1 `org-replace-disputed-keys' is intentionally
ignored, but ** only in ** org-read-date. To be blunt, it was wrong. At least,
such an exceptional behavior is hard to expect, or incoherence in short.
Why this change was done? One single user asked [1] how to disable
org-replace-disputed-keys in org-read-date in org-8.0 for his/her **personal
configuration**. Somehow Carsten Dominik, one of our respectable org
developers, decided it to be the hard-coded default [1][2] without stating the
reason.
[1] http://comments.gmane.org/gmane.emacs.orgmode/72180
[2]
*
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=a6986494a0c4fc5d3363c2bebe48215e7138e4f1
*
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=e8023dde58f267a525b63184ec07d371b5a4c8b5
But since (defvar org-read-date-minibuffer-local-map) was introduced in
org-8.0.3, s/he can simply customize it. It's the norm in Emacs, rather than
forcing an exception. (If it were a common request, then we could accept it,
but it's not.)
2. Fixes
Basically, I'll do what I can, sending patches for both codes and texinfo, if
you want.
Anyway
(a) the info file lacks the description on org-read-date-minibuffer-local-map.
(b) The fact that org-replace-disputed-keys is ignored in org-read-date is
written in the changelog http://orgmode.org/Changes.html for ver 8.1, under the
section "Important bugfixes", but it should have been in "Incompatible
changes". Moreover, the wording is unsearchable, by lacking the relevant
variable names. (If it gets reverted as I propose below, an annotation must
accompany, like "But this was reverted later in 8.2.x".)
Now a real fix. There're two candidates:
(i) Revert the wrong commit. Since it was in fact done in two separate
commits[2], you need another patch, not git-revert. Here it is:
------------------------------------------------------------------------
diff -u -r org-8.2.7c-orig/lisp/org.el org-8.2.7c/lisp/org.el
--- org-8.2.7c-orig/lisp/org.el 2014-09-30 18:10:54.485977061 +0900
+++ org-8.2.7c/lisp/org.el 2014-09-30 18:11:24.293602328 +0900
@@ -16220,8 +16220,7 @@
(defvar org-read-date-inactive)
(defvar org-read-date-minibuffer-local-map
- (let* ((org-replace-disputed-keys nil)
- (map (make-sparse-keymap)))
+ (let* ((map (make-sparse-keymap)))
(set-keymap-parent map minibuffer-local-map)
(org-defkey map (kbd ".")
(lambda () (interactive)
------------------------------------------------------------------------
(ii) Leave the code as-is, and be satisfied by doc fixes only. Then you have to
fix
* Texinfo, the `org-replace-disputed-keys' part, adding "Exception: it's
ignored in ...",
* `org-read-date' w/ "Exception..."
* and also the changelog in 8.2 (or later): "org-replace-disputed-keys is
ignored in org-read-date. In fact it has been so since 8.1, but has not been
described adequately."
Thanks to Nicolas Goaziou for reading, and all other org developers.
(Sorry for posting my original message twice.)
Regards,
Teika (Teika kazura)