GNU bug report logs - #11360
ERC completion case-sensitive

Previous Next

Package: emacs;

Reported by: Antoine Levitt <antoine.levitt <at> gmail.com>

Date: Fri, 27 Apr 2012 13:41:02 UTC

Severity: normal

Tags: fixed

Fixed in version 25.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: 11360 <at> debbugs.gnu.org
Subject: Re: none
Date: Thu, 11 Sep 2014 16:58:13 -0300
I've been debugging a bit. Below is a fix for the case inconsistency
issue.

The case inconsistency is due to the fact that users are hashed into
erc-server-users using (erc-downcase nick). But then
pcomplete-erc-all-nicks builds the completion list from the hash
keys. This is wrong because the keys are the downcased nicks, not the
real nicks themselves. This is also inconsistent with the way
pcomplete-erc-nicks works (this one does use the real nick).

Changing (erc-server-user-nickname user) for nick in
pcomplete-erc-all-nicks will fix this one:

(defun pcomplete-erc-all-nicks (&optional postfix)
  "Returns a list of all nicks on the current server."
  (let (nicks)
    (erc-with-server-buffer
      (maphash (lambda (nick user)
                 (setq nicks (cons
                              (concat (erc-server-user-nickname user) postfix)
                              nicks)))
               erc-server-users))
      nicks))

Best regards
--
Carlos

Carlos Pita <carlosjosepita <at> gmail.com> writes:

> I'm having the same problem with the latest pretest.
>
> Even worst, when using bitlbee, tab completion on an empty line gives:
>
> FirstName
> SecondName
> ....
>
> But tab completion after /query gives:
>
> firstname
> secondname
> ....
>
> This is not only visually inconsistent but, as the completion is case
> sensitive, then that a given prefix successfully completes depends on
> where the completion was triggered.
>
> Best regards
> --
> Carlos




This bug report was last modified 9 years and 164 days ago.

Previous Next


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