GNU bug report logs - #45808
28.0.50; [PATCH] Add option remember-diary-regexp

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Gabriel do Nascimento Ribeiro <gabriel376@HIDDEN>; Keywords: patch fixed; Done: Lars Ingebrigtsen <larsi@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 28.1, send any further explanations to 45808 <at> debbugs.gnu.org and Gabriel do Nascimento Ribeiro <gabriel376@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 45808 <at> debbugs.gnu.org:


Received: (at 45808) by debbugs.gnu.org; 20 Jan 2021 16:46:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 20 11:46:35 2021
Received: from localhost ([127.0.0.1]:56057 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l2Gct-0007Ar-6b
	for submit <at> debbugs.gnu.org; Wed, 20 Jan 2021 11:46:35 -0500
Received: from quimby.gnus.org ([95.216.78.240]:46578)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1l2Gcq-00073w-Rh
 for 45808 <at> debbugs.gnu.org; Wed, 20 Jan 2021 11:46:33 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=IjfK2GskhJxlf+1RLec09G24Hv71gZPuIWlgEp+UYPE=; b=KZcFOUuUD6PLx93tZeLVDpm629
 UuUNzC1APfas9as/07fylrAaITdmJFEv2n6WCigeZ8KxED1Jp7JpNNvAcufWncl4OK3f1wJTecbSL
 ChJbnJqdqHDF4DoPEkdOYg0JWmQ5G/ZvPeVmSzSZpOxhv5K6rkMZjpqiimZossDyINZY=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1l2Gci-0001Tt-77; Wed, 20 Jan 2021 17:46:26 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Gabriel do Nascimento Ribeiro <gabriel376@HIDDEN>
Subject: Re: bug#45808: 28.0.50; [PATCH] Add option remember-diary-regexp
References: <CH2PR01MB5879B3ABE5AD3ECA76B6C1A78BAA0@HIDDEN>
 <83k0sidw5e.fsf@HIDDEN>
 <CH2PR01MB58794F0CA8F9EF082080DCEA8BAA0@HIDDEN>
X-Now-Playing: Joe Jackson's _Live 1980-86 (2)_: "Memphis"
Date: Wed, 20 Jan 2021 17:46:22 +0100
In-Reply-To: <CH2PR01MB58794F0CA8F9EF082080DCEA8BAA0@HIDDEN>
 (Gabriel do Nascimento Ribeiro's message of "Tue, 12 Jan 2021 12:53:29
 -0300")
Message-ID: <87turbpndt.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Gabriel do Nascimento Ribeiro <gabriel376@HIDDEN>
 writes:
 > There are multiple cases, for example, if the user wants to > automatically
 extract diary entries of lines that starts with a date > pattern (e.g.:
 dd/mm/yyyy). This new option does not target a spe [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45808
Cc: 45808 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Gabriel do Nascimento Ribeiro <gabriel376@HIDDEN> writes:

> There are multiple cases, for example, if the user wants to
> automatically extract diary entries of lines that starts with a date
> pattern (e.g.: dd/mm/yyyy). This new option does not target a specific
> user case but rather opens a range of possibilities by not relying on a
> hardcoded (and not documented) behavior.

Perhaps it should be a defconst instead of a defcustom, though, if the
user isn't supposed to alter it, but just use it?

> By the way, here is a patch with updated docstring.

Thanks; applied to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45808; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Jan 2021 15:53:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 12 10:53:45 2021
Received: from localhost ([127.0.0.1]:32893 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kzLzM-0005Hb-MI
	for submit <at> debbugs.gnu.org; Tue, 12 Jan 2021 10:53:45 -0500
Received: from lists.gnu.org ([209.51.188.17]:50384)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gabriel376@HIDDEN>) id 1kzLzJ-0005HS-Kc
 for submit <at> debbugs.gnu.org; Tue, 12 Jan 2021 10:53:43 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:41666)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <gabriel376@HIDDEN>)
 id 1kzLzJ-00029D-9o
 for bug-gnu-emacs@HIDDEN; Tue, 12 Jan 2021 10:53:41 -0500
Received: from mail-bn7nam10olkn2094.outbound.protection.outlook.com
 ([40.92.40.94]:23776 helo=NAM10-BN7-obe.outbound.protection.outlook.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <gabriel376@HIDDEN>)
 id 1kzLzE-0007yR-OB
 for bug-gnu-emacs@HIDDEN; Tue, 12 Jan 2021 10:53:41 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=Y9xvBFp0w7OsSbbXEQ6fnm4DNArtUTypMjyLM2rQfaDEHTNiHB14JeUJb+pfEEp1G+GcVwx5DbFJ+V42qfYJOe9fISg5DeRCcTIFDsqErJseaGkFeQfeeWXF6gpMOlALejO+iNsSKk5WYPTdL4zhFjL+KACeEL6MLsm4t6X/CxBv5OdXLu4C0wRo3XF4UJY32VBgGOCXr4Hpd2KQISthyOZoyu/uJYGsHYCZqY3JAUC5vZMFVhIqzyuHSRCnPhz9+Mh6CFaeVpU1/UhGywrizuPURpz/0to56wJeMUVG/JXwMEuOzHWZi0SR9VD3sV6/gc3w5MuW71a6jmvvfVUdbw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=2qRGhVRL4Jqw5AU9yoH16EOgFqhTZ2llvYGzb5DOdiQ=;
 b=SoHznkcDiSCVPIA3cnMx2Vpvg0BIERyyzxTMRAsaT0zOlRDi4gjScdNNCvrXVBDf58xp+OpyOMbbLgeATiqZNVbLEDm1GH7kTfR/wg6ggDs+D/fCNyKTHS39ofi4wnhieSOQxuqi5f92lEF5Uo2cyiZXvCod3KtXC+gMSXvMOYYM6Psr8t48HFqeUCeUN9pto39Bb4NRGwTL9frZThIun7xIKJRO/TGEqt8zO5MZn0TB8e0N2A0tyAFw/oCQTig2u+8W2piuQs2ZMnv7WsxObaRsthJg9TycC2+iRmVvS8EfhCMqeWts0wssImX7AEQAFN9p0vGW1iziR2+9mxkPbQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=2qRGhVRL4Jqw5AU9yoH16EOgFqhTZ2llvYGzb5DOdiQ=;
 b=UcHjLQPQ9eh/zIstZBtgPmYTWBXBM2gG/ru8al817N+yS5fOKgg3Olma9lTVFo16w+8SGHFmd/WgFH3So/KYezKW6TgvDVzPIEjXDZNPuVhm4ODLPpXIgnLmc7W0Y/+Xi1v7epfC6Nifm7IExNVengbqpA5dqXOCdoOVAPsccwE7JKnN0dRu82IuuzMef182RoLYG1E1AahOBBDtpRjCTntgOYkxdft3uaoL4R/0B6ejsPsBlhCDCDxWqQ7A/pjcEGLswWysRjxzkmxt/LezlhpOJEzvOyaM5BdyasotwFMdFhbFzzjuJAS+e341ZqjRSz177AlcbJZVPB+VccIVGg==
Received: from BN7NAM10FT056.eop-nam10.prod.protection.outlook.com
 (2a01:111:e400:7e8f::40) by
 BN7NAM10HT220.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::364)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.9; Tue, 12 Jan
 2021 15:53:35 +0000
