From unknown Sat Aug 09 13:23:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64023: 29.0.91; gnus-icalendar does not update timestamp when description is empty Resent-From: Reindert-Jan Ekker Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Jun 2023 16:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 64023@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168658616630170 (code B ref -1); Mon, 12 Jun 2023 16:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Jun 2023 16:09:26 +0000 Received: from localhost ([127.0.0.1]:40409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q8k6e-0007qR-64 for submit@debbugs.gnu.org; Mon, 12 Jun 2023 12:09:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:49934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q8jyO-0007du-GK for submit@debbugs.gnu.org; Mon, 12 Jun 2023 12:00:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q8jyC-0003BY-96 for bug-gnu-emacs@gnu.org; Mon, 12 Jun 2023 12:00:41 -0400 Received: from outbound8.mail.transip.nl ([2a01:7c8:7c9:ca11:136:144:136:8]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q8jy5-00012H-FI for bug-gnu-emacs@gnu.org; Mon, 12 Jun 2023 12:00:39 -0400 Received: from submission1.mail.transip.nl (unknown [10.100.4.70]) by outbound8.mail.transip.nl (Postfix) with ESMTP id 4QfxGl0CRMzY76LB for ; Mon, 12 Jun 2023 18:00:15 +0200 (CEST) Received: from www.codesensei.nl (unknown [IPv6:2a01:7c8:bb02:73:5054:ff:fe0b:4b1]) by submission1.mail.transip.nl (Postfix) with ESMTPSA id 4QfxGj6Nwyz1nsSh for ; Mon, 12 Jun 2023 18:00:13 +0200 (CEST) Received: from [24.132.50.73] (helo=CodeSensei-Mac-mini.local) by www.codesensei.nl with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q8kHp-000558-JZ for bug-gnu-emacs@gnu.org; Mon, 12 Jun 2023 18:20:57 +0200 User-agent: mu4e 1.10.3; emacs 29.0.91 From: Reindert-Jan Ekker Date: Mon, 12 Jun 2023 17:48:27 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: ClueGetter at submission1.mail.transip.nl DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=transip-a; d=codesensei.nl; t=1686585613; h=from:subject:to:date: mime-version:content-type; bh=2GWTdFtGRl1GgxusCyP7eTooFG3niAT24pGTbrMnSQI=; b=aKmLfGq3IozwvXemIaYG2dU7txeoczcGZqnvlzMCZlarFwe1JzH4PqPPl2iJ24X2uF5bS9 S0VTeSqs2HnG0VpMmkRkHE+yOoqiE36srLJunhWl6hg52Fce3j7iEIu4ouCnS0VN4lmnVj aPAQt+qaXGWu9QJCFHIpX2hWCaVl8qetE6Rnc6NRZCjo5vpSbRry/xuVgl1D2ugevjm6or jbqFDoOMNeRJa/cdFX/nhTj6UpAjj1VygBizXcakPB2/72mkpMzB0CW9d2lDH3sTln2cGF jwW52gWVJ37qvV4ofQaCn6LwHhJ/DobXUAmIjJ164f+KcE4Blbrd21hhQ7KJ3A== X-Report-Abuse-To: abuse@transip.nl Received-SPF: pass client-ip=2a01:7c8:7c9:ca11:136:144:136:8; envelope-from=info@codesensei.nl; helo=outbound8.mail.transip.nl X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Mailman-Approved-At: Mon, 12 Jun 2023 12:09:20 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) I use mu4e for my email and org-mode for managing my calendar. When I accept a calendar invitation that has *no description* using gnus-icalendar, and later I receive an update for that invitation, the code that updates the corresponding org element will remove the timestamp completely. This is quite common for invitations from e.g. thunderbird, that have only a summary but where the description field has been left empty. To show this in action we would need a complete mu4e and gnus-icalendar setup, but we can recreate the effect as follows: we have an org file in "~/test.org" containing an event exported from an icalendar invitation: ----- contents of test.org ----- * Test :PROPERTIES: :ICAL_EVENT: t :ID: xxx-11-yyy :ORGANIZER: Me :LOCATION: :PARTICIPATION_TYPE: non-participant :REQ_PARTICIPANTS: :OPT_PARTICIPANTS: :RRULE: :REPLY: Not replied yet :END: <2023-08-01 01:00-01:00> ----- end of test.org ----- We can now call the function to update this event to a new date as follows (this works with emacs -Q): (require 'gnus-icalendar) (let ((ev (gnus-icalendar-event :organizer "Me" :summary "Test" :start-time (encode-time '(0 0 0 1 9 2023 nil nil nil)) :end-time (encode-time '(0 0 0 1 9 2023 nil nil nil)) :uid "xxx-11-yyy" :recur nil :description nil))) (gnus-icalendar--update-org-event ev nil (list (expand-file-name "~/test.org")))) This results in the following: ----- new contents of test.org ----- * [#C] Test () :PROPERTIES: :ICAL_EVENT: t :ID: xxx-11-yyy :ORGANIZER: Me :PARTICIPATION_TYPE: non-participant :REPLY: Not replied yet :END: ----- end of test.org ----- Note how the timestamp has not been updated but completely erased. This is because in gnus-icalendar--update-org-event, the code for updating the timestamp is inside "(when description ...)", causing it to only be run when the description is not empty. ----- In GNU Emacs 29.0.91 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.6.5 (Build 21G531)) of 2023-05-31 built on CodeSensei-Mac-mini.local Windowing system distributor 'Apple', version 10.3.2299 System Description: macOS 13.4 Configured using: 'configure --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp --infodir=/opt/homebrew/Cellar/emacs-plus@29/29.0.90/share/info/emacs --prefix=/opt/homebrew/Cellar/emacs-plus@29/29.0.90 --with-xml2 --with-gnutls --without-compress-install --without-dbus --without-imagemagick --with-modules --with-rsvg --with-ns --disable-ns-self-contained 'CFLAGS=-Os -w -pipe -mmacosx-version-min=12 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT' 'CPPFLAGS=-I/opt/homebrew/opt/icu4c/include -I/opt/homebrew/opt/openssl@1.1/include -isystem/opt/homebrew/include -F/opt/homebrew/Frameworks -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk' 'LDFLAGS=-L/opt/homebrew/opt/icu4c/lib -L/opt/homebrew/opt/openssl@1.1/lib -L/opt/homebrew/lib -F/opt/homebrew/Frameworks -Wl,-headerpad_max_install_names -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk'' Configured features: ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB Important settings: value of $LC_ALL: en_US.UTF-8 value of $LC_CTYPE: UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: elisp Minor modes in effect: windmove-mode: t csv-field-index-mode: t global-diff-hl-mode: t diff-hl-mode: t global-anzu-mode: t anzu-mode: t volatile-highlights-mode: t simple-modeline-mode: t winner-mode: t burly-tabs-mode: t rainbow-delimiters-mode: t global-flycheck-mode: t flycheck-mode: t global-company-mode: t company-mode: t marginalia-mode: t vertico-buffer-mode: t vertico-mode: t dimmer-mode: t global-hl-line-mode: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-strict-mode: t smartparens-mode: t global-undo-tree-mode: t undo-tree-mode: t super-save-mode: t recentf-mode: t savehist-mode: t save-place-mode: t override-global-mode: t magit-wip-initial-backup-mode: t magit-wip-before-change-mode: t magit-wip-after-apply-mode: t magit-wip-after-save-mode: t magit-wip-mode: t global-git-commit-mode: t magit-auto-revert-mode: t shell-dirtrack-mode: t server-mode: t global-auto-revert-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /Users/reindert/.emacs.d/elpa/transient-20221127.2242/transient hides /opt/homebrew/Cellar/emacs-plus@29/29.0.90/share/emacs/29.0.91/lisp/transient ~/.emacs.d/rje/custom hides /opt/homebrew/Cellar/emacs-plus@29/29.0.90/share/emacs/29.0.91/lisp/custom /Users/reindert/.emacs.d/elpa/use-package-20221127.2217/use-package-jump hides /opt/homebrew/Cellar/emacs-plus@29/29.0.90/share/emacs/29.0.91/lisp/use-package/use-package-jump /Users/reindert/.emacs.d/elpa/use-package-20221127.2217/use-package-diminish hides /opt/homebrew/Cellar/emacs-plus@29/29.0.90/share/emacs/29.0.91/lisp/use-package/use-package-diminish /Users/reindert/.emacs.d/elpa/use-package-20221127.2217/use-package hides /opt/homebrew/Cellar/emacs-plus@29/29.0.90/share/emacs/29.0.91/lisp/use-package/use-package /Users/reindert/.emacs.d/elpa/use-package-20221127.2217/use-package-delight hides /opt/homebrew/Cellar/emacs-plus@29/29.0.90/share/emacs/29.0.91/lisp/use-package/use-package-delight /Users/reindert/.emacs.d/elpa/use-package-20221127.2217/use-package-lint hides /opt/homebrew/Cellar/emacs-plus@29/29.0.90/share/emacs/29.0.91/lisp/use-package/use-package-lint /Users/reindert/.emacs.d/elpa/bind-key-20221117.1610/bind-key hides /opt/homebrew/Cellar/emacs-plus@29/29.0.90/share/emacs/29.0.91/lisp/use-package/bind-key /Users/reindert/.emacs.d/elpa/use-package-20221127.2217/use-package-core hides /opt/homebrew/Cellar/emacs-plus@29/29.0.90/share/emacs/29.0.91/lisp/use-package/use-package-core /Users/reindert/.emacs.d/elpa/use-package-20221127.2217/use-package-ensure hides /opt/homebrew/Cellar/emacs-plus@29/29.0.90/share/emacs/29.0.91/lisp/use-package/use-package-ensure /Users/reindert/.emacs.d/elpa/use-package-20221127.2217/use-package-bind-key hides /opt/homebrew/Cellar/emacs-plus@29/29.0.90/share/emacs/29.0.91/lisp/use-package/use-package-bind-key Features: (shadow so-long view emacsbug windmove cl-print debug backtrace pulse consult-xref help-fns radix-tree hippie-exp ace-window avy csv-mode sort oc-basic bibtex ol-w3m org-inlinetask ol-info ol-eww eww url-queue mm-url ol-doi org-link-doi ol-docview doc-view jka-compr image-mode exif org-ctags dired-aux vc-hg vc-git vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs diff-hl-dired embark-consult consult-vertico consult compat-28 vertico-directory cursor-sensor warnings rje-ical-export rje-looks diff-hl log-view vc-dir ewoc vc vc-dispatcher anzu etags fileloop xref volatile-highlights whitespace simple-modeline simple-modeline-segments simple-modeline-core rje-windows winner rje-keys rje-tab-bar burly-tabs burly frameset move-text rje-dired dired-x rje-programming rainbow-delimiters flycheck embark ffap hl-todo rje-project eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util rje-vterm rje-company company-oddmuse company-keywords company-dabbrev-code company-dabbrev company-files company-capf company-cmake company rje-pass password-store auth-source-pass rje-agenda mu4e-icalendar gnus-icalendar icalendar diary-lib diary-loaddefs org-capture rje-vertico-embark marginalia orderless vertico-buffer vertico rje-theme dimmer color rje-mail mixed-pitch face-remap cus-edit mu4e mu4e-org mu4e-notification mu4e-main mu4e-view gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader range mu4e-headers mu4e-compose mu4e-draft mu4e-actions smtpmail mu4e-search mu4e-lists mu4e-bookmarks mu4e-mark mu4e-message shr pixel-fill kinsoku url-file svg dom flow-fill hl-line mu4e-contacts mu4e-update mu4e-folders mu4e-context mu4e-query-items mu4e-server mu4e-modeline mu4e-vars mu4e-helpers mu4e-config mu4e-window ido mu4e-obsolete f f-shortdoc shortdoc rje-edit zop-to-char sudo-edit smartparens-config smartparens-org smartparens-text smartparens-python smartparens advice thingatpt rje-org-sync rje-notify s notifications dbus xml rje-org imenu-list hideshow ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda ox-html table ox-ascii ox-publish ox org-element org-persist xdg avl-tree generator yasnippet org-journal org-crypt cal-iso org-tempo tempo rje-savefiles tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat parse-time iso8601 ls-lisp nsm undo-tree queue super-save recentf tree-widget wid-edit bookmark pp savehist org-id org-refile org org-macro org-pcomplete org-list org-footnote org-faces org-entities noutline outline icons ob-clojure ob-emacs-lisp ob-plantuml ob-ditaa ob-python python project pcase treesit ob-shell ob ob-tangle org-src ob-ref ob-lob ob-table ob-exp ob-comint ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs find-func cal-menu calendar cal-loaddefs org-compat org-version org-macs saveplace use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key use-package-core rje-packages finder-inf epl rje-vars magit-wip magit-log which-func imenu magit-diff smerge-mode diff diff-mode easy-mmode git-commit log-edit message sendmail yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log magit-core magit-autorevert magit-margin magit-transient magit-process with-editor shell pcomplete comint ansi-osc ring server ansi-color magit-mode transient cl-extra edmacro kmacro help-mode magit-git magit-base magit-section format-spec crm dash compat-27 compat-26 compat compat-macs autorevert filenotify delsel cus-load pyvenv-auto-autoloads pyvenv-autoloads org-ai-autoloads rx info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe 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 nadvice seq simple cl-generic indonesian philippine 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 abbrev obarray oclosure cl-preloaded button loaddefs theme-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 kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 530456 111783) (symbols 48 43929 20) (strings 32 161589 6958) (string-bytes 1 5371169) (vectors 16 91381) (vector-slots 8 1399605 44059) (floats 8 673 442) (intervals 56 11004 1871) (buffers 984 26)) -- Reindert-Jan Ekker Code Sensei From unknown Sat Aug 09 13:23:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64023: 29.0.91; gnus-icalendar does not update timestamp when description is empty Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Jun 2023 16:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Reindert-Jan Ekker Cc: 64023@debbugs.gnu.org Received: via spool by 64023-submit@debbugs.gnu.org id=B64023.168658691731377 (code B ref 64023); Mon, 12 Jun 2023 16:22:02 +0000 Received: (at 64023) by debbugs.gnu.org; 12 Jun 2023 16:21:57 +0000 Received: from localhost ([127.0.0.1]:40428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q8kIn-0008A1-8v for submit@debbugs.gnu.org; Mon, 12 Jun 2023 12:21:57 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:47339) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q8kIk-00089o-OE for 64023@debbugs.gnu.org; Mon, 12 Jun 2023 12:21:56 -0400 Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-3f732d37d7cso46092665e9.2 for <64023@debbugs.gnu.org>; Mon, 12 Jun 2023 09:21:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686586908; x=1689178908; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=QUkgMVjDVjeSc1Nh2eX2DILg+5tsgz0ydnwnWpKrAbg=; b=bdQjtLq2o2TtTtB9cgies8HcNgjiY6ZigiDWVyqirXzF61TmxH+p4COKGty7f+KIUz yLJNDMZoR4oy7Lwbc7D9PxeJvsCGmAzc5q46vMnFu685BghAalumMHtF567+NVmdtwv/ s+GrgQ3Dwqz6lQIZ2w0yrm1JkVYX/sAjQHUgv+RLcCWZJfabWCXdj8A8h24t6/JQ+feM Vj/LJNjVtcWzQyol608QTOR5ZQL50hVf0uRXSBCY23QKb9xwjbjqUZsW8/KKCUYpRXib 0mEN2qq3bGkP3nySDsTUa+9AAPMVbdd2m8tdREDpagVHGvsg2I6tCAZUS+wKB5w+tVqZ 6dkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686586908; x=1689178908; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QUkgMVjDVjeSc1Nh2eX2DILg+5tsgz0ydnwnWpKrAbg=; b=CRYQYhKQ4JnFDvVj8Rno6PuhBlOmeHlUCbXo8hWgtdy6MNv1/Q3BWG0KOuEF8Pm3zu rHAZRfBtIO3cMun/hjFXcp5IkvrDgqBv8GPE0D669La9v5Hbow3TDQ9TbqsiS9Zj2nZL YYPAlGwtRll9jcZWE9AtcpwzLwqtTanf7l1Gq96dR7FIrmMy+E8u3tPzu4igNB9Tx7Ft h+UjowePb9taxL0DMIyJHfRGFkxA+CSrp5C97XsWLX4ysE5vm7pXQWZyNFwbXs8syBiE l5KOix4mJGRxng4pX1ITD83MTeHm7DRNWXIB7gBWunAtepN/nXsmlEqguN3xMy+hIrDf b3pw== X-Gm-Message-State: AC+VfDyxitl+HTdp7oHvNgmDtcpdKx6CB2LU8fWAZJnDD/U2c9ulK0zP kgbFBWklJ2Sydra7HMAmsz2NGdkmJMQ= X-Google-Smtp-Source: ACHHUZ6kDv/ea0ZKABchKVJo6mZXFlQOGo+d4J2KbTmDwML54jAglVtLUahHrwSYLj7Gj/w8R0cVmw== X-Received: by 2002:a05:600c:a39f:b0:3f8:1b81:9e96 with SMTP id hn31-20020a05600ca39f00b003f81b819e96mr2530222wmb.30.1686586908197; Mon, 12 Jun 2023 09:21:48 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id x19-20020a1c7c13000000b003f7aad8c160sm11827815wmc.11.2023.06.12.09.21.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 09:21:47 -0700 (PDT) From: Robert Pluim In-Reply-To: (Reindert-Jan Ekker's message of "Mon, 12 Jun 2023 17:48:27 +0200") References: Date: Mon, 12 Jun 2023 18:21:46 +0200 Message-ID: <87jzw8hcrp.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Mon, 12 Jun 2023 17:48:27 +0200, Reindert-Jan Ekker said: Reindert-Jan> This is because in gnus-icalendar--update-org-event, the = code for Reindert-Jan> updating the timestamp is inside "(when description ...)"= , causing it to Reindert-Jan> only be run when the description is not empty. I was sure I=CA=BCd fixed this already, but that was in `gnus-icalendar-eve= nt->org-entry', not `gnus-icalendar--update-org-event' How does this work for you: diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index 0d776cd1bca..542e2a621a0 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -642,16 +642,16 @@ gnus-icalendar--update-org-event (delete-region (point) entry-end)) =20 ;; put new event description in the entry body - (when description - (save-restriction - (narrow-to-region (point) (point)) - (insert "\n" - (gnus-icalendar-event:org-timestamp event) - "\n\n" - (replace-regexp-in-string "[\n]+$" "\n" descri= ption) - "\n") - (indent-region (point-min) (point-max) (1+ entry-outli= ne-level)) - (fill-region (point-min) (point-max)))) + (save-restriction + (narrow-to-region (point) (point)) + (insert "\n" + (gnus-icalendar-event:org-timestamp event) + "\n\n" + (replace-regexp-in-string "[\n]+$" "\n" + (or description "No de= scription")) + "\n") + (indent-region (point-min) (point-max) (1+ entry-outline= -level)) + (fill-region (point-min) (point-max))) =20 ;; update entry properties (cl-labels Robert --=20 From unknown Sat Aug 09 13:23:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64023: 29.0.91; gnus-icalendar does not update timestamp when description is empty Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Jun 2023 10:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Reindert-Jan Ekker Cc: 64023@debbugs.gnu.org Received: via spool by 64023-submit@debbugs.gnu.org id=B64023.168665371625865 (code B ref 64023); Tue, 13 Jun 2023 10:56:02 +0000 Received: (at 64023) by debbugs.gnu.org; 13 Jun 2023 10:55:16 +0000 Received: from localhost ([127.0.0.1]:41435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q91gB-0006j6-Tk for submit@debbugs.gnu.org; Tue, 13 Jun 2023 06:55:16 -0400 Received: from mail-wm1-f54.google.com ([209.85.128.54]:58869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q91g7-0006io-9W for 64023@debbugs.gnu.org; Tue, 13 Jun 2023 06:55:14 -0400 Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-3f8d258f203so2606515e9.1 for <64023@debbugs.gnu.org>; Tue, 13 Jun 2023 03:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686653703; x=1689245703; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=UG7L0KjTG/ToU7pVE8uYKwIrR7DDWoVIFILDbWVKV5g=; b=NWdT8mExYU623InPSJCDJCZSV2Esp3XrYOTUEBZ2BAEvlujbMuszHU5W2eoVtjX4Oa nOtvX2cADOBL7HQpLn4WiYIR1yETwoqussR+1kLWz002w8OWCGDh4E+ib79Z7H74syMg dglHgsMp0i4Yp3VxKhTgHCI83uQocYwpp5KZ8Vx9wyJirSqRT5HYvxlW27afj2v8tZ6Z X63IY4FP70Rj1/8owVY7YNWx1cg2xQSFFrK2P4ytww5AiBZfht0dJceAz9BpyQrB6iC5 Jb0PSoOJlrBG/JCDUEs8IBybB2o9R7ThEDmGv+ptbu8TdbofMoyUAALCQioU0DrQnwjL TxnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686653703; x=1689245703; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UG7L0KjTG/ToU7pVE8uYKwIrR7DDWoVIFILDbWVKV5g=; b=eOUhkcaPqgzap0nOUfA1s/gMRdxMqJPjoyOokdvh2DUSp9JbsVZVpPGPlfhQUKxQFX F5m4TxI70hdQGWgDeyWUGVI4hhb0fTK0EGKlcnVbqWN0EB3D8MP9pYoQDJ+gCzWXmOmw 5E856xFcBj5zTW0LSbtV55Uye8Jqq9/2ZzKf8lwOwAWFuaXLmjAU0UzsW4Wb5eZ57cwu JsQUGM6pEy9QD++fMmso2Z74wuvoeIXc4I2FzQSvyUPiXWFjf0MKk+WjxuMicBKToWMU I3AV0x1QVr+8UNOyfxQH/iFHa6ESDkx2xKdek9DN25J8AhieY74Gxa/uzrK5qdwzJyUB qbGg== X-Gm-Message-State: AC+VfDwUcyqUFvmRAYA4qHxtuD8cocCDz97RtcfxRV8iB7CNrMy2sp0L O2O52iNKfqGBGEFsDDS1LpbAFa3xTUk= X-Google-Smtp-Source: ACHHUZ4VRm//xPMUAUBWzpVKiBWtYj67KExUg0QWzc/+uUPxSjVLidmzXksJQsa8qPjYYbIr5MTgtA== X-Received: by 2002:ac2:4da1:0:b0:4f2:579d:6867 with SMTP id h1-20020ac24da1000000b004f2579d6867mr5621228lfe.20.1686653301274; Tue, 13 Jun 2023 03:48:21 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id y23-20020a1c4b17000000b003f736735424sm13940382wma.43.2023.06.13.03.48.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 03:48:20 -0700 (PDT) From: Robert Pluim In-Reply-To: (Reindert-Jan Ekker's message of "Mon, 12 Jun 2023 20:16:30 +0200") References: <87jzw8hcrp.fsf@gmail.com> Date: Tue, 13 Jun 2023 12:48:20 +0200 Message-ID: <87bkhjhc3v.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) (please keep the bug address in CC) >>>>> On Mon, 12 Jun 2023 20:16:30 +0200, Reindert-Jan Ekker said: Reindert-Jan> Yes, that works! OK. Eli, emacs-29 or master? It=CA=BCs a pretty small change, but it=CA=BCs= not a regression as such. Reindert-Jan> By the way, what is the intended behaviour of Reindert-Jan> gnus-icalendar--cancel-org-event? It seems to search for = a property "DT" Reindert-Jan> that does not exist (at least in my files), so it does no= t change the Reindert-Jan> event. Is this a bug or am I missing some configuration s= omewhere? It looks like a bug. I can=CA=BCt find any code creating such a property, the current code inserts the timestamp in the body of the org entry. Robert --=20 From unknown Sat Aug 09 13:23:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64023: 29.0.91; gnus-icalendar does not update timestamp when description is empty Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Jun 2023 11:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Robert Pluim Cc: 64023@debbugs.gnu.org, info@codesensei.nl Received: via spool by 64023-submit@debbugs.gnu.org id=B64023.168665543628870 (code B ref 64023); Tue, 13 Jun 2023 11:24:02 +0000 Received: (at 64023) by debbugs.gnu.org; 13 Jun 2023 11:23:56 +0000 Received: from localhost ([127.0.0.1]:41472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q927v-0007Va-SF for submit@debbugs.gnu.org; Tue, 13 Jun 2023 07:23:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q927u-0007VI-E7 for 64023@debbugs.gnu.org; Tue, 13 Jun 2023 07:23:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q927k-00073S-BH; Tue, 13 Jun 2023 07:23:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=PtWU5D8oK8MyrFMeAKUdAdNxS/zlYEHl6ZDj8aNcXe8=; b=PIu7u3R3q7sIib8tJ6hB hSzXfJGHCvcamR2L5/bvdjCHfQllOtiKHxIL/ig5kc+RESHDBUxWSJCWz1hdO0rpcTgtqevTURDcR aMQctemdfjwTzyb5DTwv3RrG9wFx2H1069oPC/p5+JUr+Aeq0xVxVfSDBhVKN7f+6yZkUlBnsD3YH Am0u/30p++6EEpDw0XMjIPErd/ShMlx+B2Q/gKHA9ac7shZOi8CLnjAvdk7w1DRIllKUWvXlL6IUa BlmAs6CP0VojhsWYqzQnqdrDZYosz2MQLCqE9b/HT61MVoSoeT2bA0pcT1Fp+PX9N2MxCzcEMSf3T G6w6qI6i70XZJA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q927j-0001vC-Rn; Tue, 13 Jun 2023 07:23:44 -0400 Date: Tue, 13 Jun 2023 14:24:01 +0300 Message-Id: <83ilbrwqpa.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87bkhjhc3v.fsf@gmail.com> (message from Robert Pluim on Tue, 13 Jun 2023 12:48:20 +0200) References: <87jzw8hcrp.fsf@gmail.com> <87bkhjhc3v.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 64023@debbugs.gnu.org > From: Robert Pluim > Date: Tue, 13 Jun 2023 12:48:20 +0200 > > >>>>> On Mon, 12 Jun 2023 20:16:30 +0200, Reindert-Jan Ekker said: > > Reindert-Jan> Yes, that works! > > OK. Eli, emacs-29 or master? Itʼs a pretty small change, but itʼs not > a regression as such. Master, please. From unknown Sat Aug 09 13:23:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64023: 29.0.91; gnus-icalendar does not update timestamp when description is empty Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Jun 2023 12:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 64023@debbugs.gnu.org, info@codesensei.nl Received: via spool by 64023-submit@debbugs.gnu.org id=B64023.168666033514403 (code B ref 64023); Tue, 13 Jun 2023 12:46:02 +0000 Received: (at 64023) by debbugs.gnu.org; 13 Jun 2023 12:45:35 +0000 Received: from localhost ([127.0.0.1]:41536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q93Ox-0003kA-GO for submit@debbugs.gnu.org; Tue, 13 Jun 2023 08:45:35 -0400 Received: from mail-wr1-f48.google.com ([209.85.221.48]:61860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q93Ov-0003jq-0w; Tue, 13 Jun 2023 08:45:33 -0400 Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-30af159b433so5241475f8f.3; Tue, 13 Jun 2023 05:45:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686660327; x=1689252327; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4gGkbcL6Yf7oSXiqmVo68I2cD8wJ17gIsr1LzPXObBQ=; b=WjS3AxeTkVXpJ3KtAG0zW+vbCyDsxIRlyfeEJppA8E8oH62yYQDNObc8FeegPdjHmb 1TytFi6omrGSqiDRmBAUjQ31CbWob5COcASQF1obYdpljEJ62I6RfRdbJ2+Wjwx41BU3 MiRpvwd+lH7XU8G8dr/i9czz/BM3FrvYP8sWRcm1KaWs/oxMsxFrdh21gYUAzvU1yq2N ERgYL7OByYedGaVN12Hwwr96QKsZ1J+Wxtv51hnYcu5wv5unOgiyzGXi5T5JcFj1Vou+ +pU6A1IHRj4kulgRNIhFy+2jeu4ezWSHGLghUphWznHLdl4ZX4RFJZyw+Q33hyMoDfRt jI+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686660327; x=1689252327; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4gGkbcL6Yf7oSXiqmVo68I2cD8wJ17gIsr1LzPXObBQ=; b=bJkE81VvXs2tDYLskISjgzTC8wiqfFexf9+/HJxEhcE+/XtacX5mI6K2K+w1ZzWzWI gFsxOlI68xAxi1GGu2TprOQwL6PaqVVA6183HM7EoAaCdC/f7jCr9LWmtHg58Vnwe7A/ qck8XtJ4m6wxeUTL+d9LQUlps1wW5/S4y0fGSJivjrZzhBipmDNDIxfgNAzKINbkz46p neaRkwQX1FvnflQP3pReCX/773kA+m0/AXf8n/ne4klsADzhBHcYtRTacuGKwUfYsltt 7LrhZ1aOnoLGhZR/uDesVAUV71CiCeFwmYju3NIJk3WBoqqmN+eNMYr3rieLAZNqC1a7 WZKA== X-Gm-Message-State: AC+VfDzM7TPrALN5VIsPunoqMacWIltvUpnT6R/PbbiBSMCub93H6EMe APYcdwUxEV4ajZOfaheGlaEFzhJs7Rk= X-Google-Smtp-Source: ACHHUZ75sWfhx/wVRdue4O7ZtHTq9GUhm0YBYChWH0qhiX9Nn8oOG4k2/I+TbOwHRUWvHloJRON6ow== X-Received: by 2002:adf:dd41:0:b0:30f:c4e2:fc57 with SMTP id u1-20020adfdd41000000b0030fc4e2fc57mr4290339wrm.31.1686660326534; Tue, 13 Jun 2023 05:45:26 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id cr4-20020a05600004e400b003063a92bbf5sm15396915wrb.70.2023.06.13.05.45.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 05:45:26 -0700 (PDT) From: Robert Pluim In-Reply-To: <83ilbrwqpa.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 13 Jun 2023 14:24:01 +0300") References: <87jzw8hcrp.fsf@gmail.com> <87bkhjhc3v.fsf@gmail.com> <83ilbrwqpa.fsf@gnu.org> Date: Tue, 13 Jun 2023 14:45:25 +0200 Message-ID: <877cs7h6oq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 64023 fixed close 64023 30.1 quit >>>>> On Tue, 13 Jun 2023 14:24:01 +0300, Eli Zaretskii said: >> Cc: 64023@debbugs.gnu.org >> From: Robert Pluim >> Date: Tue, 13 Jun 2023 12:48:20 +0200 >>=20 >> >>>>> On Mon, 12 Jun 2023 20:16:30 +0200, Reindert-Jan Ekker said: >>=20 Reindert-Jan> Yes, that works! >>=20 >> OK. Eli, emacs-29 or master? It=CA=BCs a pretty small change, but it= =CA=BCs not >> a regression as such. Eli> Master, please. Closing. Committed as daf7902ed9d Robert --=20 From unknown Sat Aug 09 13:23:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64023: 29.0.91; gnus-icalendar does not update timestamp when description is empty Resent-From: Reindert-Jan Ekker Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Jun 2023 08:23:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Robert Pluim Cc: 64023@debbugs.gnu.org Received: via spool by 64023-submit@debbugs.gnu.org id=B64023.16869901371277 (code B ref 64023); Sat, 17 Jun 2023 08:23:07 +0000 Received: (at 64023) by debbugs.gnu.org; 17 Jun 2023 08:22:17 +0000 Received: from localhost ([127.0.0.1]:50831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qARCJ-0000KU-Gb for submit@debbugs.gnu.org; Sat, 17 Jun 2023 04:22:17 -0400 Received: from outbound5.mail.transip.nl ([136.144.136.9]:33486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAEX3-0001Sp-Ic for 64023@debbugs.gnu.org; Fri, 16 Jun 2023 14:50:52 -0400 Received: from submission6.mail.transip.nl (unknown [10.103.8.157]) by outbound5.mail.transip.nl (Postfix) with ESMTP id 4QjSsg2XP7zHNBn; Fri, 16 Jun 2023 20:50:47 +0200 (CEST) Received: from www.codesensei.nl (unknown [IPv6:2a01:7c8:bb02:73:5054:ff:fe0b:4b1]) by submission6.mail.transip.nl (Postfix) with ESMTPSA id 4QjSsf1WC7z12LWg; Fri, 16 Jun 2023 20:50:46 +0200 (CEST) Received: from [24.132.50.73] (helo=CodeSensei-MacBook-Air.local) by www.codesensei.nl with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qAEr2-0004Ud-3H; Fri, 16 Jun 2023 21:11:28 +0200 References: <87jzw8hcrp.fsf@gmail.com> <87bkhjhc3v.fsf@gmail.com> User-agent: mu4e 1.10.3; emacs 29.0.90 From: Reindert-Jan Ekker Date: Fri, 16 Jun 2023 20:45:48 +0200 In-reply-to: <87bkhjhc3v.fsf@gmail.com> Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Scanned-By: ClueGetter at submission6.mail.transip.nl DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=transip-a; d=codesensei.nl; t=1686941446; h=from:subject:to:cc: references:in-reply-to:date:mime-version:content-type; bh=0cIuziEpDGI+ew1RYsR/SmCMIEUUhtcKBFXAc0ISCnY=; b=ThS6KhabmjO48a0EV1poTtCZY8Fk64gGzRSG5AF5HpbYQ4S/YAnt4JwUJSrN7DtMNiQwz6 uqY/heF9qOGdLYb4GwEpVXB7GYLt3TASs0M8PtYvIDsqxVxVcHSYwKQZLXJlbL6Zs1A1MV huLldaGVHCYGCrgrFlESQnrSU/2nPBb30J50nb1Z9P6gdlE7dTy24hmGec/vGGzcQEojUe NtttT8Nj2ef4aRx2bIjahG9M/kBH3AK+g3g9VIHtXw2hyZnRF5oOLrhTlQIyDs7MhwZEGP g2SVuNdXm4xLc/QK5RxrEeZs1uzb0y0T///bVSmFT1niEZ7jWhmTbB3Lepxc6g== X-Report-Abuse-To: abuse@transip.nl X-Spam-Score: -0.7 (/) X-Mailman-Approved-At: Sat, 17 Jun 2023 04:22:13 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain As a little exercise I've been writing some unit tests for the bug you fixed regarding updates to events with empty description. Patch is attached. Looking forward to any feedback. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-test-lisp-gnus-gnus-icalendar-tests.el-Add-tests-for.patch Content-Description: Patch: unit tests >From 67859adc32616c2251f507b89010968cc9246034 Mon Sep 17 00:00:00 2001 From: reindert Date: Fri, 16 Jun 2023 20:39:00 +0200 Subject: [PATCH] ; * test/lisp/gnus/gnus-icalendar-tests.el: Add tests for Bug#64023 --- test/lisp/gnus/gnus-icalendar-tests.el | 167 +++++++++++++++++++++++++ 1 file changed, 167 insertions(+) diff --git a/test/lisp/gnus/gnus-icalendar-tests.el b/test/lisp/gnus/gnus-icalendar-tests.el index 8f89e8f..aab9a88 100644 --- a/test/lisp/gnus/gnus-icalendar-tests.el +++ b/test/lisp/gnus/gnus-icalendar-tests.el @@ -27,6 +27,7 @@ ;;; Code: (require 'ert) +(require 'ert-x) (require 'gnus-icalendar) @@ -255,5 +256,171 @@ gnus-icalendary-weekly-byday <2020-09-21 14:00-14:30 +1w>"))) (setenv "TZ" tz)))) + +(ert-deftest gnus-icalendar-org-entry-from-ics () + "Test creation of org mode entry from ics string." + ;; Use this form so as not to rely on system tz database. + ;; Eg hydra.nixos.org. + (setenv "TZ" "CET-1CEST,M3.5.0/2,M10.5.0/3") + (let ((event (gnus-icalendar-tests--get-ical-event "BEGIN:VCALENDAR +PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN +VERSION:2.0 +METHOD:REQUEST +BEGIN:VEVENT +UID:5e61e65c-c991-4e42-bd41-44fcf057ea11 +SUMMARY:test appointment +ORGANIZER;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:info@example.com +ATTENDEE;CN=Me;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:me@example.com +ATTENDEE;CN=Myself;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:myself@example.com +DTSTART;TZID=Europe/Brussels:20230811T160000 +DTEND;TZID=Europe/Brussels:20230811T170000 +DESCRIPTION;ALTREP=\"data:text/html,%3Cbody%3ELet's%20code%3C%2Fbody%3E\":Let's code +LOCATION:At home +END:VEVENT +END:VCALENDAR"))) + (should (string= (substring-no-properties (gnus-icalendar-event->org-entry event nil)) + "* test appointment (At home) +:PROPERTIES: +:ICAL_EVENT: t +:ID: 5e61e65c-c991-4e42-bd41-44fcf057ea11 +:ORGANIZER: info@example.com +:LOCATION: At home +:PARTICIPATION_TYPE: non-participant +:REQ_PARTICIPANTS: Me, Myself +:OPT_PARTICIPANTS: +:RRULE: +:REPLY: Not replied yet +:END: + + <2023-08-11 16:00-17:00> + + Let's code")))) + + +(ert-deftest gnus-icalendar-org-entry-from-ics-no-loc-no-desc () + "Test creation of org mode entry from ics string, no location, no description." + ;; Use this form so as not to rely on system tz database. + ;; Eg hydra.nixos.org. + (setenv "TZ" "CET-1CEST,M3.5.0/2,M10.5.0/3") + (let ((event (gnus-icalendar-tests--get-ical-event "BEGIN:VCALENDAR +PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN +VERSION:2.0 +METHOD:REQUEST +BEGIN:VEVENT +UID:5e61e65c-c991-4e42-bd41-44fcf057ea11 +SUMMARY:test appointment +ORGANIZER;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:info@example.com +ATTENDEE;CN=Me;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:me@example.com +ATTENDEE;CN=Myself;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:myself@example.com +DTSTART;TZID=Europe/Brussels:20230811T160000 +DTEND;TZID=Europe/Brussels:20230811T170000 +END:VEVENT +END:VCALENDAR"))) + (should (string= (substring-no-properties (gnus-icalendar-event->org-entry event nil)) + "* test appointment +:PROPERTIES: +:ICAL_EVENT: t +:ID: 5e61e65c-c991-4e42-bd41-44fcf057ea11 +:ORGANIZER: info@example.com +:LOCATION: +:PARTICIPATION_TYPE: non-participant +:REQ_PARTICIPANTS: Me, Myself +:OPT_PARTICIPANTS: +:RRULE: +:REPLY: Not replied yet +:END: + + <2023-08-11 16:00-17:00> + + No description")))) + + +(defconst gnus-icalendar-tests--org-entry-no-desc + "* Org entry with empty description +:PROPERTIES: +:ICAL_EVENT: t +:ID: xxx-11-yyy +:ORGANIZER: No idea +:LOCATION: Nowhere +:PARTICIPATION_TYPE: non-participant +:REQ_PARTICIPANTS: +:OPT_PARTICIPANTS: +:RRULE: +:REPLY: Not replied yet +:END: + + <2023-01-01 13:00-14:00>") + + +(defun gnus-icalender-tests--get-updated-event (description) + "Create updated event with DESCRIPTION and new date 2024-01-01. + +If DESCRIPTION is nil, we don't add a description line at all." + ;; Use this form so as not to rely on system tz database. + ;; Eg hydra.nixos.org. + (setenv "TZ" "CET-1CEST,M3.5.0/2,M10.5.0/3") + (let ((description (if description (format "DESCRIPTION:%s\n" description) ""))) + (gnus-icalendar-tests--get-ical-event (format "BEGIN:VCALENDAR +METHOD:REQUEST +BEGIN:VEVENT +UID:xxx-11-yyy +SUMMARY:Updated event +ORGANIZER;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:info@example.com +DTSTART;TZID=Europe/Brussels:20240101T180000 +DTEND;TZID=Europe/Brussels:20240101T190000 +%s +LOCATION:unknown +END:VEVENT +END:VCALENDAR" description)))) + + +(ert-deftest gnus-icalendar-update-org-event-no-description-add () + "Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64023 . + +Update an existing org event that has no description; add description. +Check timestamp has changed." + (ert-with-temp-file + calendar-file :suffix ".org" :text gnus-icalendar-tests--org-entry-no-desc + (gnus-icalendar--update-org-event (gnus-icalender-tests--get-updated-event "New description") + 'accepted `(,calendar-file)) + (with-current-buffer (find-buffer-visiting calendar-file) + (let ((new-entry (buffer-substring-no-properties (point-min) (point-max)))) + (should (string-match-p (regexp-quote "<2024-01-01 18:00-19:00>") new-entry)) + (should (string-match-p (regexp-quote "New description") new-entry)) + (should-not (string-match-p (regexp-quote "<2023-01-01 13:00-14:00>") new-entry)) + (should-not (string-match-p (regexp-quote "No description") new-entry)))))) + + +(ert-deftest gnus-icalendar-update-org-event-keep-no-description () + "Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64023 . + +Update an existing org event that has no description; keep it empty. +Check timestamp has changed." + (ert-with-temp-file + calendar-file :suffix ".org" :text gnus-icalendar-tests--org-entry-no-desc + (let ((event (gnus-icalender-tests--get-updated-event nil))) + (gnus-icalendar--update-org-event event 'accepted `(,calendar-file)) + (with-current-buffer (find-buffer-visiting calendar-file) + (let ((new-entry (buffer-substring-no-properties (point-min) (point-max)))) + (should (string-match-p (regexp-quote "<2024-01-01 18:00-19:00>") new-entry)) + (should (string-match-p (regexp-quote "No description") new-entry)) + (should-not (string-match-p (regexp-quote "<2023-01-01 13:00-14:00>") new-entry))))))) + + +(ert-deftest gnus-icalendar-update-org-event-remove-description () + "Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64023 . + +Update an existing org event that has a description; set description empty." + (ert-with-temp-file + calendar-file :suffix ".org" :text gnus-icalendar-tests--org-entry-no-desc + (let ((event (gnus-icalender-tests--get-updated-event nil))) + (oset event :description nil) + (gnus-icalendar--update-org-event event'accepted `(,calendar-file)) + (with-current-buffer (find-buffer-visiting calendar-file) + (let ((new-entry (buffer-substring-no-properties (point-min) (point-max)))) + (should (string-match-p (regexp-quote "<2024-01-01 18:00-19:00>") new-entry)) + (should (string-match-p (regexp-quote "No description") new-entry)) + (should-not (string-match-p (regexp-quote "<2023-01-01 13:00-14:00>") new-entry))))))) + (provide 'gnus-icalendar-tests) ;;; gnus-icalendar-tests.el ends here -- 2.40.1 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Robert Pluim writes: > (please keep the bug address in CC) > >>>>>> On Mon, 12 Jun 2023 20:16:30 +0200, Reindert-Jan Ekker said: > > Reindert-Jan> Yes, that works! > > OK. Eli, emacs-29 or master? It=CA=BCs a pretty small change, but it=CA= =BCs not > a regression as such. > > Reindert-Jan> By the way, what is the intended behaviour of > Reindert-Jan> gnus-icalendar--cancel-org-event? It seems to search fo= r a property "DT" > Reindert-Jan> that does not exist (at least in my files), so it does = not change the > Reindert-Jan> event. Is this a bug or am I missing some configuration= somewhere? > > It looks like a bug. I can=CA=BCt find any code creating such a property, > the current code inserts the timestamp in the body of the org entry. > > Robert --=20 Reindert-Jan Ekker Code Sensei --=-=-=--