* bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
@ 2021-05-08 16:55 Евгений Михайлов
2021-05-08 22:37 ` Basil L. Contovounesios
` (3 more replies)
0 siblings, 4 replies; 18+ messages in thread
From: Евгений Михайлов @ 2021-05-08 16:55 UTC (permalink / raw)
To: 48298
[-- Attachment #1: Type: text/plain, Size: 5664 bytes --]
(my-mins-between "11:30" "12:04")
(defun my-mins-between (time1 time2)
"Return the minutes between HH:mm strings TIME1 and TIME2."
(let ((diff (apply #'time-subtract
(mapcar (lambda (time)
(encode-time (decoded-time-set-defaults
(parse-time-string time))))
(list time1 time2)))))
(/ (float-time diff) 60)))
Debugger entered--Lisp error: (error "Invalid time specification")
encode-time((0 30 11 1 1 0 nil -1 nil))
(lambda (time) (encode-time (decoded-time-set-defaults (parse-time-string
time))))("11:30")
mapcar((lambda (time) (encode-time (decoded-time-set-defaults
(parse-time-string time)))) ("11:30" "12:04"))
In GNU Emacs 27.2 (build 1, x86_64-w64-mingw32)
of 2021-03-26 built on CIRROCUMULUS
Repository revision: deef5efafb70f4b171265b896505b92b6eef24e6
Repository branch: HEAD
Windowing system distributor 'Microsoft Corp.', version 10.0.19041
System Description: Microsoft Windows 10 Home (v10.0.2004.19041.928)
Recent messages:
Quit
Mark set
Entering debugger...
Back to top level
my-mins-between
Entering debugger...
Back to top level
user-error: Beginning of history; no preceding item
user-error: End of history; no default available
scroll-up-command: End of buffer
command-execute: Command attempted to use minibuffer while in minibuffer
Configured using:
'configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static''
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2
HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2 GMP
Important settings:
value of $LANG: RUS
locale-coding-system: cp1251
Major mode: Emacs-Lisp
Minor modes in effect:
global-company-mode: t
company-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
c:/Users/pc/.emacs.d/elpa/flymake-1.1.1/flymake hides c:/Program
Files/Emacs/x86_64/share/emacs/27.2/lisp/progmodes/flymake
c:/Users/pc/.emacs.d/elpa/eldoc-1.11.0/eldoc hides c:/Program
Files/Emacs/x86_64/share/emacs/27.2/lisp/emacs-lisp/eldoc
Features:
(shadow sort mail-extr emacsbug sendmail help-fns radix-tree cl-print
debug backtrace bookmark pp gnutls network-stream url-http url-gw nsm
url-cache url-auth org-habitica vc-git diff-mode cl-extra help-mode
org-element avl-tree ol-eww eww mm-url url-queue ol-rmail ol-mhe ol-irc
ol-info ol-gnus nnir gnus-sum url url-proxy url-privacy url-expand
url-methods url-history mailcap shr url-cookie url-domsuf url-util svg
xml dom gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail
mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int
gnus-range message rmc puny rfc822 mml mml-sec epa derived epg
epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail
rmail-loaddefs rfc2047 rfc2045 ietf-drums text-property-search
mail-utils mm-util mail-prsvr wid-edit ol-docview doc-view jka-compr
image-mode exif dired dired-loaddefs ol-bibtex bibtex ol-bbdb ol-w3m
face-remap org-agenda org-refile org ob ob-tangle ob-ref ob-lob ob-table
ob-exp org-macro org-footnote org-src ob-comint org-pcomplete pcomplete
org-list org-faces org-entities time-date noutline outline easy-mmode
org-version ob-emacs-lisp ob-core ob-eval org-table org-keys
org-loaddefs find-func cal-menu calendar cal-loaddefs ol org-compat
advice org-macs format-spec company-oddmuse company-keywords
company-etags etags fileloop generator xref project company-gtags
company-dabbrev-code company-dabbrev company-files company-clang
company-capf company-cmake company-semantic company-template
company-bbdb company zerodark-theme let-alist pcase org-capture-complex
report 1cfresh process-1cbases process-docs flymake-proc flymake compile
comint ansi-color ring warnings thingatpt string-inflection
helm-easymenu edmacro kmacro rx info package easymenu browse-url
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads w32notify w32
lcms2 multi-tty make-network-process emacs)
Memory information:
((conses 16 367719 37867)
(symbols 48 24682 1)
(strings 32 86256 2807)
(string-bytes 1 3071501)
(vectors 16 43765)
(vector-slots 8 1238429 232140)
(floats 8 271 108)
(intervals 56 3530 533)
(buffers 1000 33))
[-- Attachment #2: Type: text/html, Size: 6411 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
2021-05-08 16:55 bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil)) Евгений Михайлов
@ 2021-05-08 22:37 ` Basil L. Contovounesios
2021-05-09 7:07 ` Eli Zaretskii
2021-05-09 6:46 ` Eli Zaretskii
` (2 subsequent siblings)
3 siblings, 1 reply; 18+ messages in thread
From: Basil L. Contovounesios @ 2021-05-08 22:37 UTC (permalink / raw)
To: Евгений Михайлов
Cc: 48298
forcemerge 48290 48298
quit
Евгений Михайлов <lewwadoo@gmail.com> writes:
> (my-mins-between "11:30" "12:04")
>
> (defun my-mins-between (time1 time2)
> "Return the minutes between HH:mm strings TIME1 and TIME2."
> (let ((diff (apply #'time-subtract
> (mapcar (lambda (time)
> (encode-time (decoded-time-set-defaults
> (parse-time-string time))))
> (list time1 time2)))))
> (/ (float-time diff) 60)))
>
> Debugger entered--Lisp error: (error "Invalid time specification")
> encode-time((0 30 11 1 1 0 nil -1 nil))
> (lambda (time) (encode-time (decoded-time-set-defaults (parse-time-string time))))("11:30")
> mapcar((lambda (time) (encode-time (decoded-time-set-defaults (parse-time-string time)))) ("11:30" "12:04"))
I'm not sure what happened that resulted in two bug reports being
submitted, but this looks like the missing description from
https://bugs.gnu.org/48290, so I'm merging the two reports.
Thanks,
--
Basil
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
2021-05-08 16:55 bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil)) Евгений Михайлов
2021-05-08 22:37 ` Basil L. Contovounesios
@ 2021-05-09 6:46 ` Eli Zaretskii
2021-05-09 8:19 ` Basil L. Contovounesios
2021-05-09 7:30 ` Andreas Schwab
2021-05-11 20:56 ` bug#48298: Евгений Михайлов
3 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2021-05-09 6:46 UTC (permalink / raw)
To: Евгений Михайлов
Cc: 48298
> From: Евгений Михайлов
> <lewwadoo@gmail.com>
> Date: Sat, 8 May 2021 19:55:10 +0300
>
> (my-mins-between "11:30" "12:04")
>
> (defun my-mins-between (time1 time2)
> "Return the minutes between HH:mm strings TIME1 and TIME2."
> (let ((diff (apply #'time-subtract
> (mapcar (lambda (time)
> (encode-time (decoded-time-set-defaults
> (parse-time-string time))))
> (list time1 time2)))))
> (/ (float-time diff) 60)))
>
> Debugger entered--Lisp error: (error "Invalid time specification")
> encode-time((0 30 11 1 1 0 nil -1 nil))
> (lambda (time) (encode-time (decoded-time-set-defaults (parse-time-string time))))("11:30")
> mapcar((lambda (time) (encode-time (decoded-time-set-defaults (parse-time-string time)))) ("11:30"
> "12:04"))
I guess the problem is in decoded-time-set-defaults, if anywhere.
However, I'm not sure I understand the idea behind your
my-mins-between: how did you expect Emacs to guess the year you had in
mind?
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
2021-05-08 22:37 ` Basil L. Contovounesios
@ 2021-05-09 7:07 ` Eli Zaretskii
0 siblings, 0 replies; 18+ messages in thread
From: Eli Zaretskii @ 2021-05-09 7:07 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: 48298, lewwadoo
> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> Date: Sat, 08 May 2021 23:37:43 +0100
> Cc: 48298@debbugs.gnu.org
>
> I'm not sure what happened that resulted in two bug reports being
> submitted, but this looks like the missing description from
> https://bugs.gnu.org/48290, so I'm merging the two reports.
Thanks. Bug reports without a single word of explanation are indeed
hard to process.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
2021-05-08 16:55 bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil)) Евгений Михайлов
2021-05-08 22:37 ` Basil L. Contovounesios
2021-05-09 6:46 ` Eli Zaretskii
@ 2021-05-09 7:30 ` Andreas Schwab
2021-05-11 20:56 ` bug#48298: Евгений Михайлов
3 siblings, 0 replies; 18+ messages in thread
From: Andreas Schwab @ 2021-05-09 7:30 UTC (permalink / raw)
To: Евгений Михайлов
Cc: 48298
On Mai 08 2021, Евгений Михайлов wrote:
> (my-mins-between "11:30" "12:04")
>
> (defun my-mins-between (time1 time2)
> "Return the minutes between HH:mm strings TIME1 and TIME2."
This isn't well defined: there may be a DST switchover between the two
timestamps.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
2021-05-09 6:46 ` Eli Zaretskii
@ 2021-05-09 8:19 ` Basil L. Contovounesios
2021-05-09 8:27 ` Eli Zaretskii
0 siblings, 1 reply; 18+ messages in thread
From: Basil L. Contovounesios @ 2021-05-09 8:19 UTC (permalink / raw)
To: Eli Zaretskii, Lars Ingebrigtsen
Cc: 48298,
Евгений Михайлов
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Евгений Михайлов
>> <lewwadoo@gmail.com>
>> Date: Sat, 8 May 2021 19:55:10 +0300
>>
>> (my-mins-between "11:30" "12:04")
>>
>> (defun my-mins-between (time1 time2)
>> "Return the minutes between HH:mm strings TIME1 and TIME2."
>> (let ((diff (apply #'time-subtract
>> (mapcar (lambda (time)
>> (encode-time (decoded-time-set-defaults
>> (parse-time-string time))))
>> (list time1 time2)))))
>> (/ (float-time diff) 60)))
>>
>> Debugger entered--Lisp error: (error "Invalid time specification")
>> encode-time((0 30 11 1 1 0 nil -1 nil))
>> (lambda (time) (encode-time (decoded-time-set-defaults (parse-time-string time))))("11:30")
>> mapcar((lambda (time) (encode-time (decoded-time-set-defaults (parse-time-string time)))) ("11:30"
>> "12:04"))
>
> I guess the problem is in decoded-time-set-defaults, if anywhere.
Lars?
FWIW there is a similar pattern in the function iso8601--encode-time.
BTW I just noticed that decoded-time-set-defaults was mistakenly
announced in NEWS as encoded-time-set-defaults - should that be fixed on
emacs-27 or master?
> However, I'm not sure I understand the idea behind your
> my-mins-between: how did you expect Emacs to guess the year you had in
> mind?
The year doesn't matter, since my-mins-between cares only about the
relative difference between strings of the form "HH:mm", i.e. the hours
and minutes fields.
The other decoded time fields resulting from parsing don't matter, as
long as they are equivalent for both strings.
Thanks,
--
Basil
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
2021-05-09 8:19 ` Basil L. Contovounesios
@ 2021-05-09 8:27 ` Eli Zaretskii
2021-05-09 8:54 ` Basil L. Contovounesios
0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2021-05-09 8:27 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: larsi, 48298, lewwadoo
> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> Cc: Евгений Михайлов
> <lewwadoo@gmail.com>, 48298@debbugs.gnu.org
> Date: Sun, 09 May 2021 09:19:47 +0100
>
> > I guess the problem is in decoded-time-set-defaults, if anywhere.
>
> Lars?
As the minimum fix, perhaps instead of using zero as the missing year
we should use 1970, as zero could not be representable on some
systems.
> BTW I just noticed that decoded-time-set-defaults was mistakenly
> announced in NEWS as encoded-time-set-defaults - should that be fixed on
> emacs-27 or master?
Master, I guess.
> > However, I'm not sure I understand the idea behind your
> > my-mins-between: how did you expect Emacs to guess the year you had in
> > mind?
>
> The year doesn't matter, since my-mins-between cares only about the
> relative difference between strings of the form "HH:mm", i.e. the hours
> and minutes fields.
Yes, it does matter: see the comment by Andreas.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
2021-05-09 8:27 ` Eli Zaretskii
@ 2021-05-09 8:54 ` Basil L. Contovounesios
2021-05-09 9:52 ` Lars Ingebrigtsen
2021-05-09 10:35 ` Eli Zaretskii
0 siblings, 2 replies; 18+ messages in thread
From: Basil L. Contovounesios @ 2021-05-09 8:54 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: larsi, 48298, lewwadoo
[-- Attachment #1: Type: text/plain, Size: 581 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> From: "Basil L. Contovounesios" <contovob@tcd.ie>
>> Cc: Евгений Михайлов
>> <lewwadoo@gmail.com>, 48298@debbugs.gnu.org
>> Date: Sun, 09 May 2021 09:19:47 +0100
>>
>> > I guess the problem is in decoded-time-set-defaults, if anywhere.
>>
>> Lars?
>
> As the minimum fix, perhaps instead of using zero as the missing year
> we should use 1970, as zero could not be representable on some
> systems.
Also 1970 is implied by the function's docstring and announcement.
All tests seem to pass with this:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Default-to-1970-in-decoded-time-set-defaults.patch --]
[-- Type: text/x-diff, Size: 1060 bytes --]
From 3bb0de4f76265d3be28c0b38046f1a08d93259b9 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
Date: Sun, 9 May 2021 09:50:00 +0100
Subject: [PATCH] Default to 1970 in decoded-time-set-defaults
* lisp/calendar/time-date.el (decoded-time-set-defaults): Set an
unspecified year field to 1970, as promised in the docstring, and to
ensure it's representable on all systems (bug#48298).
---
lisp/calendar/time-date.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el
index 2df57a3c33..e93a74810d 100644
--- a/lisp/calendar/time-date.el
+++ b/lisp/calendar/time-date.el
@@ -539,7 +539,7 @@ decoded-time-set-defaults
(unless (decoded-time-month time)
(setf (decoded-time-month time) 1))
(unless (decoded-time-year time)
- (setf (decoded-time-year time) 0))
+ (setf (decoded-time-year time) 1970))
;; When we don't have a time zone, default to DEFAULT-ZONE without
;; DST if DEFAULT-ZONE if given, and to unknown DST otherwise.
--
2.30.2
[-- Attachment #3: Type: text/plain, Size: 764 bytes --]
Evgeny, does that fix the error that you see?
>> BTW I just noticed that decoded-time-set-defaults was mistakenly
>> announced in NEWS as encoded-time-set-defaults - should that be fixed on
>> emacs-27 or master?
>
> Master, I guess.
Done in 3d276324ed.
>> > However, I'm not sure I understand the idea behind your
>> > my-mins-between: how did you expect Emacs to guess the year you had in
>> > mind?
>>
>> The year doesn't matter, since my-mins-between cares only about the
>> relative difference between strings of the form "HH:mm", i.e. the hours
>> and minutes fields.
>
> Yes, it does matter: see the comment by Andreas.
In general, sure, but perhaps not in Evgeny's specific use case as
described in https://bugs.gnu.org/48290#11.
Thanks,
--
Basil
^ permalink raw reply related [flat|nested] 18+ messages in thread
* bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
2021-05-09 8:54 ` Basil L. Contovounesios
@ 2021-05-09 9:52 ` Lars Ingebrigtsen
2021-05-09 10:03 ` Basil L. Contovounesios
2021-05-09 10:35 ` Eli Zaretskii
1 sibling, 1 reply; 18+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-09 9:52 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: 48298, lewwadoo
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
> (unless (decoded-time-year time)
> - (setf (decoded-time-year time) 0))
> + (setf (decoded-time-year time) 1970))
Sure; that makes as much sense as anything, but the doc string should
perhaps mention it. (All the other defaults are as zero-ish as
possible, and 1970 is used here only because of technical limitations.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
2021-05-09 9:52 ` Lars Ingebrigtsen
@ 2021-05-09 10:03 ` Basil L. Contovounesios
2021-05-09 10:09 ` Lars Ingebrigtsen
0 siblings, 1 reply; 18+ messages in thread
From: Basil L. Contovounesios @ 2021-05-09 10:03 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 48298, lewwadoo
Lars Ingebrigtsen <larsi@gnus.org> writes:
> "Basil L. Contovounesios" <contovob@tcd.ie> writes:
>
>> (unless (decoded-time-year time)
>> - (setf (decoded-time-year time) 0))
>> + (setf (decoded-time-year time) 1970))
>
> Sure; that makes as much sense as anything, but the doc string should
> perhaps mention it.
It already does:
The default value is based on January 1st, 1970 at midnight.
Can it be clarified further?
> (All the other defaults are as zero-ish as possible, and 1970 is used
> here only because of technical limitations.)
Is it worth mentioning in the docstring that 1970 is chosen to guarantee
portability, similar to the note in encode-time's docstring?
Thanks,
--
Basil
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
2021-05-09 10:03 ` Basil L. Contovounesios
@ 2021-05-09 10:09 ` Lars Ingebrigtsen
2021-05-09 11:02 ` Basil L. Contovounesios
0 siblings, 1 reply; 18+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-09 10:09 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: 48298, lewwadoo
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
> It already does:
>
> The default value is based on January 1st, 1970 at midnight.
>
> Can it be clarified further?
Oh, so it was just a bug...
>> (All the other defaults are as zero-ish as possible, and 1970 is used
>> here only because of technical limitations.)
>
> Is it worth mentioning in the docstring that 1970 is chosen to guarantee
> portability, similar to the note in encode-time's docstring?
Sure; makes sense.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
2021-05-09 8:54 ` Basil L. Contovounesios
2021-05-09 9:52 ` Lars Ingebrigtsen
@ 2021-05-09 10:35 ` Eli Zaretskii
2021-05-09 10:59 ` Basil L. Contovounesios
1 sibling, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2021-05-09 10:35 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: larsi, 48298, lewwadoo
> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> Cc: larsi@gnus.org, lewwadoo@gmail.com, 48298@debbugs.gnu.org
> Date: Sun, 09 May 2021 09:54:32 +0100
>
> >> BTW I just noticed that decoded-time-set-defaults was mistakenly
> >> announced in NEWS as encoded-time-set-defaults - should that be fixed on
> >> emacs-27 or master?
> >
> > Master, I guess.
>
> Done in 3d276324ed.
You've changed NEWS.27, it seems? That's not what I meant, it will
just create merge conflicts when NEWS from emacs-27 are merged. I
thought you were talking about NEWS on master, not NEWS.27.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
2021-05-09 10:35 ` Eli Zaretskii
@ 2021-05-09 10:59 ` Basil L. Contovounesios
2021-05-09 11:49 ` Eli Zaretskii
0 siblings, 1 reply; 18+ messages in thread
From: Basil L. Contovounesios @ 2021-05-09 10:59 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: larsi, 48298, lewwadoo
Eli Zaretskii <eliz@gnu.org> writes:
>> From: "Basil L. Contovounesios" <contovob@tcd.ie>
>> Cc: larsi@gnus.org, lewwadoo@gmail.com, 48298@debbugs.gnu.org
>> Date: Sun, 09 May 2021 09:54:32 +0100
>>
>> >> BTW I just noticed that decoded-time-set-defaults was mistakenly
>> >> announced in NEWS as encoded-time-set-defaults - should that be fixed on
>> >> emacs-27 or master?
>> >
>> > Master, I guess.
>>
>> Done in 3d276324ed.
>
> You've changed NEWS.27, it seems? That's not what I meant, it will
> just create merge conflicts when NEWS from emacs-27 are merged. I
> thought you were talking about NEWS on master, not NEWS.27.
Sorry. Should I revert that commit on master and make the change in
etc/NEWS on emacs-27 instead?
--
Basil
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
2021-05-09 10:09 ` Lars Ingebrigtsen
@ 2021-05-09 11:02 ` Basil L. Contovounesios
0 siblings, 0 replies; 18+ messages in thread
From: Basil L. Contovounesios @ 2021-05-09 11:02 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 48298, lewwadoo
Lars Ingebrigtsen <larsi@gnus.org> writes:
> "Basil L. Contovounesios" <contovob@tcd.ie> writes:
>
>> It already does:
>>
>> The default value is based on January 1st, 1970 at midnight.
>>
>> Can it be clarified further?
>
> Oh, so it was just a bug...
>
>>> (All the other defaults are as zero-ish as possible, and 1970 is used
>>> here only because of technical limitations.)
>>
>> Is it worth mentioning in the docstring that 1970 is chosen to guarantee
>> portability, similar to the note in encode-time's docstring?
>
> Sure; makes sense.
Done:
Default to 1970 in decoded-time-set-defaults
b376ed7220 2021-05-09 11:52:20 +0100
https://git.sv.gnu.org/cgit/emacs.git/commit/?id=b376ed72204193eba652666fa2540f412f456490
Evgeny, does that solve your issue?
Thanks,
--
Basil
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
2021-05-09 10:59 ` Basil L. Contovounesios
@ 2021-05-09 11:49 ` Eli Zaretskii
2021-05-09 13:57 ` Basil L. Contovounesios
0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2021-05-09 11:49 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: larsi, 48298, lewwadoo
> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> Cc: larsi@gnus.org, lewwadoo@gmail.com, 48298@debbugs.gnu.org
> Date: Sun, 09 May 2021 11:59:04 +0100
>
> >> > Master, I guess.
> >>
> >> Done in 3d276324ed.
> >
> > You've changed NEWS.27, it seems? That's not what I meant, it will
> > just create merge conflicts when NEWS from emacs-27 are merged. I
> > thought you were talking about NEWS on master, not NEWS.27.
>
> Sorry. Should I revert that commit on master and make the change in
> etc/NEWS on emacs-27 instead?
Yes, please.
(I thought you asked about the branch because this could also be
called out in Emacs 28's NEWS in some way. Sorry for my
misunderstanding.)
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
2021-05-09 11:49 ` Eli Zaretskii
@ 2021-05-09 13:57 ` Basil L. Contovounesios
0 siblings, 0 replies; 18+ messages in thread
From: Basil L. Contovounesios @ 2021-05-09 13:57 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: larsi, 48298, lewwadoo
Eli Zaretskii <eliz@gnu.org> writes:
>> From: "Basil L. Contovounesios" <contovob@tcd.ie>
>> Cc: larsi@gnus.org, lewwadoo@gmail.com, 48298@debbugs.gnu.org
>> Date: Sun, 09 May 2021 11:59:04 +0100
>>
>> >> > Master, I guess.
>> >>
>> >> Done in 3d276324ed.
>> >
>> > You've changed NEWS.27, it seems? That's not what I meant, it will
>> > just create merge conflicts when NEWS from emacs-27 are merged. I
>> > thought you were talking about NEWS on master, not NEWS.27.
>>
>> Sorry. Should I revert that commit on master and make the change in
>> etc/NEWS on emacs-27 instead?
>
> Yes, please.
Done:
; * etc/NEWS.27: Revert last change.
3d2c892114 2021-05-09 14:49:23 +0100
https://git.sv.gnu.org/cgit/emacs.git/commit/?id=3d2c892114ebd35cb10928bb87f991316a0ca55c
; * etc/NEWS: Fix decoded-time-set-defaults typo.
c233f4eccd 2021-05-09 14:46:27 +0100
https://git.sv.gnu.org/cgit/emacs.git/commit/?id=c233f4eccddf09e41441b2a292491b469fd61792
> (I thought you asked about the branch because this could also be
> called out in Emacs 28's NEWS in some way. Sorry for my
> misunderstanding.)
No, it's my fault for not making that clear. Sorry for any issues it
causes.
Thanks,
--
Basil
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#48298:
2021-05-08 16:55 bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil)) Евгений Михайлов
` (2 preceding siblings ...)
2021-05-09 7:30 ` Andreas Schwab
@ 2021-05-11 20:56 ` Евгений Михайлов
2021-05-11 21:37 ` bug#48298: Basil L. Contovounesios
3 siblings, 1 reply; 18+ messages in thread
From: Евгений Михайлов @ 2021-05-11 20:56 UTC (permalink / raw)
To: 48298
[-- Attachment #1: Type: text/plain, Size: 855 bytes --]
вс, 9 мая 2021 г. в 11:54, Basil L. Contovounesios <contovob@tcd.ie>:
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> >> Cc: Евгений Михайлов
> >> <lewwadoo@gmail.com>, 48298@debbugs.gnu.org
> >> Date: Sun, 09 May 2021 09:19:47 +0100
> >>
> >> > I guess the problem is in decoded-time-set-defaults, if anywhere.
> >>
> >> Lars?
> >
> > As the minimum fix, perhaps instead of using zero as the missing year
> > we should use 1970, as zero could not be representable on some
> > systems.
>
> Also 1970 is implied by the function's docstring and announcement.
>
> All tests seem to pass with this:
>
>
> Evgeny, does that fix the error that you see?
>
It does! (encode-time '(0 30 11 1 1 1970 nil -1 nil)) yielded (0 30600).
Thank you guys for your help!
[-- Attachment #2: Type: text/html, Size: 1523 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#48298:
2021-05-11 20:56 ` bug#48298: Евгений Михайлов
@ 2021-05-11 21:37 ` Basil L. Contovounesios
0 siblings, 0 replies; 18+ messages in thread
From: Basil L. Contovounesios @ 2021-05-11 21:37 UTC (permalink / raw)
To: Евгений Михайлов
Cc: 48298-done
tags 48298 - moreinfo
found 48298 27.1
close 48298 28.1
quit
Евгений Михайлов <lewwadoo@gmail.com> writes:
> вс, 9 мая 2021 г. в 11:54, Basil L. Contovounesios <contovob@tcd.ie>:
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> >> Cc: Евгений Михайлов
> >> <lewwadoo@gmail.com>, 48298@debbugs.gnu.org
> >> Date: Sun, 09 May 2021 09:19:47 +0100
> >>
> >> > I guess the problem is in decoded-time-set-defaults, if anywhere.
> >>
> >> Lars?
> >
> > As the minimum fix, perhaps instead of using zero as the missing year
> > we should use 1970, as zero could not be representable on some
> > systems.
>
> Also 1970 is implied by the function's docstring and announcement.
>
> All tests seem to pass with this:
>
> Evgeny, does that fix the error that you see?
>
> It does! (encode-time '(0 30 11 1 1 1970 nil -1 nil)) yielded (0 30600). Thank you guys for your help!
Thanks for confirming. I'm therefore closing this report.
--
Basil
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2021-05-11 21:37 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-08 16:55 bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil)) Евгений Михайлов
2021-05-08 22:37 ` Basil L. Contovounesios
2021-05-09 7:07 ` Eli Zaretskii
2021-05-09 6:46 ` Eli Zaretskii
2021-05-09 8:19 ` Basil L. Contovounesios
2021-05-09 8:27 ` Eli Zaretskii
2021-05-09 8:54 ` Basil L. Contovounesios
2021-05-09 9:52 ` Lars Ingebrigtsen
2021-05-09 10:03 ` Basil L. Contovounesios
2021-05-09 10:09 ` Lars Ingebrigtsen
2021-05-09 11:02 ` Basil L. Contovounesios
2021-05-09 10:35 ` Eli Zaretskii
2021-05-09 10:59 ` Basil L. Contovounesios
2021-05-09 11:49 ` Eli Zaretskii
2021-05-09 13:57 ` Basil L. Contovounesios
2021-05-09 7:30 ` Andreas Schwab
2021-05-11 20:56 ` bug#48298: Евгений Михайлов
2021-05-11 21:37 ` bug#48298: Basil L. Contovounesios
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.