GNU bug report logs - #45809
28.0.50; [PATCH] Add option remember-text-format-function

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 45809 <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 45809 <at> debbugs.gnu.org:


Received: (at 45809) by debbugs.gnu.org; 20 Jan 2021 16:53:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 20 11:53:27 2021
Received: from localhost ([127.0.0.1]:56068 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l2GjX-000855-IO
	for submit <at> debbugs.gnu.org; Wed, 20 Jan 2021 11:53:27 -0500
Received: from quimby.gnus.org ([95.216.78.240]:46658)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1l2GjW-00084r-A9
 for 45809 <at> debbugs.gnu.org; Wed, 20 Jan 2021 11:53:26 -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=NXq1vr0Ijh8cWht/I0bL+jyyc2MWikY7/3VGB8+syn4=; b=r1R+UTAXNk3wV+4kfY027SbKzl
 gI+wL29osH34oJGdLyCEaC3npF6MhYnqfHCbmfGrOyVxdtG33Ar7MNtj8P0PLnoSck4j4hUdoCai7
 kVaNSWQK6cD+1x+u5lLl83S8qAyAdZv1WUq1fI6eNhqiWilg4I02/Q8lSTnKt4iwxKDU=;
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 1l2GjN-0001YQ-6b; Wed, 20 Jan 2021 17:53:19 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Gabriel do Nascimento Ribeiro <gabriel376@HIDDEN>
Subject: Re: bug#45809: 28.0.50; [PATCH] Add option
 remember-text-format-function
References: <CH2PR01MB5879B4CB122EBD7561D4D4D38BAA0@HIDDEN>
X-Now-Playing: Joe Jackson's _Live 1980-86 (2)_: "Memphis"
Date: Wed, 20 Jan 2021 17:53:16 +0100
In-Reply-To: <CH2PR01MB5879B4CB122EBD7561D4D4D38BAA0@HIDDEN>
 (Gabriel do Nascimento Ribeiro's message of "Tue, 12 Jan 2021 00:53:16
 -0300")
Message-ID: <87o8hjpn2b.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:
 > Add option to configure a custom format of text being remembered in >
 remember.el Thanks; applied to Emacs 28. 
 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: 45809
Cc: 45809 <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:

> Add option to configure a custom format of text being remembered in
> remember.el

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#45809; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 12 Jan 2021 03:53:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 11 22:53:31 2021
Received: from localhost ([127.0.0.1]:58886 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kzAkN-0001bu-Av
	for submit <at> debbugs.gnu.org; Mon, 11 Jan 2021 22:53:31 -0500
Received: from lists.gnu.org ([209.51.188.17]:59606)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gabriel376@HIDDEN>) id 1kzAkM-0001bo-BC
 for submit <at> debbugs.gnu.org; Mon, 11 Jan 2021 22:53:30 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:42574)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <gabriel376@HIDDEN>)
 id 1kzAkL-0000cz-QA
 for bug-gnu-emacs@HIDDEN; Mon, 11 Jan 2021 22:53:30 -0500
