From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gregor Zattler Subject: Re: No dot in datepicker dialog Date: Thu, 4 Apr 2013 16:19:46 +0200 Message-ID: <20130404141946.GE16563@boo.workgroup> References: <2013-03-26T20-43-10@devnull.Karl-Voit.at> <87hajm1mpa.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNl5n-000820-Sg for emacs-orgmode@gnu.org; Thu, 04 Apr 2013 10:24:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNl5h-0000It-54 for emacs-orgmode@gnu.org; Thu, 04 Apr 2013 10:24:43 -0400 Received: from mout.gmx.net ([212.227.17.20]:63211) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNl5g-0000Hy-RW for emacs-orgmode@gnu.org; Thu, 04 Apr 2013 10:24:37 -0400 Received: from mailout-de.gmx.net ([10.1.76.19]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0Lhhfz-1V0zib3KlN-00msJh for ; Thu, 04 Apr 2013 16:24:32 +0200 Received: from grfz by boo.workgroup with local (Exim 4.80) (envelope-from ) id 1UNl5Z-0003Xt-S2 for emacs-orgmode@gnu.org; Thu, 04 Apr 2013 16:24:29 +0200 Resent-Message-ID: <20130404142339.GF16563@boo.workgroup> Resent-To: emacs-orgmode Content-Disposition: inline In-Reply-To: <87hajm1mpa.fsf@bzg.ath.cx> 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: Bastien Hi Bastien, * Bastien [04. Apr. 2013]: > Karl Voit writes: >> A couple of weeks ago[1] the datepicking dialog got modified such >> that a dot "." jumps to the current day. Handy for most Org-mode >> users I guess. > > "." is also the character used in M-x calendar RET to jump to today's > date. >> However, this interferes with another feature I used quite often: I >> was able to enter "31.12." to quickly select 31st of December, for >> example. >> >> Please notice that (at least) in German speaking countries, it is >> common to use "31.12." and not "12/31" or similar. >> >> So in current Org-mode (git), I can not enter the character "." >> because it does not end up with a dot in the bottom line. I think here two different usages collide: 1) user of org-mode controls the date picker via keystrokes 2) enter dates (and times) via cut/paste from other sources (which were not created with the org-mode date picker in mind) and let the date picker parse them I for instance heavily rely on the second usage scenario. While I see that the usage of `.' for jump-to-today is long-standing tradition in Emacs calendar (first usage scenario), it's also a very common character to separate date fields in many countries (see http://en.wikipedia.org/wiki/Date_format_by_country) (important for second usage scenario). Therefore if we give `.' a special meaning in the date picker it is no longer possible to paste dates e.g. from emails if these happen to use `.' as date field separator. >> Is there a way to customize this behavior? > > You can insert a dot with C-q . in the calendar. This won't work with pasted text snippets containing dates. > You can also customize the local map: > > ;; Unbind "." in Org's calendar: > (define-key org-read-date-minibuffer-local-map (kbd ".") nil) > > ;; Bind "@" to `calendar-goto-today': > (define-key org-read-date-minibuffer-local-map > (kbd "@") > (lambda () (interactive) (org-eval-in-calendar '(calendar-goto-today)))) Using a character which usually is not used in sentences which refer to dates and times would help both usage scenarios. While I can't find an example ATM, I remember to have seen combined date-time representations like "2013-03-04@12:30". Characters typically not used in date/time representations are (to my little knowledge): `§', `$', `%', `&', `=', `#', `\', `_', `´', ``' these are normally not used in normal sentences which contain date/time information (as opposed to e.g. `,', `:', `;') and most of them are typically present on keyboards (perhaps not the `§' which is part of German keyboards, which says a lot about German culture I guess). These characters are also not mentioned with special meaning in the org manual on this topic ((org)Top > Dates and Times > Creating timestamps > The date/time prompt). Wouldn't it be better to have one of these as a *default* setting for calendar-goto-today? Or: would it help to restrict the special meaning of `.' as a reference for `today' only for the first character of the date picker input? This would correspond with the usage advise "Generally, the information should start at the beginning of the string" in the org-mode manual and at the same time with the long-standing meaning of `.' for `today' for Emacs calendar users while still allowing to paste date/time information from sources outside the Emacs/org-mode universe. Sorry for my lousy command of the English language and thanks for considering this anyway, Gregor