Re: [O] [patch] Bug (regression) in org-replace-disputed-keys. Bisected.

2014-11-13 Thread Nicolas Goaziou
Hello,

Teika Kazura te...@gmx.com writes:

 Glad to contribute. I attached two patches, the first for the lisp
 fix,

Thank you. I applied it, with corrections to the commit message. In
particular, you need to add TINYCHANGE at its end, unless you sign FSF
papers.

 and the second for org.texi.

Thanks. Some comments follow.

 Now, release notes (http://orgmode.org/Changes.html) fix proposal. I here 
 write the full version. (Sorry. I know concise is better.)

 1. Version 8.1, Important bugfixes section

 The following sentence should be moved to Incompatible changes section:
 The replacement of disputed keys is now turned of when reading a date

 Furthermore, the following should be added: N.B. This is reverted in Version 
 8.3.

 2. Please add this to the next version Incompatible changes section:
 `org-replace-disputed-keys' has been ignored when reading date since version 
 8.1, but the former behavior is restored again.

 Perhaps to New features can be added: Keybinding for reading date
 can be customized with a new variable
 `org-read-date-minibuffer-local-map'. (In fact, it was introduced in
 version 8.0, but it was not announced.)

Done, with some tiny change.

 Some comments on my org.texi patch. I renamed the section Creating
 timestamps to Timestamp commands, since not all commands don't
 create. (Links are updated.) I rewrote some explanations. I think it's
 better, but I'm not sure if my tone of voice (e.g. Date/time prompt
 is ``smart enough'') is acceptable. Some whitespace cleanup
 accompanies, so you may want to use git show -b.

 I added the description of key ! in timestamp creation. But I don't
 know what diary in Emacs is, so you may want to improve it.

 Subject: [PATCH 2/2] org.texi: Timestamp sections.

 Section Creating timestamp is renamed to Timestamp commands. 
 `org-read-date-minibuffer-local-map' is described. Other contents improvement 
 in that section.

Please fill your paragraphs.

You need to document what parts are changed.

Also, commit messages, as Texinfo, require sentences to be separated
with two spaces.

  For Org mode to recognize timestamps, they need to be in the specific
 -format.  All commands listed below produce timestamps in the correct
 -format.
 +format. All commands listed below automatically fix incomplete
 existing timestamps.

Two spaces.

Also, I don't get the fix incomplete existing timestamps part.

 +Many commands prompt for a date. Details for timestamp prompt will be
 explained in a later subsection. (@pxref{The date/time prompt})

Two spaces.

 -Change date at cursor by one day.  These key bindings conflict with
 +Change date at cursor by one day. These key bindings conflict with

This change is incorrect.

  @vindex org-read-date-prefer-future
 -When Org mode prompts for a date/time, the default is shown in default
 -date/time format, and the prompt therefore seems to ask for a specific
 -format.  But it will in fact accept date/time information in a variety of
 -formats.  Generally, the information should start at the beginning of the
 -string.  Org mode will find whatever information is in
 -there and derive anything you have not specified from the @emph{default date
 -and time}.  The default is usually the current date and time, but when
 +Date/time prompt is ``smart enough'', accepting shorthand notations,
 visual input while viewing the calendar, etc.

I don't think this is better: smart enough doesn't explain much.

However, splitting the paragraph in three parts and reordering them
a bit is a good idea.

  @cindex calendar, for selecting date
  @vindex org-popup-calendar-for-date-prompt
 -Parallel to the minibuffer prompt, a calendar is popped up@footnote{If
 -you don't need/want the calendar, configure the variable
 -@code{org-popup-calendar-for-date-prompt}.}.  When you exit the date
 -prompt, either by clicking on a date in the calendar, or by pressing
 -@key{RET}, the date selected in the calendar will be combined with the
 -information entered at the prompt.  You can control the calendar fully
 -from the minibuffer:
 +Parallel to the minibuffer prompt, a calendar is popped up@footnote{If you
 +don't need/want the calendar, configure the variable
 +@code{org-popup-calendar-for-date-prompt}.}. Calendar-based visual input is
 +possible, too, and it will be combined with the information entered at the
 +prompt. You can control the calendar fully from the minibuffer:

Two spaces (twice).

 +C-.@r{Go to today.}
 +!  @r{Show diary entries. @ref{Displaying the Diary, ,
 Displaying the Diary, emacs, The Emacs Editor}}

Two spaces.

 +@vindex org-read-date-minibuffer-local-map
 +S-cursor keys conflict with other modes. For the details see
 @xref{Conflicts}. You can fully customize the key binding with the
 variable @code{org-read-date-minibuffer-local-map}.

I don't think it deserves to appear in the manual. Moreover, this has
nothing to do with the calendar. Eventually,
`org-read-date-minibuffer-local-map' is not 

