From mboxrd@z Thu Jan 1 00:00:00 1970 From: Teika Kazura Subject: Re: Bug (regression) in org-replace-disputed-keys. Bisected. Date: Wed, 01 Oct 2014 10:22:27 +0900 (JST) Message-ID: <20141001.102227.1578863029392514259.teika@gmx.com> References: <20140909.204231.1213619806378148264.teika@gmx.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZ8dM-000561-Gk for emacs-orgmode@gnu.org; Tue, 30 Sep 2014 21:23:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZ8dG-0006QN-SX for emacs-orgmode@gnu.org; Tue, 30 Sep 2014 21:23:12 -0400 Received: from mout.gmx.com ([74.208.4.201]:55666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZ8dG-0006PS-NJ for emacs-orgmode@gnu.org; Tue, 30 Sep 2014 21:23:06 -0400 In-Reply-To: <20140909.204231.1213619806378148264.teika@gmx.com> <87iok7wlub.fsf@nicolasgoaziou.fr> 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 Cc: bezjak.miro@gmail.com (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)