* Bug: org-read-date ignores hours?
@ 2019-10-23 3:47 Ag Ibragimov
2019-10-24 8:41 ` Marco Wahl
0 siblings, 1 reply; 7+ messages in thread
From: Ag Ibragimov @ 2019-10-23 3:47 UTC (permalink / raw)
To: emacs-orgmode
When I use (org-read-date t) and type something like "+2m" it works as expected, but for
some reason if I type something like "+2h" it returns datetime with no
changes. Expected - two hours in the future. Am I missing something?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: org-read-date ignores hours?
2019-10-23 3:47 Bug: org-read-date ignores hours? Ag Ibragimov
@ 2019-10-24 8:41 ` Marco Wahl
2019-10-24 17:45 ` agzam.ibragimov
0 siblings, 1 reply; 7+ messages in thread
From: Marco Wahl @ 2019-10-24 8:41 UTC (permalink / raw)
To: Ag Ibragimov; +Cc: emacs-orgmode
Hi Ag,
> When I use (org-read-date t) and type something like "+2m" it works as expected, but for
> some reason if I type something like "+2h" it returns datetime with no
> changes. Expected - two hours in the future. Am I missing something?
AFAICS your expectation is not implemented. See function
org-read-date-get-relative.
+1 for someone trying to implement this idea.
HTH,
--
Marco
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: org-read-date ignores hours?
2019-10-24 8:41 ` Marco Wahl
@ 2019-10-24 17:45 ` agzam.ibragimov
2019-10-29 9:30 ` Marco Wahl
2020-02-11 10:18 ` Bastien
0 siblings, 2 replies; 7+ messages in thread
From: agzam.ibragimov @ 2019-10-24 17:45 UTC (permalink / raw)
To: Marco Wahl; +Cc: org-mode-email
[-- Attachment #1: Type: text/plain, Size: 948 bytes --]
While fooling around with capture templates, I have also noticed this:
(progn
(setq org-popup-calendar-for-date-prompt t)
(read-date t)))
When prompted, if you type something like "13:00" - it returns correct,
expected datetime.
But, if you do:
(progn
(setq org-popup-calendar-for-date-prompt nil)
(read-date t)))
And again, type some time value in the prompt - it returns date with no
time. This seems to be a bug.
On Thu, Oct 24, 2019 at 1:41 AM Marco Wahl <marcowahlsoft@gmail.com> wrote:
> Hi Ag,
>
> > When I use (org-read-date t) and type something like "+2m" it works as
> expected, but for
> > some reason if I type something like "+2h" it returns datetime with no
> > changes. Expected - two hours in the future. Am I missing something?
>
> AFAICS your expectation is not implemented. See function
> org-read-date-get-relative.
>
> +1 for someone trying to implement this idea.
>
>
> HTH,
> --
> Marco
>
--
Regards,
Ag.
[-- Attachment #2: Type: text/html, Size: 1454 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: org-read-date ignores hours?
2019-10-24 17:45 ` agzam.ibragimov
@ 2019-10-29 9:30 ` Marco Wahl
2020-02-11 10:18 ` Bastien
1 sibling, 0 replies; 7+ messages in thread
From: Marco Wahl @ 2019-10-29 9:30 UTC (permalink / raw)
To: agzam.ibragimov; +Cc: org-mode-email
agzam.ibragimov@gmail.com writes:
> While fooling around with capture templates, I have also noticed this:
>
> (progn
> (setq org-popup-calendar-for-date-prompt t)
> (read-date t)))
>
> When prompted, if you type something like "13:00" - it returns correct,
> expected datetime.
>
> But, if you do:
>
> (progn
> (setq org-popup-calendar-for-date-prompt nil)
> (read-date t)))
>
> And again, type some time value in the prompt - it returns date with no
> time. This seems to be a bug.
I can confirm this behavior with org-read-date instead of read-date.
And at first glance I also think this is a bug.
I capture this issue for someday. But of course anyone please feel free
to fix this.
The same holds for the idea to add "h" (hours) and possibly "M"
(minutes) as a further way to specify the hour via org-read-date.
Thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: org-read-date ignores hours?
2019-10-24 17:45 ` agzam.ibragimov
2019-10-29 9:30 ` Marco Wahl
@ 2020-02-11 10:18 ` Bastien
2020-02-11 12:49 ` Marco Wahl
1 sibling, 1 reply; 7+ messages in thread
From: Bastien @ 2020-02-11 10:18 UTC (permalink / raw)
To: agzam.ibragimov; +Cc: Marco Wahl, org-mode-email
Hi,
I tried
(progn
(setq org-popup-calendar-for-date-prompt t)
(org-read-date t))
(progn
(setq org-popup-calendar-for-date-prompt nil)
(org-read-date t))
from master and could not reproduce the problem (not having the
inserted time string taken into account).
Marco, can you reproduce the problem in master?
--
Bastien
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: org-read-date ignores hours?
2020-02-11 10:18 ` Bastien
@ 2020-02-11 12:49 ` Marco Wahl
2020-02-11 13:16 ` Bastien
0 siblings, 1 reply; 7+ messages in thread
From: Marco Wahl @ 2020-02-11 12:49 UTC (permalink / raw)
To: Bastien; +Cc: org-mode-email
Bastien <bzg@gnu.org> writes:
> I tried
>
> (progn
> (setq org-popup-calendar-for-date-prompt t)
> (org-read-date t))
>
> (progn
> (setq org-popup-calendar-for-date-prompt nil)
> (org-read-date t))
>
> from master and could not reproduce the problem (not having the
> inserted time string taken into account).
>
> Marco, can you reproduce the problem in master?
I get back a date with a time in each case.
Concretely find the return values below if I do
C-u C-x C-e 11:55 RET
after each of the two sexp's below.
(progn
(setq org-popup-calendar-for-date-prompt t)
(org-read-date t))
"2020-02-11 11:55"
(progn
(setq org-popup-calendar-for-date-prompt nil)
(org-read-date t))
"2020-02-11 11:55"
In summary I can say that this LGTM and I can't reproduce the problem.
Ciao!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: org-read-date ignores hours?
2020-02-11 12:49 ` Marco Wahl
@ 2020-02-11 13:16 ` Bastien
0 siblings, 0 replies; 7+ messages in thread
From: Bastien @ 2020-02-11 13:16 UTC (permalink / raw)
To: Marco Wahl; +Cc: org-mode-email
Hi Marco,
Marco Wahl <marcowahlsoft@gmail.com> writes:
> In summary I can say that this LGTM and I can't reproduce the
> problem.
Thanks for taking the time and trouble to try reproducing it!
--
Bastien
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-02-11 13:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-23 3:47 Bug: org-read-date ignores hours? Ag Ibragimov
2019-10-24 8:41 ` Marco Wahl
2019-10-24 17:45 ` agzam.ibragimov
2019-10-29 9:30 ` Marco Wahl
2020-02-11 10:18 ` Bastien
2020-02-11 12:49 ` Marco Wahl
2020-02-11 13:16 ` Bastien
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).