* No dot in datepicker dialog
@ 2013-03-26 19:49 Karl Voit
2013-04-04 12:53 ` Bastien
0 siblings, 1 reply; 15+ messages in thread
From: Karl Voit @ 2013-03-26 19:49 UTC (permalink / raw)
To: emacs-orgmode
Hi!
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.
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.
Is there a way to customize this behavior?
1. I can do a bisect if needed.
--
Karl Voit
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: No dot in datepicker dialog
2013-03-26 19:49 No dot in datepicker dialog Karl Voit
@ 2013-04-04 12:53 ` Bastien
2013-04-04 13:18 ` Karl Voit
2013-04-04 14:19 ` Gregor Zattler
0 siblings, 2 replies; 15+ messages in thread
From: Bastien @ 2013-04-04 12:53 UTC (permalink / raw)
To: Karl Voit; +Cc: news1142, emacs-orgmode
Hi Karl,
Karl Voit <devnull@Karl-Voit.at> 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.
>
> Is there a way to customize this behavior?
You can insert a dot with C-q . in the calendar.
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))))
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: No dot in datepicker dialog
2013-04-04 12:53 ` Bastien
@ 2013-04-04 13:18 ` Karl Voit
2013-04-04 14:19 ` Gregor Zattler
1 sibling, 0 replies; 15+ messages in thread
From: Karl Voit @ 2013-04-04 13:18 UTC (permalink / raw)
To: emacs-orgmode
* Bastien <bzg@altern.org> wrote:
> Hi Karl,
Hi Bastien!
> Karl Voit <devnull@Karl-Voit.at> 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.
Ack. However, AFAIR I was able to use "." (to jump to $today) *and*
type "31.12." (without C-q . or similar) before.
So in my opinion, it is not interfering at all: It can be solved by
interpreting "." (as goto-today) *only* if nothing else has been
written into the minibuffer.
This way, "." jumps to today *and* the user is able to enter
"31.12." in the minibuffer in order to jump to the last day of
December.
> You can insert a dot with C-q . in the calendar.
Thanks! This workaround solves my issue for now.
> You can also customize the local map:
Thanks for the pointer! Copied to my Emacs notes section :-)
--
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
> get Memacs from https://github.com/novoid/Memacs <
https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: No dot in datepicker dialog
2013-04-04 12:53 ` Bastien
2013-04-04 13:18 ` Karl Voit
@ 2013-04-04 14:19 ` Gregor Zattler
2013-04-23 16:04 ` Michael Brand
1 sibling, 1 reply; 15+ messages in thread
From: Gregor Zattler @ 2013-04-04 14:19 UTC (permalink / raw)
To: Bastien
Hi Bastien,
* Bastien <bzg@altern.org> [04. Apr. 2013]:
> Karl Voit <devnull@Karl-Voit.at> 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: No dot in datepicker dialog
2013-04-04 14:19 ` Gregor Zattler
@ 2013-04-23 16:04 ` Michael Brand
2013-04-24 8:06 ` Bastien
0 siblings, 1 reply; 15+ messages in thread
From: Michael Brand @ 2013-04-23 16:04 UTC (permalink / raw)
To: Org Mode
On Thu, Apr 4, 2013 at 3:18 PM, Karl Voit <devnull@karl-voit.at> wrote:
> [...]
> AFAIR I was able to use "." (to jump to $today) *and*
> type "31.12." (without C-q . or similar) before.
>
> So in my opinion, it is not interfering at all: It can be solved by
> interpreting "." (as goto-today) *only* if nothing else has been
> written into the minibuffer.
>
> This way, "." jumps to today *and* the user is able to enter
> "31.12." in the minibuffer in order to jump to the last day of
> December.
> [...]
and
On Thu, Apr 4, 2013 at 4:19 PM, Gregor Zattler <telegraph@gmx.net> wrote:
> [...]
> 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?
> [...]
Yes, this is how it worked and I was used to before too, very convenient.
And regarding the _echo_ of ".": I find the current behavior of not
echoing the "." confusing, as if it would be ignored when typed after
"3 1". There and also when "." is typed in the first place to jump to
today it was echoed in the prompt which I appreciated as a visual
feedback for what has actually been typed.
In other words:
- "C-c . ." _echoed_ and did what
"C-c . C-q ." _echoes_ and does now (goto today)
- "C-c . 3 1 . 1 2 ." echoed and did what
"C-c . 3 1 C-q . 1 2 C-q ." echoes and does now (goto Dec 31)
Reduced to these simple use cases applied on an existing past/future
timestamp the changes in Org seem strange.
Michael
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: No dot in datepicker dialog
2013-04-23 16:04 ` Michael Brand
@ 2013-04-24 8:06 ` Bastien
2013-04-24 8:23 ` Carsten Dominik
0 siblings, 1 reply; 15+ messages in thread
From: Bastien @ 2013-04-24 8:06 UTC (permalink / raw)
To: Michael Brand; +Cc: Org Mode
Hi Michael,
Michael Brand <michael.ch.brand@gmail.com> writes:
> Yes, this is how it worked and I was used to before too, very
> convenient.
This is how it works again.
Thanks for insisting on this!
--
Bastien
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: No dot in datepicker dialog
2013-04-24 8:06 ` Bastien
@ 2013-04-24 8:23 ` Carsten Dominik
2013-04-24 8:31 ` Bastien
0 siblings, 1 reply; 15+ messages in thread
From: Carsten Dominik @ 2013-04-24 8:23 UTC (permalink / raw)
To: Bastien; +Cc: Michael Brand, Org Mode
On 24.4.2013, at 10:06, Bastien <bzg@gnu.org> wrote:
> Hi Michael,
>
> Michael Brand <michael.ch.brand@gmail.com> writes:
>
>> Yes, this is how it worked and I was used to before too, very
>> convenient.
>
> This is how it works again.
How about testing for
(= (point) (1+ (length prompt)))
instead of
(= (char-before) 32)
?
- Carsten
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: No dot in datepicker dialog
2013-04-24 8:23 ` Carsten Dominik
@ 2013-04-24 8:31 ` Bastien
2013-04-24 8:43 ` Michael Brand
2013-04-24 9:12 ` Carsten Dominik
0 siblings, 2 replies; 15+ messages in thread
From: Bastien @ 2013-04-24 8:31 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Michael Brand, Org Mode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> On 24.4.2013, at 10:06, Bastien <bzg@gnu.org> wrote:
>
>> Hi Michael,
>>
>> Michael Brand <michael.ch.brand@gmail.com> writes:
>>
>>> Yes, this is how it worked and I was used to before too, very
>>> convenient.
>>
>> This is how it works again.
>
> How about testing for
>
> (= (point) (1+ (length prompt)))
>
> instead of
>
> (= (char-before) 32)
>
> ?
>
> - Carsten
Yep, as you wish -- I though it was somehow nice to still be able to
quickly jump at todays date by inserting a space then hitting ".",
even in the middle of the inserted text... but clearly a dubious
trick.
Let me know if you want me to do the change,
--
Bastien
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: No dot in datepicker dialog
2013-04-24 8:31 ` Bastien
@ 2013-04-24 8:43 ` Michael Brand
2013-04-24 8:51 ` Bastien
2013-04-24 8:52 ` Michael Brand
2013-04-24 9:12 ` Carsten Dominik
1 sibling, 2 replies; 15+ messages in thread
From: Michael Brand @ 2013-04-24 8:43 UTC (permalink / raw)
To: Bastien; +Cc: Org Mode, Carsten Dominik
On Wed, Apr 24, 2013 at 10:31 AM, Bastien <bzg@gnu.org> wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
> [...]
>> How about testing for
>>
>> (= (point) (1+ (length prompt)))
>>
>> instead of
>>
>> (= (char-before) 32)
>>
>> ?
>>
>> - Carsten
>
> Yep, as you wish -- I though it was somehow nice to still be able to
> quickly jump at todays date by inserting a space then hitting ".",
> even in the middle of the inserted text... but clearly a dubious
> trick.
>
> Let me know if you want me to do the change,
(= (point) (1+ (length prompt))) would be a regression of "3 1 . 1 2 .".
On the other side the current (= (char-before) ?.) does still not echo
the "." at the beginning which I found convenient but don't insist if
there is a reason for not to echo.
Michael
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: No dot in datepicker dialog
2013-04-24 8:43 ` Michael Brand
@ 2013-04-24 8:51 ` Bastien
2013-04-24 9:13 ` Michael Brand
2013-04-24 8:52 ` Michael Brand
1 sibling, 1 reply; 15+ messages in thread
From: Bastien @ 2013-04-24 8:51 UTC (permalink / raw)
To: Michael Brand; +Cc: Org Mode, Carsten Dominik
Michael Brand <michael.ch.brand@gmail.com> writes:
> On the other side the current (= (char-before) ?.) does still not echo
> the "." at the beginning which I found convenient but don't insist if
> there is a reason for not to echo.
I have no strong opinion on this, but I think it's better if "." does
one single thing at the time.
--
Bastien
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: No dot in datepicker dialog
2013-04-24 8:43 ` Michael Brand
2013-04-24 8:51 ` Bastien
@ 2013-04-24 8:52 ` Michael Brand
1 sibling, 0 replies; 15+ messages in thread
From: Michael Brand @ 2013-04-24 8:52 UTC (permalink / raw)
To: Bastien; +Cc: Org Mode, Carsten Dominik
On Wed, Apr 24, 2013 at 10:43 AM, Michael Brand
<michael.ch.brand@gmail.com> wrote:
> (= (point) (1+ (length prompt))) would be a regression of "3 1 . 1 2 .".
Sorry, it is not a regression when reloading lisp properly and not
only with eval-buffer of org.el. Would be ok for me if not echoing "."
at the beginning is intended.
Michael
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: No dot in datepicker dialog
2013-04-24 8:31 ` Bastien
2013-04-24 8:43 ` Michael Brand
@ 2013-04-24 9:12 ` Carsten Dominik
2013-04-24 9:38 ` Bastien
1 sibling, 1 reply; 15+ messages in thread
From: Carsten Dominik @ 2013-04-24 9:12 UTC (permalink / raw)
To: Bastien; +Cc: Michael Brand, Org Mode
On 24.4.2013, at 10:31, Bastien <bzg@gnu.org> wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> On 24.4.2013, at 10:06, Bastien <bzg@gnu.org> wrote:
>>
>>> Hi Michael,
>>>
>>> Michael Brand <michael.ch.brand@gmail.com> writes:
>>>
>>>> Yes, this is how it worked and I was used to before too, very
>>>> convenient.
>>>
>>> This is how it works again.
>>
>> How about testing for
>>
>> (= (point) (1+ (length prompt)))
>>
>> instead of
>>
>> (= (char-before) 32)
>>
>> ?
>>
>> - Carsten
>
> Yep, as you wish -- I though it was somehow nice to still be able to
> quickly jump at todays date by inserting a space then hitting ".",
> even in the middle of the inserted text... but clearly a dubious
> trick.
>
> Let me know if you want me to do the change,
I think only doing this at the beginning of the prompt is better,
anywhere else it is too magic. Maybe we can have a command like C-c . which will work everywhere?
- Carsten
>
> --
> Bastien
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: No dot in datepicker dialog
2013-04-24 8:51 ` Bastien
@ 2013-04-24 9:13 ` Michael Brand
0 siblings, 0 replies; 15+ messages in thread
From: Michael Brand @ 2013-04-24 9:13 UTC (permalink / raw)
To: Bastien; +Cc: Org Mode, Carsten Dominik
Hi Bastien
On Wed, Apr 24, 2013 at 10:51 AM, Bastien <bzg@gnu.org> wrote:
> I have no strong opinion on this, but I think it's better if "." does
> one single thing at the time.
Then I don't mind.
And oh, by the way, thank you for taking care of the regression of "3
1 . 1 2 ." now solved.
Michael
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: No dot in datepicker dialog
2013-04-24 9:12 ` Carsten Dominik
@ 2013-04-24 9:38 ` Bastien
2013-04-24 9:40 ` Carsten Dominik
0 siblings, 1 reply; 15+ messages in thread
From: Bastien @ 2013-04-24 9:38 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Michael Brand, Org Mode
Hi Carsten,
Carsten Dominik <carsten.dominik@gmail.com> writes:
> I think only doing this at the beginning of the prompt is better,
> anywhere else it is too magic.
Okay, I implemented this by checking if we are at the start of the
prompt with `looking-back'. Using "prompt" here would raise a
compiler warning -- we would need to use org-prompt instead of prompt
and to (defvar org-prompt) ... a bit too much IMO.
> Maybe we can have a command like C-c . which will work everywhere?
I've done this too.
--
Bastien
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: No dot in datepicker dialog
2013-04-24 9:38 ` Bastien
@ 2013-04-24 9:40 ` Carsten Dominik
0 siblings, 0 replies; 15+ messages in thread
From: Carsten Dominik @ 2013-04-24 9:40 UTC (permalink / raw)
To: Bastien; +Cc: Michael Brand, Org Mode
On 24.4.2013, at 11:38, Bastien <bzg@gnu.org> wrote:
> Hi Carsten,
>
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> I think only doing this at the beginning of the prompt is better,
>> anywhere else it is too magic.
>
> Okay, I implemented this by checking if we are at the start of the
> prompt with `looking-back'. Using "prompt" here would raise a
> compiler warning -- we would need to use org-prompt instead of prompt
> and to (defvar org-prompt) ... a bit too much IMO.
Yes, this is better.
>
>> Maybe we can have a command like C-c . which will work everywhere?
>
> I've done this too.
Thank you.
- Carsten
>
> --
> Bastien
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2013-04-24 9:40 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-26 19:49 No dot in datepicker dialog Karl Voit
2013-04-04 12:53 ` Bastien
2013-04-04 13:18 ` Karl Voit
2013-04-04 14:19 ` Gregor Zattler
2013-04-23 16:04 ` Michael Brand
2013-04-24 8:06 ` Bastien
2013-04-24 8:23 ` Carsten Dominik
2013-04-24 8:31 ` Bastien
2013-04-24 8:43 ` Michael Brand
2013-04-24 8:51 ` Bastien
2013-04-24 9:13 ` Michael Brand
2013-04-24 8:52 ` Michael Brand
2013-04-24 9:12 ` Carsten Dominik
2013-04-24 9:38 ` Bastien
2013-04-24 9:40 ` Carsten Dominik
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).