GNU bug report logs - #37418
[PATCH] Add new function to clear tags in tabulated list

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: Stefan Kangas <stefan@HIDDEN>; Keywords: patch; dated Mon, 16 Sep 2019 01:56:04 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 37418) by debbugs.gnu.org; 20 Sep 2019 17:54:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 20 13:54:57 2019
Received: from localhost ([127.0.0.1]:58422 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBN7R-0007gW-7m
	for submit <at> debbugs.gnu.org; Fri, 20 Sep 2019 13:54:57 -0400
Received: from quimby.gnus.org ([80.91.231.51]:60774)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iBN7P-0007gM-Tk
 for 37418 <at> debbugs.gnu.org; Fri, 20 Sep 2019 13:54:56 -0400
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <larsi@HIDDEN>)
 id 1iBN7L-00049q-Hy; Fri, 20 Sep 2019 19:54:53 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
Subject: Re: bug#37418: [PATCH] Add new function to clear tags in tabulated
 list
References: <CADwFkm=MuOPciZBwPc77KnV_99OF4JM+d-QdzLW9sObkirP-PQ@HIDDEN>
Date: Fri, 20 Sep 2019 19:54:51 +0200
In-Reply-To: <CADwFkm=MuOPciZBwPc77KnV_99OF4JM+d-QdzLW9sObkirP-PQ@HIDDEN>
 (Stefan Kangas's message of "Mon, 16 Sep 2019 03:54:57 +0200")
Message-ID: <87a7ayam50.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.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:  Stefan Kangas <stefan@HIDDEN> writes: > I found myself
 wanting to clear all tags in *Packages* buffer, but it > made more sense
 to implement this as general functionality in > tabulated list mode. How does
 it look? 
 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: 37418
Cc: 37418 <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 (-)

Stefan Kangas <stefan@HIDDEN> writes:

> I found myself wanting to clear all tags in *Packages* buffer, but it
> made more sense to implement this as general functionality in
> tabulated list mode.  How does it look?

[...]

> +(defun tabulated-list-clear-all-tags ()
> +  "Clear all tags from the padding area in the current buffer."
> +  (unless (> tabulated-list-padding 0)
> +    (error "There can be no tags in current buffer"))
> +  (save-excursion
> +    (goto-char (point-min))
> +    (let ((inhibit-read-only t)
> +          ;; Match non-space in the first n characters.
> +          (re (format "^ \\{0,%s\\}[^ ]" (1- tabulated-list-padding)))
> +          (empty (make-string tabulated-list-padding ? )))
> +      (while (re-search-forward re nil 'noerror)
> +        (tabulated-list-put-tag empty)))))

I think it's a good command to add, but I'm not familiar enough with how
tabulated list mode works, so my the only nit-pick I have to add here is
that the %s should be a %d here.  :-)

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




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

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


Received: (at submit) by debbugs.gnu.org; 16 Sep 2019 01:55:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 15 21:55:15 2019
Received: from localhost ([127.0.0.1]:48954 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9gEU-0004zY-Ob
	for submit <at> debbugs.gnu.org; Sun, 15 Sep 2019 21:55:15 -0400
Received: from lists.gnu.org ([209.51.188.17]:42125)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1i9gES-0004zQ-Oc
 for submit <at> debbugs.gnu.org; Sun, 15 Sep 2019 21:55:13 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47387)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <stefankangas@HIDDEN>) id 1i9gER-0002es-Gh
 for bug-gnu-emacs@HIDDEN; Sun, 15 Sep 2019 21:55:12 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: **
X-Spam-Status: No, score=2.9 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 RCVD_IN_DNSWL_NONE,SPOOFED_FREEMAIL autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <stefankangas@HIDDEN>) id 1i9gEQ-0000lv-Gz
 for bug-gnu-emacs@HIDDEN; Sun, 15 Sep 2019 21:55:11 -0400
Received: from mail-pg1-f172.google.com ([209.85.215.172]:43980)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <stefankangas@HIDDEN>)
 id 1i9gEQ-0000kJ-BC
 for bug-gnu-emacs@HIDDEN; Sun, 15 Sep 2019 21:55:10 -0400
