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

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Mon, 16 Sep 2019 01:56:04 UTC

Severity: normal

Tags: patch

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37418 in the body.
You can then email your comments to 37418 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#37418; Package emacs. (Mon, 16 Sep 2019 01:56:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Kangas <stefan <at> marxist.se>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 16 Sep 2019 01:56:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Add new function to clear tags in tabulated list
Date: Mon, 16 Sep 2019 03:54:57 +0200
[Message part 1 (text/plain, inline)]
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
[0001-Add-new-function-to-clear-tags-in-tabulated-list.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37418; Package emacs. (Fri, 20 Sep 2019 17:55:02 GMT) Full text and rfc822 format available.

Message #8 received at 37418 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 37418 <at> debbugs.gnu.org
Subject: Re: bug#37418: [PATCH] Add new function to clear tags in tabulated
 list
Date: Fri, 20 Sep 2019 19:54:51 +0200
Stefan Kangas <stefan <at> marxist.se> 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




Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Thu, 26 Sep 2019 15:38:02 GMT) Full text and rfc822 format available.

Notification sent to Stefan Kangas <stefan <at> marxist.se>:
bug acknowledged by developer. (Thu, 26 Sep 2019 15:38:02 GMT) Full text and rfc822 format available.

Message #13 received at 37418-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 37418-done <at> debbugs.gnu.org
Subject: Re: bug#37418: [PATCH] Add new function to clear tags in tabulated
 list
Date: Thu, 26 Sep 2019 17:36:42 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> 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.  :-)

Thanks for taking a look.  Since there have been no further comments
in a week, I have pushed this patch with your suggestion as commit
814cab3b4d.

(I forgot to reference the bug number in the commit message.  Sorry about that.)

Best regards,
Stefan Kangas




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 25 Oct 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 157 days ago.

Previous Next


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