Received: from mail-dm6nam12olkn2010.outbound.protection.outlook.com
 ([40.92.22.10]:10401 helo=NAM12-DM6-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 1kzAkI-0007Ef-3R
 for bug-gnu-emacs@HIDDEN; Mon, 11 Jan 2021 22:53:29 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=F+5aKiscuLDvi50BDfOS5fvpBdTPYDNnwGvSZmBs7n4Bh0ynEcW5s9hVx1RftmsM0u45ca4J+TEloiCq+xX568MJzKxt9td/YG4mb8ECySeTVCOKyamI3u4+BlXW+ZtDX/94MMWNTLaWUmcTCQcmu1wn1bdKusE/sju62stSSxSnXoS65MUzkQhxaH+J/SqG05lsIZ/R7qEB09kumv4yc1DqtTAkzEulDhM7fCGHrmjLhfwGlyFp+gTJIv8bov6pURmO5k26+ibROeKfLRGtUh1kPWRpVsSxH2YnPB+C7MS3MIHr4MS2Ichjkt41Rc0jOptOW+kswni6F5nk62gJ5g==
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=LBqkbnMcp3Qo5nfTtGpDSatfmUIGuyjthCs2brGtFjk=;
 b=eVGCwlcaf8KzlJFd6puQiw0G1eDfNUJwv7Zc/X0LKH3weYqD8OAxytMcBpcFRTioDjGNgkq+PdWiIXeocyNfcSTil1tY/Tjo0A+9lHxQtxUvQGbUu95WAMcWd0Cari4v/a12pG1FSWIckzkT0rxrLBXXHj95dbkeJhAvwNLg2ZN9J8GCrIc82pjG9Pi02ORox5MeL4u3VY52b8ACv6pDc4U6aEdP/03FcmGizHcef74mN+8Xl1/gDyFa7NBLPo22/OJIsIZj7LMq02J0ZTYW7UO3h+5R85/n39xZTxzyTg3+sHUJXtMf3Gx5MEdeEnSpI84FvuDS9TqUzRf4q1GIBw==
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=LBqkbnMcp3Qo5nfTtGpDSatfmUIGuyjthCs2brGtFjk=;
 b=SBcod1AdwBmo6FCwfHHwxJ+fB/Bh4nWn26jsbDUkakM5kDeay1rfbGMdGqsV+kHCp4Lxcn8LYesBEU3Ln5Zq1EQ87vKSXrJTkxa0Si3hded97pIA5SbZK67pSINmkL5t0XkOql/zvmSp4eqkgyqBLm3ElZKvLOXIubMWsMkh5VU76mk+Gjej6rQfSGWmnRQivzQoN+v0+6NuQFdmj/fpf3btZBz6HA7+1tfL6WuMBfv/Tyct1NJlWjjXFS/pa24loxzoCpWpwIX+R8WwcUMNcScEGSsnPn5w0wRalf5OHHJeTMEe9cOldOXn77O325WypDmD1PDvCgVdokhEk9OafA==
Received: from MW2NAM12FT010.eop-nam12.prod.protection.outlook.com
 (2a01:111:e400:fc65::43) by
 MW2NAM12HT256.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc65::347)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.2; Tue, 12 Jan
 2021 03:53:23 +0000
Received: from CH2PR01MB5879.prod.exchangelabs.com (2a01:111:e400:fc65::43) by
 MW2NAM12FT010.mail.protection.outlook.com (2a01:111:e400:fc65::77)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.2 via Frontend
 Transport; Tue, 12 Jan 2021 03:53:23 +0000
X-IncomingTopHeaderMarker: OriginalChecksum:0379C44C06FB6322CB79AD33AEB21C73FBDF3E25933E1A6B1160D38F68C28B65;
 UpperCasedChecksum:A8391B603FB8B48CE64CE1A1F0470E8639A3AF5AA666B53CE9E841906B177D2F;
 SizeAsReceived:7270; 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:53:23 +0000
From: Gabriel do Nascimento Ribeiro <gabriel376@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.0.50; [PATCH] Add option remember-text-format-function
Date: Tue, 12 Jan 2021 00:53:16 -0300
Message-ID: <CH2PR01MB5879B4CB122EBD7561D4D4D38BAA0@HIDDEN>
Content-Type: multipart/mixed; boundary="=-=-="
X-TMN: [JpeuNFwd0EQNl+efR5a76BswzPHei+V/dcxxku+7QV81DtE68f2ti8Tbbh+pQzVp]
X-ClientProxiedBy: CP5P284CA0022.BRAP284.PROD.OUTLOOK.COM
 (2603:10d6:103:94::9) To CH2PR01MB5879.prod.exchangelabs.com
 (2603:10b6:610:3c::12)