Re: [O] [patch] Bug (regression) in org-replace-disputed-keys. Bisected.

2014-11-12 Thread Teika Kazura
From: Nicolas Goaziou m...@nicolasgoaziou.fr
 Could you provide a patch with git format-patch?

Glad to contribute. I attached two patches, the first for the lisp fix, and the 
second for org.texi. The code is confirmed to work, and the info correctly 
compiles. More is described later.

Now, release notes (http://orgmode.org/Changes.html) fix proposal. I here write 
the full version. (Sorry. I know concise is better.)

1. Version 8.1, Important bugfixes section

The following sentence should be moved to Incompatible changes section:
The replacement of disputed keys is now turned of when reading a date

Furthermore, the following should be added: N.B. This is reverted in Version 
8.3.

2. Please add this to the next version Incompatible changes section:
`org-replace-disputed-keys' has been ignored when reading date since version 
8.1, but the former behavior is restored again.

Perhaps to New features can be added: Keybinding for reading date can be 
customized with a new variable `org-read-date-minibuffer-local-map'. (In fact, 
it was introduced in version 8.0, but it was not announced.)


Some comments on my org.texi patch. I renamed the section Creating timestamps 
to Timestamp commands, since not all commands don't create. (Links are 
updated.) I rewrote some explanations. I think it's better, but I'm not sure if 
my tone of voice (e.g. Date/time prompt is ``smart enough'') is acceptable. 
Some whitespace cleanup accompanies, so you may want to use git show -b.

I added the description of key ! in timestamp creation. But I don't know what 
diary in Emacs is, so you may want to improve it.

Regards,
Teika (Teika kazura)

PS I may send a patch to fix hardcoded C-x (following C-c), by introducing 
org-mode-ctrl-x-map and so on. I rebind C-x, and some are screwed up by 
hardcoding. ;-)
From 1ef556a1eae75045b560c65d8a4ba2e71da71a11 Mon Sep 17 00:00:00 2001
From: Teika kazura te...@gmx.com
Date: Sat, 8 Nov 2014 16:48:36 +0900
Subject: [PATCH 1/2] Let `org-read-date' respect `org-replace-disputed-keys'
 again.

Beginning from org-8.1, org-read-date ignores org-replace-disputed-keys. This commit restores the original behavior. Users who want the org-8.1 behavior should customize `org-read-date-minibuffer-local-map' instead.

See http://thread.gmane.org/gmane.emacs.orgmode/90626/focus=91318 for the discussion on this issue.

This commit in effect reverts a6986494a0c4fc5d3363c2bebe48215e7138e4f1 and e8023dde58f267a525b63184ec07d371b5a4c8b5.
---
 lisp/org.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 87f1725..8146eb5 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16600,8 +16600,7 @@ So these are more for recording a certain time/date.
 (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)
-- 
2.0.4

From 9c6ed406d5add908aac5b73cdfacc2272f2cf89e Mon Sep 17 00:00:00 2001
From: Teika kazura te...@gmx.com
Date: Wed, 12 Nov 2014 17:08:00 +0900
Subject: [PATCH 2/2] org.texi: Timestamp sections.

Section Creating timestamp is renamed to Timestamp commands. `org-read-date-minibuffer-local-map' is described. Other contents improvement in that section.

Minor whitespace cleanups.
---
 doc/org.texi | 99 ++--
 1 file changed, 49 insertions(+), 50 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index b01db2c..bfb5b4f 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -458,14 +458,14 @@ Defining columns
 Dates and times
 
 * Timestamps::  Assigning a time to a tree entry
-* Creating timestamps:: Commands which insert timestamps
+* Timestamp commands::  Commands which insert timestamps
 * Deadlines and scheduling::Planning your work
 * Clocking work time::  Tracking how long you spend on a task
 * Effort estimates::Planning work effort in advance
 * Relative timer::  Notes with a running timer
 * Countdown timer:: Starting a countdown timer for a task
 
-Creating timestamps
+Timestamp commands
 
 * The date/time prompt::How Org mode helps you entering date and time
 * Custom time format::  Making dates look different
@@ -4646,7 +4646,7 @@ and agenda buffer with the @kbd{,} command (@pxref{Agenda commands}).
 @vindex org-priority-start-cycle-with-default
 Increase/decrease priority of current headline@footnote{See also the option
 @code{org-priority-start-cycle-with-default}.}.  Note that these keys are
-also used to modify timestamps (@pxref{Creating timestamps}).  See also
+also used to modify timestamps (@pxref{Timestamp commands}).  See also
 @ref{Conflicts}, for a discussion of the interaction with
 @code{shift-selection-mode}.
 @end table
@@ -5771,7 +5771,7 @@