GNU bug report logs - #58487
[PATCH] Allow filtering what items are added to Ecomplete

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Thu, 13 Oct 2022 10:07:02 UTC

Severity: wishlist

Tags: patch

Done: Philip Kaludercic <philipk <at> posteo.net>

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 58487 in the body.
You can then email your comments to 58487 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#58487; Package emacs. (Thu, 13 Oct 2022 10:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Philip Kaludercic <philipk <at> posteo.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 13 Oct 2022 10:07:02 GMT) Full text and rfc822 format available.

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

From: Philip Kaludercic <philipk <at> posteo.net>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Allow filtering what items are added to Ecomplete
Date: Thu, 13 Oct 2022 10:06:07 +0000
[Message part 1 (text/plain, inline)]
Tags: patch


I've had this as a customisation in my local .emacs file, implemented as
advice around ecomplete-add-item:

--8<---------------cut here---------------start------------->8---
(define-advice ecomplete-add-item (:around (oldfun type key text))
  "Filter out common pseudo addresses from the database.
OLDFUN is `ecomplete-add-item', passed by `advice-add', that will
be invoked with TYPE, KEY and TEXT if KEY doesn't match a known
address I don't care about."
  (unless (string-match-p
           (rx (or (: "@noreply.github.com" eos)
                   (: "@reply.github.com" eos)
                   (: bos "notifications <at> github.com" eos)
                   (: "@debbugs.gnu.org" eos)))
           key)
    (funcall oldfun type key text)))
--8<---------------cut here---------------end--------------->8---

Having this as a regular option seems preferable to me, so I'd like to
suggest it here.

In GNU Emacs 29.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version
 3.24.34, cairo version 1.17.6) of 2022-10-13 built on rhea
Repository revision: 0b170c6caeeb669df3cf97c54c43da9cf77e6b42
Repository branch: master
System Description: Fedora Linux 36 (Workstation Edition)

Configured using:
 'configure --with-pgtk --with-imagemagick'

[0001-Allow-filtering-what-items-are-added-to-Ecomplete.patch (text/patch, attachment)]

Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 13 Oct 2022 13:48:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58487; Package emacs. (Thu, 13 Oct 2022 18:02:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 58487 <at> debbugs.gnu.org
Subject: Re: bug#58487: [PATCH] Allow filtering what items are added to
 Ecomplete
Date: Thu, 13 Oct 2022 20:00:49 +0200
Philip Kaludercic <philipk <at> posteo.net> writes:

> * lisp/ecomplete.el (ecomplete-filter-regexp): Add new option.
> (ecomplete-add-item): Respect new option.

Makes sense to me; please go ahead and push.




Reply sent to Philip Kaludercic <philipk <at> posteo.net>:
You have taken responsibility. (Fri, 14 Oct 2022 18:14:02 GMT) Full text and rfc822 format available.

Notification sent to Philip Kaludercic <philipk <at> posteo.net>:
bug acknowledged by developer. (Fri, 14 Oct 2022 18:14:03 GMT) Full text and rfc822 format available.

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

From: Philip Kaludercic <philipk <at> posteo.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 58487-done <at> debbugs.gnu.org
Subject: Re: bug#58487: [PATCH] Allow filtering what items are added to
 Ecomplete
Date: Fri, 14 Oct 2022 18:13:41 +0000
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Philip Kaludercic <philipk <at> posteo.net> writes:
>
>> * lisp/ecomplete.el (ecomplete-filter-regexp): Add new option.
>> (ecomplete-add-item): Respect new option.
>
> Makes sense to me; please go ahead and push.

Done




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 12 Nov 2022 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 271 days ago.

Previous Next


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