From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#64023: 29.0.91; gnus-icalendar does not update timestamp when description is empty Date: Mon, 12 Jun 2023 18:21:46 +0200 Message-ID: <87jzw8hcrp.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24410"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64023@debbugs.gnu.org To: Reindert-Jan Ekker Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 12 18:22:23 2023 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 1q8kJD-00065V-58 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Jun 2023 18:22:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q8kIt-0000m9-SG; Mon, 12 Jun 2023 12:22:03 -0400 Original-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 1q8kIs-0000lu-Er for bug-gnu-emacs@gnu.org; Mon, 12 Jun 2023 12:22:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q8kIs-0005D8-69 for bug-gnu-emacs@gnu.org; Mon, 12 Jun 2023 12:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q8kIs-0008AM-1c for bug-gnu-emacs@gnu.org; Mon, 12 Jun 2023 12:22:02 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 64023-submit@debbugs.gnu.org id=B64023.168658691731377 (code B ref 64023); Mon, 12 Jun 2023 16:22:02 +0000 Original-Received: (at 64023) by debbugs.gnu.org; 12 Jun 2023 16:21:57 +0000 Original-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 Original-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 Original-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) Original-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) In-Reply-To: (Reindert-Jan Ekker's message of "Mon, 12 Jun 2023 17:48:27 +0200") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263288 Archived-At: >>>>> 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