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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#58487: closed ([PATCH] Allow filtering what items are added
 to Ecomplete)
Date: Fri, 14 Oct 2022 18:14:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 14 Oct 2022 18:13:41 +0000
with message-id <87zgdy6zoq.fsf <at> posteo.net>
and subject line Re: bug#58487: [PATCH] Allow filtering what items are added to Ecomplete
has caused the debbugs.gnu.org bug report #58487,
regarding [PATCH] Allow filtering what items are added to Ecomplete
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
58487: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58487
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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 3 (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)]
[Message part 5 (message/rfc822, inline)]
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


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

Previous Next


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