Received: from CH2PR01MB5879.prod.exchangelabs.com (2a01:111:e400:7e8f::48) by
 BN7NAM10FT056.mail.protection.outlook.com (2a01:111:e400:7e8f::149)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.9 via Frontend
 Transport; Tue, 12 Jan 2021 15:53:34 +0000
X-IncomingTopHeaderMarker: OriginalChecksum:47ECFBC34A15C1F93682E696BDF6DFB69B8BC697A71726BFBBBFAF2654073D15;
 UpperCasedChecksum:16E4CBD87A1E925C6D8060C05CC679EFEE6A85B35E67A3224D1CF49467CB1EE5;
 SizeAsReceived:7559; Count:45
Received: from CH2PR01MB5879.prod.exchangelabs.com
 ([fe80::d51d:8cbe:370a:39ac]) by CH2PR01MB5879.prod.exchangelabs.com
 ([fe80::d51d:8cbe:370a:39ac%7]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021
 15:53:34 +0000
From: Gabriel do Nascimento Ribeiro <gabriel376@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Re: bug#45808: 28.0.50; [PATCH] Add option remember-diary-regexp
References: <CH2PR01MB5879B3ABE5AD3ECA76B6C1A78BAA0@HIDDEN>
 <83k0sidw5e.fsf@HIDDEN>
Date: Tue, 12 Jan 2021 12:53:29 -0300
In-Reply-To: <83k0sidw5e.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 12 Jan
 2021 17:15:09 +0200")
Message-ID: <CH2PR01MB58794F0CA8F9EF082080DCEA8BAA0@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Content-Type: multipart/mixed; boundary="=-=-="
X-TMN: [X82ctgP/+XPT9AHIz/svdvhWK/UkYMtNtw9h99nNZDrrbHE32QrwtwzrbC1eOmco]
X-ClientProxiedBy: CP5P284CA0019.BRAP284.PROD.OUTLOOK.COM
 (2603:10d6:103:94::6) To CH2PR01MB5879.prod.exchangelabs.com
 (2603:10b6:610:3c::12)
X-Microsoft-Original-Message-ID: <877doip2x2.fsf@HIDDEN>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from precision5540 (2804:431:c7f3:af8f:d72b:a010:a924:a70c) by
 CP5P284CA0019.BRAP284.PROD.OUTLOOK.COM (2603:10d6:103:94::6) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.3742.12 via Frontend Transport; Tue, 12 Jan 2021 15:53:33 +0000
X-MS-PublicTrafficType: Email
X-IncomingHeaderCount: 45
X-EOPAttributedMessage: 0
X-MS-Office365-Filtering-Correlation-Id: f324f352-0a3c-41a4-7970-08d8b71237e1
X-MS-TrafficTypeDiagnostic: BN7NAM10HT220:
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: c0RShON8ZxcjAdunDrJ//K16TWzRQWE5mq5KJlqU07tZqVGl3JxiYSppgOobbev3QUQVruSjnsCFCRxqJ4H4oiCqS/0SCXKCqXykmjUyrLzqehyJLOsh7yM+eFtSUeha0lBRMibMTk1weVQ117tDJ5LozpLE1NiFVENjKbJmLQePH2wGSAa/wUHzzVUYm7Vc0MIsKin7ExDHVB1BAqWc3sA3v5e9NJYngQ7sJFgRS35aO68UF8QP5jcD3Q6UoY1X
X-MS-Exchange-AntiSpam-MessageData: RgEDS0/JtrFog6QtDEAkzjhav9dUQzABpWWG+G9AwixPmX1Us4RNP7DkL3opXvP29FkxA7B5K55f4P6tgzKQm2xzX6HN0YA87P8OKeUfJopmIOIw4b/ioIKT6wZdup8ThBpAVA6WeeykCKTmOK9TaLDiOXaLzVQEc08Lx/nHaFmy74hhtb77D8/k+E7Kn0iz2Ti401beoQI1/18nzbaL6w==
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 15:53:34.7063 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-Network-Message-Id: f324f352-0a3c-41a4-7970-08d8b71237e1
X-MS-Exchange-CrossTenant-AuthSource: BN7NAM10FT056.eop-nam10.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: Internet
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7NAM10HT220
Received-SPF: pass client-ip=40.92.40.94; envelope-from=gabriel376@HIDDEN;
 helo=NAM10-BN7-obe.outbound.protection.outlook.com
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.1 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

--=-=-=
Content-Type: text/plain

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Gabriel do Nascimento Ribeiro <gabriel376@HIDDEN>
>> Date: Tue, 12 Jan 2021 00:26:25 -0300
>> 
>> The regexp to extract diary entries on remember.el is hardcoded.
>> Here is a patch to add a new option to configure a custom regexp.
>
> Thanks, but can you please describe the situation where this regexp
> will need to be modified?

There are multiple cases, for example, if the user wants to
automatically extract diary entries of lines that starts with a date
pattern (e.g.: dd/mm/yyyy). This new option does not target a specific
user case but rather opens a range of possibilities by not relying on a
hardcoded (and not documented) behavior.

By the way, here is a patch with updated docstring.

--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0001-Add-option-remember-diary-regexp.patch

From eaff2fb472a0f5911ee11287156d46ed7acbdbb0 Mon Sep 17 00:00:00 2001
From: Gabriel do Nascimento Ribeiro <gabriel.nascimento@HIDDEN>
Date: Tue, 12 Jan 2021 12:52:07 -0300
Subject: [PATCH] Add option remember-diary-regexp

---
 lisp/textmodes/remember.el | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el
index 98d3a3856e..5558bd7ec5 100644
--- a/lisp/textmodes/remember.el
+++ b/lisp/textmodes/remember.el
@@ -159,7 +159,8 @@
 ;;   ;; This should be before other entries that may return t
 ;;   (add-to-list 'remember-handler-functions 'remember-diary-extract-entries)
 ;;
-;; This module recognizes entries of the form
+;; This module recognizes entries of the form (defined by
+;; remember-diary-regexp)
 ;;
 ;;   DIARY: ....
 ;;
@@ -532,13 +533,18 @@ remember-diary-convert-entry
 
 (autoload 'diary-make-entry "diary-lib")
 
+(defcustom remember-diary-regexp "^DIARY:\\s-*\\(.+\\)"
+  "Regexp to extract diary entries."
+  :type 'regexp
+  :version "28.1")
+
 ;;;###autoload
 (defun remember-diary-extract-entries ()
-  "Extract diary entries from the region."
+  "Extract diary entries from the region based on `remember-diary-regexp'."
   (save-excursion
     (goto-char (point-min))
     (let (list)
-      (while (re-search-forward "^DIARY:\\s-*\\(.+\\)" nil t)
+      (while (re-search-forward remember-diary-regexp nil t)
         (push (remember-diary-convert-entry (match-string 1)) list))
       (when list
         (diary-make-entry (mapconcat 'identity list "\n")
-- 
2.27.0


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45808; Package emacs. Full text available.

Message received at 45808 <at> debbugs.gnu.org:


Received: (at 45808) by debbugs.gnu.org; 12 Jan 2021 15:15:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 12 10:15:05 2021
Received: from localhost ([127.0.0.1]:32841 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kzLNw-0004GC-7q
	for submit <at> debbugs.gnu.org; Tue, 12 Jan 2021 10:15:05 -0500
Received: from eggs.gnu.org ([209.51.188.92]:39586)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kzLNt-0004FQ-Nu
 for 45808 <at> debbugs.gnu.org; Tue, 12 Jan 2021 10:15:02 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:33029)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kzLNo-0002de-DA; Tue, 12 Jan 2021 10:14:56 -0500
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2568
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kzLNn-00004s-Lk; Tue, 12 Jan 2021 10:14:56 -0500
Date: Tue, 12 Jan 2021 17:15:09 +0200
Message-Id: <83k0sidw5e.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gabriel do Nascimento Ribeiro <gabriel376@HIDDEN>
In-Reply-To: <CH2PR01MB5879B3ABE5AD3ECA76B6C1A78BAA0@HIDDEN>
 (message from Gabriel do Nascimento Ribeiro on Tue, 12 Jan 2021
 00:26:25 -0300)
Subject: Re: bug#45808: 28.0.50; [PATCH] Add option remember-diary-regexp
References: <CH2PR01MB5879B3ABE5AD3ECA76B6C1A78BAA0@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 45808
Cc: 45808 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Gabriel do Nascimento Ribeiro <gabriel376@HIDDEN>
> Date: Tue, 12 Jan 2021 00:26:25 -0300
> 
> The regexp to extract diary entries on remember.el is hardcoded.
> Here is a patch to add a new option to configure a custom regexp.

Thanks, but can you please describe the situation where this regexp
will need to be modified?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45808; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Jan 2021 03:41:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 11 22:41:46 2021
Received: from localhost ([127.0.0.1]:58867 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kzAZ0-0001Ir-58
	for submit <at> debbugs.gnu.org; Mon, 11 Jan 2021 22:41:46 -0500
Received: from lists.gnu.org ([209.51.188.17]:50400)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gabriel376@HIDDEN>) id 1kzAYx-0001Ii-1V
 for submit <at> debbugs.gnu.org; Mon, 11 Jan 2021 22:41:44 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:40866)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <gabriel376@HIDDEN>)
 id 1kzAYv-0004n5-Lx
 for bug-gnu-emacs@HIDDEN; Mon, 11 Jan 2021 22:41:42 -0500
Received: from mail-mw2nam10olkn2088.outbound.protection.outlook.com
 ([40.92.42.88]:8033 helo=NAM10-MW2-obe.outbound.protection.outlook.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <gabriel376@HIDDEN>)
 id 1kzAYp-0003RB-MQ
 for bug-gnu-emacs@HIDDEN; Mon, 11 Jan 2021 22:41:41 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=ZmWltWncZu6WE1r2sY9Rmq19rfBMX9koiJl+rGQEeeh3EMQTuM82hl1Xoy0jSGlFtszee42qVYeIrwP+dpYmw1Nv6fuiN4lnG/TvGyKmgVuGSi/EG3jq+kvy62PzrNuks8nBq+upgXpWRr6U0ederyLk5KgFgQS3mzb5ru+iN64rZOLhpZVsmu9ntZi7orgzGzpXuQII6tmNOG5jRbXhVQie7GffT/kNxL1Uv9XVL3iTcHi7xkvXGXVBeBN8M/hblg1H8aMiDaVoBLV13OCODyPb7GYP/83fXK5uTBo06zzFozJYbiGywk8ci/yJkoKH8x4xXbqS5+skH9GcWpnThg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=8XJeSaIfxINE9dped4bIiPFgdOPILD0+0stTyUHxd1w=;
 b=LWZPVbJmxwf01zqEwAUZMNcGf8bGxi+mLxCCJEFl1cx/fMSL5whJdyLxduF3H4hMRws0gwY1B04H7D6GFRMHo5NWZvy/fJMpRSF38OcxUrt/+0vqZbUvx1bGpNYbJo3Yh+NROEiH3/HJbKSOlwrXAsdS+TU4S7vPvyJ4ELcSQCTRIcBKxNZVG5lARZZWY8DIIyAr+wMRAyOTt7//rZM1W7o5ksKWCKxliyreKGaTm4m+zkuXf3bUXTlexYzYZcfCEf8D6HdhGtnuS+eeSLYasCdHu7HXc4AfdY/Puf+zUZydTghSEooSJ3EM5kWlusvXXNYnZSdW4Wvq4nKKmd/NBg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=8XJeSaIfxINE9dped4bIiPFgdOPILD0+0stTyUHxd1w=;
 b=EcASXai4loq/BFMNseVpVi/eLOKuO7rn7JfDvnHBJx44jIZv1YXwzkbDmeau9Xjw1AsEUn1M4ZzejOe6N3a4wm1OGcqgXLCuukRvn737e6bQ1zw7QUcPkdh01XlAIrflrLhHXeFDDM92Hn1KaMXQ4qwjv2H02E9Nmqb24Hx7oEg9VHYn3cgiHyB4n70DkPHWKovtckXz3ZBNBMDXrhyyXYaGvmzwQU10b8U3anUxO9GCgyvHnTjL0T2P+1Xj43QTiTCbT+TwM+8l1RsrgVyI0Vm2seZEjRnZ9mkcXuJcfu3DIIxDN3bbWqC3E9oIx5o8mCsPEjjbhHi3TVDqdnWd1Q==
Received: from DM6NAM10FT063.eop-nam10.prod.protection.outlook.com
 (2a01:111:e400:7e86::53) by
 DM6NAM10HT038.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e86::448)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.9; Tue, 12 Jan
 2021 03:26:30 +0000
Received: from CH2PR01MB5879.prod.exchangelabs.com (2a01:111:e400:7e86::51) by
 DM6NAM10FT063.mail.protection.outlook.com (2a01:111:e400:7e86::209)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.9 via Frontend
 Transport; Tue, 12 Jan 2021 03:26:30 +0000
X-IncomingTopHeaderMarker: OriginalChecksum:9F3F97E3FD9CD845D9A8AFA103CF8A60D1878C4B4DF3D233B9E1D8848948FCCD;
 UpperCasedChecksum:6071FBD49196178E9DB9AE243D7A2497E6DDB479C4A4385624FFFC1F5AFD91AE;
 SizeAsReceived:7265; Count:42
Received: from CH2PR01MB5879.prod.exchangelabs.com
 ([fe80::d51d:8cbe:370a:39ac]) by CH2PR01MB5879.prod.exchangelabs.com
 ([fe80::d51d:8cbe:370a:39ac%7]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021
 03:26:30 +0000
From: Gabriel do Nascimento Ribeiro <gabriel376@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.0.50; [PATCH] Add option remember-diary-regexp
Date: Tue, 12 Jan 2021 00:26:25 -0300
Message-ID: <CH2PR01MB5879B3ABE5AD3ECA76B6C1A78BAA0@HIDDEN>
Content-Type: multipart/mixed; boundary="=-=-="
X-TMN: [UmFbMZM2DOWhIBRlbr/XuptXD7TzW/HE3sM6uHpunW4vjfsvFAK//+i2wBBSh1VK]
X-ClientProxiedBy: CP5P284CA0005.BRAP284.PROD.OUTLOOK.COM
 (2603:10d6:103:95::10) To CH2PR01MB5879.prod.exchangelabs.com
 (2603:10b6:610:3c::12)
X-Microsoft-Original-Message-ID: <87czyag7j2.fsf@HIDDEN>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from precision5540 (2804:431:c7f3:af8f:58c4:f4c3:a2c3:b56e) by
 CP5P284CA0005.BRAP284.PROD.OUTLOOK.COM (2603:10d6:103:95::10) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.3742.6 via Frontend Transport; Tue, 12 Jan 2021 03:26:29 +0000
X-MS-PublicTrafficType: Email
X-IncomingHeaderCount: 42
X-EOPAttributedMessage: 0
X-MS-Office365-Filtering-Correlation-Id: 6ba62018-6e06-40ae-77fe-08d8b6a9dabe
X-MS-TrafficTypeDiagnostic: DM6NAM10HT038:
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: ozF+hyT5aFQiPnu+h1oTEkzoekPnc1lYGEBdRE2HwFywXw3AX4DssMG8JYSbeed3d7KLSXc2INZ/OoQhSbZ3qm1dPRrM+5B//QfW0PX6REDVbg1KHDtU7vxtgBgJz32i6vM3G5Y4IvjYRe+0peAaNyshUU7YI1a9GV3R+xNkDUCYji2GlLhoZ2uwdkZHwe5vUGC4gLbz7kpe5YvZcjXgokqQJC8mgE0CDS0WpSULDt8hrgNEuI0MiYCrBXkS7riO
X-MS-Exchange-AntiSpam-MessageData: fvM0YLuY9kmC+SxSCAoJtshBtiiYDievCoqJo2LHNDjiaXQJqhv7jpMy0fzzkX2joLFlGKf8dmMxundMm6mL9V7ncusS61jWO0UBo7YHByO1oMISkdBNO7zZrVChdierNP70+UG0ww0shnygythiG7cLzu3SqO2VLNp5bn2rf8Qe0838nLx2GwSTppvGDxk6Dq9syvwgS08UnV+ocKqv+w==
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 03:26:30.7739 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-Network-Message-Id: 6ba62018-6e06-40ae-77fe-08d8b6a9dabe
X-MS-Exchange-CrossTenant-AuthSource: DM6NAM10FT063.eop-nam10.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: Internet
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6NAM10HT038
Received-SPF: pass client-ip=40.92.42.88; envelope-from=gabriel376@HIDDEN;
 helo=NAM10-MW2-obe.outbound.protection.outlook.com
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

--=-=-=
Content-Type: text/plain

The regexp to extract diary entries on remember.el is hardcoded.
Here is a patch to add a new option to configure a custom regexp.

--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0001-Add-option-remember-diary-regexp.patch

From aab8cce70c80e824e77fb6b8e13eaa683c2714f0 Mon Sep 17 00:00:00 2001
From: Gabriel do Nascimento Ribeiro <gabriel.nascimento@HIDDEN>
Date: Tue, 12 Jan 2021 00:19:28 -0300
Subject: [PATCH] Add option remember-diary-regexp

---
 lisp/textmodes/remember.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el
index 98d3a3856e..ed5144443b 100644
--- a/lisp/textmodes/remember.el
+++ b/lisp/textmodes/remember.el
@@ -159,7 +159,8 @@
 ;;   ;; This should be before other entries that may return t
 ;;   (add-to-list 'remember-handler-functions 'remember-diary-extract-entries)
 ;;
-;; This module recognizes entries of the form
+;; This module recognizes entries of the form (defined by
+;; remember-diary-regexp)
 ;;
 ;;   DIARY: ....
 ;;
@@ -532,13 +533,18 @@ remember-diary-convert-entry
 
 (autoload 'diary-make-entry "diary-lib")
 
+(defcustom remember-diary-regexp "^DIARY:\\s-*\\(.+\\)"
+  "Regexp to extract diary entries."
+  :type 'regexp
+  :version "28.1")
+
 ;;;###autoload
 (defun remember-diary-extract-entries ()
   "Extract diary entries from the region."
   (save-excursion
     (goto-char (point-min))
     (let (list)
-      (while (re-search-forward "^DIARY:\\s-*\\(.+\\)" nil t)
+      (while (re-search-forward remember-diary-regexp nil t)
         (push (remember-diary-convert-entry (match-string 1)) list))
       (when list
         (diary-make-entry (mapconcat 'identity list "\n")
-- 
2.27.0


--=-=-=--




Acknowledgement sent to Gabriel do Nascimento Ribeiro <gabriel376@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#45808; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 20 Jan 2021 17:00:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.