emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] incorrect result with C-c ! to correct (complete) a date [9.7-pre (release_9.6.1-306-ga645a6 @ /home/d/src/git-org-mode/lisp/)]
@ 2023-03-20  1:56 Daniel Ortmann
  2023-03-21  3:24 ` Nick Dokos
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Daniel Ortmann @ 2023-03-20  1:56 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1522 bytes --]


--=-=-=
Content-Type: text/plain



Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See

https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

* correct date information
Starting with this manually-typed birthday date:
[1960-10-16]
Use the arrows to move to the text.
Now press C-c ! and then ENTER

I expected this result, i.e. I expected the day of the week to be added:
[1960-10-16 Sun]

But the following incorrect result occurs:
[1970-10-16 Fri]



--=-=-=
Content-Type: text/plain
Content-Disposition: attachment; filename=date-edit-oops.org
Content-Description: date edit oops org file


* correct date information
Starting with this manually-typed birthday date:
[1960-10-16]
Use the arrows to move to the text.
Now press C-c ! and then ENTER

I expected this result, i.e. I expected the day of the week to be added:
[1960-10-16 Sun]

But the following incorrect result occurs:
[1970-10-16 Fri]

--=-=-=
Content-Type: text/plain



Emacs : GNU Emacs 30.0.50 (build 50, x86_64-pc-linux-gnu, GTK+ Version 
3.24.34, cairo version 1.16.0)
of 2023-03-19
Package: Org mode version 9.7-pre (release_9.6.1-306-ga645a6 @ 
/home/d/src/git-org-mode/lisp/)
-- 
Daniel Ortmann <dortmann31415@gmail.com> 612-518-3147 m
key: C9E170E2, fingerprint = 81BB 6CAF F1EC F6C7 690C F4E9 66D7 7AFD 
C9E1 70E2

--=-=-=--

[-- Attachment #2: date-edit-oops.org --]
[-- Type: text/org, Size: 309 bytes --]


* correct date information
Starting with this manually-typed birthday date:
[1960-10-16]
Use the arrows to move to the text.
Now press C-c ! and then ENTER

I expected this result, i.e. I expected the day of the week to be added:
[1960-10-16 Sun]

But the following incorrect result occurs:
[1970-10-16 Fri]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] incorrect result with C-c ! to correct (complete) a date [9.7-pre (release_9.6.1-306-ga645a6 @ /home/d/src/git-org-mode/lisp/)]
  2023-03-20  1:56 [BUG] incorrect result with C-c ! to correct (complete) a date [9.7-pre (release_9.6.1-306-ga645a6 @ /home/d/src/git-org-mode/lisp/)] Daniel Ortmann
@ 2023-03-21  3:24 ` Nick Dokos
  2023-03-21 14:00 ` Max Nikulin
  2023-03-22 11:47 ` Ihor Radchenko
  2 siblings, 0 replies; 6+ messages in thread
From: Nick Dokos @ 2023-03-21  3:24 UTC (permalink / raw)
  To: emacs-orgmode

Do `C-h v org-read-date-force-compatible-dates` and read the doc
string of the variable.  You can customize the variable and set it to
`nil' which will give you a much wider range of dates to choose from
*assuming that your Emacs is compiled for and runs on a system that
can deal with such dates* (this is related to the "2038" problem[1]  where
32-bit (signed) timestamps will not be enough to count the number of seconds
since the "beginning of time" (that's 1970-01-01 at least as far as
Unix is concerned :-)) 

This is a difficult compatibility problem which is being worked on on
many fronts and I think there have been discussions about it on this
list.

But read the doc string, experiment on your system and see if you can
live with the consequences of choosing the "other" value for the
variable.

[1] https://en.wikipedia.org/wiki/Year_2038_problem

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] incorrect result with C-c ! to correct (complete) a date [9.7-pre (release_9.6.1-306-ga645a6 @ /home/d/src/git-org-mode/lisp/)]
  2023-03-20  1:56 [BUG] incorrect result with C-c ! to correct (complete) a date [9.7-pre (release_9.6.1-306-ga645a6 @ /home/d/src/git-org-mode/lisp/)] Daniel Ortmann
  2023-03-21  3:24 ` Nick Dokos
@ 2023-03-21 14:00 ` Max Nikulin
  2023-03-22  5:34   ` Daniel Ortmann
  2023-03-22 11:47 ` Ihor Radchenko
  2 siblings, 1 reply; 6+ messages in thread
From: Max Nikulin @ 2023-03-21 14:00 UTC (permalink / raw)
  To: Daniel Ortmann, emacs-orgmode

On 20/03/2023 08:56, Daniel Ortmann wrote:
> Starting with this manually-typed birthday date:
> [1960-10-16]
> Use the arrows to move to the text.
> Now press C-c ! and then ENTER
> 
> I expected this result, i.e. I expected the day of the week to be added:
> [1960-10-16 Sun]

If all what you need is to add day of week you may try C-c C-c instead 
of C-c !.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] incorrect result with C-c ! to correct (complete) a date [9.7-pre (release_9.6.1-306-ga645a6 @ /home/d/src/git-org-mode/lisp/)]
  2023-03-21 14:00 ` Max Nikulin
