From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Paul W. Rankin" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#67203: [PATCH] * lisp/calendar/diary-lib.el (diary-list-entries-2) skip leading whitespace in diary entries Date: Fri, 29 Dec 2023 12:50:48 +1000 Message-ID: <0dd8c7c7e81f218c204ee862948fc910@purelymail.com> References: <20231115111420.25018-1-hello@paulwrankin.com> Reply-To: "Paul W. Rankin" Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29683"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Purely Mail via Roundcube/1.6.5 Cc: 67203@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 29 03:52:31 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 1rJ2z8-0007SV-9N for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Dec 2023 03:52:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJ2yj-0008MT-2v; Thu, 28 Dec 2023 21:52:05 -0500 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 1rJ2yh-0008MG-83 for bug-gnu-emacs@gnu.org; Thu, 28 Dec 2023 21:52:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJ2yg-00008x-VS for bug-gnu-emacs@gnu.org; Thu, 28 Dec 2023 21:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rJ2yf-0002dx-VA for bug-gnu-emacs@gnu.org; Thu, 28 Dec 2023 21:52:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Paul W. Rankin" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Dec 2023 02:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67203 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 67203-submit@debbugs.gnu.org id=B67203.170381827610105 (code B ref 67203); Fri, 29 Dec 2023 02:52:01 +0000 Original-Received: (at 67203) by debbugs.gnu.org; 29 Dec 2023 02:51:16 +0000 Original-Received: from localhost ([127.0.0.1]:40549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJ2xw-0002cu-Df for submit@debbugs.gnu.org; Thu, 28 Dec 2023 21:51:16 -0500 Original-Received: from sendmail.purelymail.com ([34.202.193.197]:60684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJ2xr-0002cd-HL for 67203@debbugs.gnu.org; Thu, 28 Dec 2023 21:51:14 -0500 DKIM-Signature: a=rsa-sha256; b=lqmz8eZ0ujlMXGoJVNSVaOL0LN0ZOLnj1HRhFeYzSkyQZWvwj76pqVLlRIPmOrA5pMMabA1Hnn1nJoMGfDDURpXJ5eFUPMtaxfLOins0KznWLh7VZrTWlAKDNGuJG3dTI9ZgB6UGAQtnOHTHtwGN9uaZ8odYHE+XpEkqPhMQquCVstUdU8+SIq/5ne1NcCkgWXK2Qrf2xS9o24oX5xXaFwJmvAnckF97qlaK409RW9v5p7yz3jTiTK/39aK19z1wUDknPpw4q64UZaHtjp2wONeLtpX+ONp9zZhAzIOIZiwuuolF5uKL70CbK+U1qGjR7C6CbPbu2Tbe7VVtnXm7FQ==; s=purelymail1; d=paulwrankin.com; v=1; bh=5Ssg2Ge26+O4iT7cO+GZ/DTty+nzRD789rgjFkgedGs=; h=Received:From:To:Subject; DKIM-Signature: a=rsa-sha256; b=Z83BpawbehqK//Ucc5iyB/sEcyyVwulTxHIlVOeKp/6ppEv7tauYb4dEB4c7Jv8BBPEomPp5LrovVG5pAwmrX7/X0VG8HKdbkYMCiZWMwY4CsOZmqRDcNllVlnKgUXoqVtjGozc8VDRUMXhQokl1xmp7P/8WcJjhO0944UzJypJRdXUSbDLNZwBSjW6MvlUm+yXpXKh71A123lt9ln2636jSuu54RE30JcsABZxrRcBxvvVsMb0iYXZDbsmESKLKVbRFcOXbLBa9id35WcMuMLs0FHbZCdIP7XM13hOOMPPxLAkwfwpJqKcxjZ+8OquvpzNDPREpf1XJQj2DJHrleg==; s=purelymail1; d=purelymail.com; v=1; bh=5Ssg2Ge26+O4iT7cO+GZ/DTty+nzRD789rgjFkgedGs=; h=Feedback-ID:Received:From:To:Subject; Feedback-ID: 791:353:null:purelymail X-Pm-Original-To: 67203@debbugs.gnu.org Original-Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPA id -1886097281; Fri, 29 Dec 2023 02:50:48 +0000 (UTC) In-Reply-To: X-Sender: hello@paulwrankin.com 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:276999 Archived-At: Sorry for the late reply. I actually stopped using calendar. Twas but a brief interlude. I think there's a problem with my patch anyway. On 2023-12-15 11:11, Stefan Kangas wrote: > "Paul W. Rankin" via "Bug reports for GNU Emacs, the Swiss army knife > of > text editors" writes: > >> --- >> When diary entries have more than a single space between date and >> entry >> this is displayed in diary display. This skips the leading whitespace. > > Thanks. Could you give examples of a file with and without this > whitespace, and instructions for how to test your change? I don't use > diary much myself. > > Please also always send patches as attachments, formatted by > > git format-patch -1 > > Bonus points if you could also provide unit tests for this stuff, but > that's optional since this library currently lacks any. > >> lisp/calendar/diary-lib.el | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el >> index 0d894f1..6806039 100644 >> --- a/lisp/calendar/diary-lib.el >> +++ b/lisp/calendar/diary-lib.el >> @@ -697,6 +697,8 @@ any entries were found." >> (setq date-start (line-end-position 0)) >> ;; Actual entry starts on the next-line? >> (if (looking-at "[ \t]*\n[ \t]") (forward-line 1)) >> + ;; We don't want leading whitespace >> + (skip-chars-forward " \t") >> (setq entry-found t >> entry-start (point)) >> (forward-line 1) >> -- >> 2.42.0