emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Teika Kazura <teika@gmx.com>
To: emacs-orgmode@gnu.org
Cc: bezjak.miro@gmail.com
Subject: Re: Bug (regression) in org-replace-disputed-keys. Bisected.
Date: Wed, 01 Oct 2014 10:22:27 +0900 (JST)	[thread overview]
Message-ID: <20141001.102227.1578863029392514259.teika@gmx.com> (raw)
In-Reply-To: <20140909.204231.1213619806378148264.teika@gmx.com> <87iok7wlub.fsf@nicolasgoaziou.fr>

(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)

  reply	other threads:[~2014-10-01  1:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-09 11:42 Bug (regression) in org-replace-disputed-keys. Bisected Teika Kazura
2014-09-28 20:07 ` Nicolas Goaziou
2014-10-01  1:22   ` Teika Kazura [this message]
2014-11-03 20:54     ` Nicolas Goaziou
2014-11-12 11:49       ` [patch] " Teika Kazura
2014-11-13 22:32         ` Nicolas Goaziou
2014-11-14 22:29       ` Miro Bezjak
2014-11-18 21:32         ` Nicolas Goaziou
2014-11-19  9:50           ` Miro Bezjak
  -- strict thread matches above, loose matches on Subject: below --
2014-09-17  8:42 Teika Kazura

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=20141001.102227.1578863029392514259.teika@gmx.com \
    --to=teika@gmx.com \
    --cc=bezjak.miro@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).