@ 2023-03-22  5:34   ` Daniel Ortmann
  2023-03-22 12:04     ` Max Nikulin
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Ortmann @ 2023-03-22  5:34 UTC (permalink / raw)
  To: emacs-orgmode

Excellent.  C-c C-c does work.  I will use that in the future. Thank you.

The 'incorrect' behavior with C-c ! remains.

Adjusting [1960-10-16] fails with C-c !

But adjusting [1971-10-16] with C-c ! works fine.

Something to do with the epoch boundary?

On 3/21/23 09:00, Max Nikulin wrote:
> On 20/03/2023 08:56, Daniel Ortmann wrote:
>> Starting with this manually-typed birthday date:
>> [1960-10-16]
>> Use the arrows to move to the text.
>> Now press C-c ! and then ENTER
>>
>> I expected this result, i.e. I expected the day of the week to be added:
>> [1960-10-16 Sun]
>
> If all what you need is to add day of week you may try C-c C-c instead 
> of C-c !.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] incorrect result with C-c ! to correct (complete) a date [9.7-pre (release_9.6.1-306-ga645a6 @ /home/d/src/git-org-mode/lisp/)]
  2023-03-20  1:56 [BUG] incorrect result with C-c ! to correct (complete) a date [9.7-pre (release_9.6.1-306-ga645a6 @ /home/d/src/git-org-mode/lisp/)] Daniel Ortmann
  2023-03-21  3:24 ` Nick Dokos
  2023-03-21 14:00 ` Max Nikulin
@ 2023-03-22 11:47 ` Ihor Radchenko
  2 siblings, 0 replies; 6+ messages in thread
From: Ihor Radchenko @ 2023-03-22 11:47 UTC (permalink / raw)
  To: Daniel Ortmann; +Cc: emacs-orgmode

Daniel Ortmann <dortmann31415@pobox.com> writes:

> Starting with this manually-typed birthday date:
> [1960-10-16]
> Use the arrows to move to the text.
> Now press C-c ! and then ENTER

As documented in 8.2.1 The date/time prompt section of Org manual:

       Not all dates can be represented in a given Emacs implementation.  By
    default Org mode forces dates into the compatibility range 1970–2037
    which works on all Emacs implementations.  If you want to use dates
    outside of this range, read the docstring of the variable
    ‘org-read-date-force-compatible-dates’.

Emacs implementations that won't be able to handle out-of-range dates
are 32-bit Emacs versions. See
https://yhetil.org/emacs-devel/8735gaqm6i.fsf@localhost

If we can assume that most of Emacs versions are 32-bit, we can flip the
default value of `org-read-date-force-compatible-dates' to nil.
The default `t' value has been set 12 years ago, when 32-bit systems
were much more common.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] incorrect result with C-c ! to correct (complete) a date [9.7-pre (release_9.6.1-306-ga645a6 @ /home/d/src/git-org-mode/lisp/)]
  2023-03-22  5:34   ` Daniel Ortmann
@ 2023-03-22 12:04     ` Max Nikulin
  0 siblings, 0 replies; 6+ messages in thread
From: Max Nikulin @ 2023-03-22 12:04 UTC (permalink / raw)
  To: Daniel Ortmann, emacs-orgmode

On 22/03/2023 12:34, Daniel Ortmann wrote:
> Adjusting [1960-10-16] fails with C-c !
> 
> Something to do with the epoch boundary?

It seems you have not noticed the following message that was sent to the 
list only without your address in Cc

Nick Dokos to emacs-orgmode. Re: [BUG] incorrect result with C-c ! to 
correct (complete) a date [9.7-pre (release_9.6.1-306-ga645a6 @ 
/home/d/src/git-org-mode/lisp/)] Mon, 20 Mar 2023 23:24:19 -0400. 
https://list.orgmode.org/87ttyeg524.fsf@alphaville.usersys.redhat.com

See `org-read-date-force-compatible-dates'.

P.S. You may try to set the Mail-Followup-To header to your and mailing 
list address to get personal copy. However some mail clients (mu4e?) may 
ignore it.
https://wiki.mozilla.org/Thunderbird:Help_Documentation:Mail-Followup-To_and_Mail-Reply-To


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-22 12:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-20  1:56 [BUG] incorrect result with C-c ! to correct (complete) a date [9.7-pre (release_9.6.1-306-ga645a6 @ /home/d/src/git-org-mode/lisp/)] Daniel Ortmann
2023-03-21  3:24 ` Nick Dokos
2023-03-21 14:00 ` Max Nikulin
2023-03-22  5:34   ` Daniel Ortmann
2023-03-22 12:04     ` Max Nikulin
2023-03-22 11:47 ` Ihor Radchenko

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