From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dick Newsgroups: gmane.emacs.bugs Subject: bug#51959: 28.0.50; [PATCH] Fallout from 69f1bc43c0 Date: Thu, 18 Nov 2021 18:35:41 -0500 Message-ID: <87mtm1vxyq.fsf@dick> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3225"; mail-complaints-to="usenet@ciao.gmane.io" To: 51959@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 19 00:36:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mnqws-0000cN-PF for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Nov 2021 00:36:10 +0100 Original-Received: from localhost ([::1]:60918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mnqwr-0001Lo-If for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Nov 2021 18:36:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnqwl-0001KX-63 for bug-gnu-emacs@gnu.org; Thu, 18 Nov 2021 18:36:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54084) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mnqwk-0004sD-Sv for bug-gnu-emacs@gnu.org; Thu, 18 Nov 2021 18:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mnqwk-0002Q8-HS for bug-gnu-emacs@gnu.org; Thu, 18 Nov 2021 18:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: dick Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Nov 2021 23:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.16372785519284 (code B ref -1); Thu, 18 Nov 2021 23:36:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Nov 2021 23:35:51 +0000 Original-Received: from localhost ([127.0.0.1]:37397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnqwY-0002Pg-Ub for submit@debbugs.gnu.org; Thu, 18 Nov 2021 18:35:51 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:33784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnqwV-0002PW-3C for submit@debbugs.gnu.org; Thu, 18 Nov 2021 18:35:49 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnqwU-0000wd-Ti for bug-gnu-emacs@gnu.org; Thu, 18 Nov 2021 18:35:46 -0500 Original-Received: from [2607:f8b0:4864:20::72d] (port=46034 helo=mail-qk1-x72d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mnqwS-0004q5-Np for bug-gnu-emacs@gnu.org; Thu, 18 Nov 2021 18:35:46 -0500 Original-Received: by mail-qk1-x72d.google.com with SMTP id d2so8284902qki.12 for ; Thu, 18 Nov 2021 15:35:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version; bh=g83OlUgOsB0s0QuWhHe3dnmpxF9VPujdTiEVp+k3tdo=; b=nmX75bb4LVrWjBZnLxrN6nYx5ydeFhR4CxOyMlcpLagUrf+4q1CsoWTVRFpi/0A8AO 0sNFZXQ8YdUUI4Fs5Pq3i4/eOJ7t7k3XkNWwMocypzqesnYXNQfxYRpi1INqqwY8b2eu MxQCud2r/XYwmVZLtzaxGuysNzjfSkGIVWcnSkhfTJEUVUhmq6I6yOFBFdG4phJJxA5j rKXSo9Ls3WcTNIu99sJMqtxYUyZLavL512zpJZ4cuxppZIx7mmrBW4h/8pl7tBpndxXc /TuwMGuIIGaj7MenEf8kAgu36KaZOhkTuB/kKa/R2J5C1Sns+Ae10NKev7nUSuATAmOn hWIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=g83OlUgOsB0s0QuWhHe3dnmpxF9VPujdTiEVp+k3tdo=; b=DFzyqPF1Azd5VCFMya1goS1t1Bg4EgvSDwUNv5tJtwB16GsdAvA4lIuIo20PMl+yVM UelcDNo+xBiDKDfW6RQnV+mJ0S5pUATO4yeViJft6XJQ19ntX9O7xqefmfgzynTrOu4Q eCmpXPglRamQvJxsquh3gn018XEOgnbLtWP0iaDIea0npo5J2xlSinivIVisqgmiSXzI MdgdyijNKzjZw3bU4GRLEi4OFf1K3/CTI2eB6Ru8ch6z4gf1wlJ6jL1Boc8C1h2grMFD aEbBNbnV4j13ACsWCCpL46CPBvbaJFbv1FLGz/SLV0eLJW/O6RM5pceZrm7w7nlVmUss tF6w== X-Gm-Message-State: AOAM531g4px4Ex7NG65iV+3ZnXLuPtD7SO/QxX/PdMNSIAkvo8sM/06G tzP8819f3V5uySl92uqpZR1x+vecBWs= X-Google-Smtp-Source: ABdhPJxW5T2ewxUlR+8FdpKev024/dAOyU4jyv3x5AS5JVSWZ0hw4S7NtoDZbCg5dMs1QaIv10ZjwA== X-Received: by 2002:ae9:e907:: with SMTP id x7mr24330914qkf.150.1637278542910; Thu, 18 Nov 2021 15:35:42 -0800 (PST) Original-Received: from localhost ([68.237.93.126]) by smtp.gmail.com with ESMTPSA id c24sm847402qkp.43.2021.11.18.15.35.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Nov 2021 15:35:42 -0800 (PST) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::72d (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::72d; envelope-from=dick.r.chiang@gmail.com; helo=mail-qk1-x72d.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:220351 Archived-At: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fallout-from-69f1bc43c0.patch >From f91206e6d6f56fa2ff6dc018d20f441159f80213 Mon Sep 17 00:00:00 2001 From: dickmao Date: Thu, 18 Nov 2021 18:31:37 -0500 Subject: [PATCH] Fallout from 69f1bc43c0 * lisp/calendar/icalendar.el (icalendar--decode-isodatetime): Accommodate TZ string in input. Fragile. * test/lisp/calendar/icalendar-tests.el (icalendar-tests--decode-isodatetime): Apparently, whoever wrote those tests lived in central Europe. --- lisp/calendar/icalendar.el | 14 +++++------ test/infra/gitlab-ci.yml | 7 ++++++ test/lisp/calendar/icalendar-tests.el | 34 +++++++++++++++------------ 3 files changed, 33 insertions(+), 22 deletions(-) diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index 2d31101e50..7a483d4062 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -644,13 +644,13 @@ icalendar--decode-isodatetime ;; seconds present (setq second (read (substring isodatetimestring 13 15)))) ;; FIXME: Support subseconds. - (when (and (> (length isodatetimestring) 15) - ;; UTC specifier present - (char-equal ?Z (aref isodatetimestring 15))) - (setq source-zone t - ;; decode to local time unless result-zone is explicitly given, - ;; i.e. do not decode to UTC, i.e. do not (setq result-zone t) - )) + (when (> (length isodatetimestring) 15) + (cl-case (aref isodatetimestring 15) + (?Z + (setq source-zone t)) + ((?- ?+) + (setq source-zone + (concat "UTC" (substring isodatetimestring 15)))))) ;; shift if necessary (if day-shift (let ((mdy (calendar-gregorian-from-absolute diff --git a/test/infra/gitlab-ci.yml b/test/infra/gitlab-ci.yml index 096a293b30..d8e012d6a9 100644 --- a/test/infra/gitlab-ci.yml +++ b/test/infra/gitlab-ci.yml @@ -241,6 +241,13 @@ test-lisp-inotify: target: emacs-inotify make_params: "-C test check-lisp" +test-lisp-calendar-inotify: + stage: normal + extends: [.job-template, .test-template] + variables: + target: emacs-inotify + make_params: "-C test check-lisp-calendar" + test-lisp-net-inotify: stage: normal extends: [.job-template, .test-template] diff --git a/test/lisp/calendar/icalendar-tests.el b/test/lisp/calendar/icalendar-tests.el index 10b684aacb..1551922028 100644 --- a/test/lisp/calendar/icalendar-tests.el +++ b/test/lisp/calendar/icalendar-tests.el @@ -1635,26 +1635,30 @@ icalendar-test--format (ert-deftest icalendar-tests--decode-isodatetime () "Test `icalendar--decode-isodatetime'." - (should (equal (icalendar-test--format "20040917T050910-0200") - "2004-09-17T03:09:10+0000")) - (should (equal (icalendar-test--format "20040917T050910") + (should (equal (icalendar-test--format "20040917T050910-02:00") "2004-09-17T03:09:10+0000")) + (let ((orig (icalendar-test--format "20040917T050910"))) + (unwind-protect + (progn + (set-time-zone-rule "UTC-02:00") + (should (equal (icalendar-test--format "20040917T050910") + "2004-09-17T03:09:10+0000")) + (should (equal (icalendar-test--format "20040917T0509") + "2004-09-17T03:09:00+0000")) + (should (equal (icalendar-test--format "20040917") + "2004-09-16T22:00:00+0000")) + (should (equal (icalendar-test--format "20040917T050910" 1) + "2004-09-18T03:09:10+0000")) + (should (equal (icalendar-test--format "20040917T050910" 30) + "2004-10-17T03:09:10+0000"))) + (set-time-zone-rule 'wall) ;; (set-time-zone-rule nil) is broken + (should (equal orig (icalendar-test--format "20040917T050910"))))) (should (equal (icalendar-test--format "20040917T050910Z") "2004-09-17T05:09:10+0000")) - (should (equal (icalendar-test--format "20040917T0509") - "2004-09-17T03:09:00+0000")) - (should (equal (icalendar-test--format "20040917") - "2004-09-16T22:00:00+0000")) - (should (equal (icalendar-test--format "20040917T050910" 1) - "2004-09-18T03:09:10+0000")) - (should (equal (icalendar-test--format "20040917T050910" 30) - "2004-10-17T03:09:10+0000")) - (should (equal (icalendar-test--format "20040917T050910" -1) - "2004-09-16T03:09:10+0000")) - + (should (equal (icalendar-test--format "20040917T050910" -1 0) + "2004-09-16T05:09:10+0000")) (should (equal (icalendar-test--format "20040917T050910" nil -3600) "2004-09-17T06:09:10+0000"))) - (provide 'icalendar-tests) ;;; icalendar-tests.el ends here -- 2.26.2 --=-=-= Content-Type: text/plain In Commercial Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.10) of 2021-11-18 built on dick Repository revision: 857bfcf67d29742fc4e48b54a124564692434bd2 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Ubuntu 18.04.4 LTS Configured using: 'configure --prefix=/home/dick/.local --with-tree-sitter --enable-dumping-overwrite 'CFLAGS=-g3 -O2 -I/home/dick/.local/include/' LDFLAGS=-L/home/dick/.local/lib' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON TREE-SITTER LCMS2 LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Ag Minor modes in effect: async-bytecomp-package-mode: t global-git-commit-mode: t shell-dirtrack-mode: t projectile-mode: t flx-ido-mode: t override-global-mode: t global-hl-line-mode: t winner-mode: t tooltip-mode: t show-paren-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /home/dick/gomacro-mode/gomacro-mode hides /home/dick/.emacs.d/elpa/gomacro-mode-20200326.1103/gomacro-mode /home/dick/.emacs.d/elpa/hydra-20170924.2259/lv hides /home/dick/.emacs.d/elpa/lv-20191106.1238/lv /home/dick/.emacs.d/elpa/magit-3.3.0/magit-section-pkg hides /home/dick/.emacs.d/elpa/magit-section-3.3.0/magit-section-pkg /home/dick/org-gcal.el/org-gcal hides /home/dick/.emacs.d/elpa/org-gcal-0.3/org-gcal /home/dick/.emacs.d/lisp/json hides /home/dick/.local/share/emacs/28.0.50/lisp/json /home/dick/.emacs.d/elpa/transient-0.3.6/transient hides /home/dick/.local/share/emacs/28.0.50/lisp/transient /home/dick/.emacs.d/elpa/hierarchy-20171221.1151/hierarchy hides /home/dick/.local/share/emacs/28.0.50/lisp/emacs-lisp/hierarchy Features: (shadow sort footnote mail-extr gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr kinsoku svg dom gnus-group mm-url gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win whitespace emacsbug sendmail benchmark dumb-jump f ag vc-svn find-dired s pulse vc cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs eieio-opt speedbar ezimage dframe shortdoc help-fns radix-tree cl-print edebug backtrace icalendar diary-lib diary-loaddefs cal-menu calendar cal-loaddefs tramp-archive tramp-gvfs tramp-cache zeroconf dbus xml tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat parse-time iso8601 ls-lisp vc-git vc-dispatcher find-func bug-reference misearch multi-isearch magit-extras mule-util face-remap magit-patch-changelog magit-patch magit-submodule magit-obsolete magit-popup async-bytecomp async magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode diff diff-mode git-commit log-edit message yank-media rmc puny dired-x dired dired-loaddefs rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader pcvs-util add-log magit-core magit-margin magit-transient magit-process with-editor shell pcomplete server magit-mode transient format-spec paredit-ext paredit subed subed-vtt subed-srt subed-common subed-mpv subed-debug subed-config inf-ruby ruby-mode smie company pcase haskell-interactive-mode haskell-presentation-mode haskell-process haskell-session haskell-compile haskell-mode haskell-cabal haskell-utils haskell-font-lock haskell-indentation haskell-string haskell-sort-imports haskell-lexeme haskell-align-imports haskell-complete-module haskell-ghc-support noutline outline flymake-proc flymake warnings etags fileloop generator xref project dabbrev haskell-customize hydra lv use-package-ensure solarized-theme solarized-definitions projectile lisp-mnt mail-parse rfc2231 ibuf-ext ibuffer ibuffer-loaddefs thingatpt magit-autorevert autorevert filenotify magit-git magit-section magit-utils crm dash rx grep compile comint ansi-color gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils text-property-search time-date flx-ido flx google-translate-default-ui google-translate-core-ui facemenu color ido google-translate-core google-translate-tk google-translate-backend use-package-bind-key bind-key auto-complete easy-mmode advice edmacro kmacro popup cus-edit pp cus-load wid-edit emms-player-mplayer emms-player-simple emms emms-compat cl-extra use-package-core derived hl-line winner ring help-mode finder-inf json-reformat-autoloads json-snatcher-autoloads sml-mode-autoloads tornado-template-mode-autoloads info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq gv subr-x byte-opt bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tree-sitter tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax 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 emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 746046 74703) (symbols 48 37026 4) (strings 32 144360 9896) (string-bytes 1 4744547) (vectors 16 98627) (vector-slots 8 2528293 96955) (floats 8 567 2625) (intervals 56 14825 3795) (buffers 992 27)) --=-=-=--