Received: by mail-pg1-f172.google.com with SMTP id u72so18778068pgb.10
 for <bug-gnu-emacs@HIDDEN>; Sun, 15 Sep 2019 18:55:10 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=+PHrvqwHKNwegTsDKma6ND11DNpRPI+LaBnxFzLVJEk=;
 b=ihkNzBJz7EJLfgXA4I49UpGAiGnIDchGLhY0UgJI7iXKS7TWK+DNGWbbesSIPQGZi/
 7G+5FtWZ0XO3Fahr/DAfTI7aEsTmCC6Tonfs/LwV+zrzE0N/dAyC6C8joKMOQw/rRVP6
 x9azC0QUGtnm4RHCq7JJlb0YDYzLJLwPcVKICN4QKb06U+a3l5FgpxvEl5oyjiUs+FEV
 3NWdNB2UocfYi0sEOlklXE2IuJIy9rERmXtrsZZyU/XxoursDg92qD3NQYuH55KesbQk
 AEQTQRMXxrS6tDQqwbeFPn8daDAlEj8BcT5KIAiyy440xGCtTUQBxvNXS7I2Px1spoVl
 zItA==
X-Gm-Message-State: APjAAAVEFDBWP8RzKh/phLnzdda/LeyIPsg7NHaEq6naOczgcjy7yeCG
 xPAQnVq6tnxyMOT7hYI05k34165MkW9ThAiERxSYUg==
X-Google-Smtp-Source: APXvYqxU9aSIBJX4Kwde8VK+qfMlk6ielJxZapOxldZ0p/RIzDaB2JQWyiq75y3RZ8Fehb4A0UCp94OIYZTZiPPTCuY=
X-Received: by 2002:a63:4c5c:: with SMTP id m28mr56748940pgl.333.1568598908622; 
 Sun, 15 Sep 2019 18:55:08 -0700 (PDT)
MIME-Version: 1.0
From: Stefan Kangas <stefan@HIDDEN>
Date: Mon, 16 Sep 2019 03:54:57 +0200
Message-ID: <CADwFkm=MuOPciZBwPc77KnV_99OF4JM+d-QdzLW9sObkirP-PQ@HIDDEN>
Subject: [PATCH] Add new function to clear tags in tabulated list
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/mixed; boundary="000000000000be907e0592a1e462"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 209.85.215.172
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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
 the administrator of that system for details.
 Content preview: I found myself wanting to clear all tags in *Packages* buffer,
 but it made more sense to implement this as general functionality in tabulated
 list mode. How does it look? Best regards,
 Stefan Kangas From 2cdd76d8d98835fa42ebd8b503bfc416563b1bd1
 Mon Sep 17 00:00:00 2001 From: Stefan Kangas <stefankangas@HIDDEN> Date:
 Mon, 16 Sep 2019 03:48:47 +0200 Subject: [PATCH] Add new function to clear
 tag [...] 
 Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
 mail domains are different
 -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,
 medium trust [209.51.188.17 listed in list.dnswl.org]
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (stefankangas[at]gmail.com)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
 EnvelopeFrom freemail headers are different
 2.1 SPOOFED_FREEMAIL       No description available.
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: 0.3 (/)

--000000000000be907e0592a1e462
Content-Type: text/plain; charset="UTF-8"

I found myself wanting to clear all tags in *Packages* buffer, but it
made more sense to implement this as general functionality in
tabulated list mode.  How does it look?

Best regards,
Stefan Kangas

--000000000000be907e0592a1e462
Content-Type: text/x-patch; charset="US-ASCII"; 
	name="0001-Add-new-function-to-clear-tags-in-tabulated-list.patch"
Content-Disposition: attachment; 
	filename="0001-Add-new-function-to-clear-tags-in-tabulated-list.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_k0lr8ns30>
X-Attachment-Id: f_k0lr8ns30

RnJvbSAyY2RkNzZkOGQ5ODgzNWZhNDJlYmQ4YjUwM2JmYzQxNjU2M2IxYmQxIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiB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pc3QtcGFkZGluZyA/ICkpKQorICAgICAgKHdoaWxlIChyZS1zZWFyY2gtZm9yd2FyZCByZSBu
aWwgJ25vZXJyb3IpCisgICAgICAgICh0YWJ1bGF0ZWQtbGlzdC1wdXQtdGFnIGVtcHR5KSkpKSkK
KwogKGRlZnZhciB0YWJ1bGF0ZWQtbGlzdC1tb2RlLW1hcAogICAobGV0ICgobWFwIChtYWtlLXNw
YXJzZS1rZXltYXApKSkKICAgICAoc2V0LWtleW1hcC1wYXJlbnQgbWFwIChtYWtlLWNvbXBvc2Vk
LWtleW1hcAotLSAKMi4yMC4xCgo=
--000000000000be907e0592a1e462--




Acknowledgement sent to Stefan Kangas <stefan@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#37418; 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: Fri, 20 Sep 2019 18:00:02 UTC

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