X-Microsoft-Original-Message-ID: <877doig6ab.fsf@HIDDEN>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from precision5540 (2804:431:c7f3:af8f:58c4:f4c3:a2c3:b56e) by
 CP5P284CA0022.BRAP284.PROD.OUTLOOK.COM (2603:10d6:103:94::9) 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 03:53:22 +0000
X-MS-PublicTrafficType: Email
X-IncomingHeaderCount: 42
X-EOPAttributedMessage: 0
X-MS-Office365-Filtering-Correlation-Id: 00f8c29f-1f78-471c-9dfc-08d8b6ad9bc0
X-MS-TrafficTypeDiagnostic: MW2NAM12HT256:
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: pqhEDJE2REx8TX+YaVn59BP/+NnJn3xOH1JgL7N2alSMkN6RTg+5Vyu3eOkZj3RqMuRE/vwoL2h6Xh1bJ0AUX/OYqoMWa/4AHGdjwCzCDLbPER5EC2dq69WXTE3583xLuc0GYNLoyS6P8CYK6kK1CP8c23ySzCv2zwYGX4hywghOa9trSinAJGhFV6Yoe4MposaHxblGI//gySSGlBggTDqp8tcFtTh1VP3fnPSTBdqdbyzfLUOB+3kouCk56GNi
X-MS-Exchange-AntiSpam-MessageData: /2xPmAtBAmqcwvAV2C0H/8V+/03jv14+TAKAiqw41fYPkxld0DCQIuK7uxh5qPk29A/FAW0iQCGsh8HwjDPgqcUrQ/XAII7priQHR7Hluq4Z8nrMabjZ15k7jzUuuRFNcWiAVTCvDFglPFkZlajg93d3jkPF73me66QHQK6MDD81Xjpg12i4ZA/24Wdw5bYGuNFPO0j0NNlBA67YGJig/Q==
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 03:53:23.0954 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-Network-Message-Id: 00f8c29f-1f78-471c-9dfc-08d8b6ad9bc0
X-MS-Exchange-CrossTenant-AuthSource: MW2NAM12FT010.eop-nam12.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: MW2NAM12HT256
Received-SPF: pass client-ip=40.92.22.10; envelope-from=gabriel376@HIDDEN;
 helo=NAM12-DM6-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

Add option to configure a custom format of text being remembered in
remember.el

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

From 436ed1be3a5a44c712468dc98ab222679d3be7ba Mon Sep 17 00:00:00 2001
From: Gabriel do Nascimento Ribeiro <gabriel.nascimento@HIDDEN>
Date: Tue, 12 Jan 2021 00:50:05 -0300
Subject: [PATCH] Add option remember-text-format-function

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

diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el
index 98d3a3856e..0b6baba62c 100644
--- a/lisp/textmodes/remember.el
+++ b/lisp/textmodes/remember.el
@@ -410,13 +410,24 @@ remember-time-format
   :group 'remember
   :version "27.1")
 
+(defcustom remember-text-format-function nil
+  "The function to format the remembered text.
+The function receives the remembered text as argument and should
+return the text to be remembered."
+  :type 'function
+  :group 'remember
+  :version "28.1")
+
 (defun remember-append-to-file ()
   "Remember, with description DESC, the given TEXT."
   (let* ((text (buffer-string))
          (desc (remember-buffer-desc))
-         (remember-text (concat "\n" remember-leader-text
-                                (format-time-string remember-time-format)
-                                " (" desc ")\n\n" text
+         (remember-text (concat "\n"
+                                (if remember-text-format-function
+                                    (funcall remember-text-format-function text)
+                                  (concat remember-leader-text
+                                          (format-time-string remember-time-format)
+                                          " (" desc ")\n\n" text))
                                 (save-excursion (goto-char (point-max))
                                                 (if (bolp) nil "\n"))))
          (buf (find-buffer-visiting remember-data-file)))
-- 
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#45809; 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.