GNU bug report logs - #18509
24.3.93; [patch] erc completion case inconsistency

Previous Next

Package: emacs;

Reported by: Carlos Pita <carlosjosepita <at> gmail.com>

Date: Fri, 19 Sep 2014 14:03:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 24.3.93

Fixed in version 25.1

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

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 18509 in the body.
You can then email your comments to 18509 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#18509; Package emacs. (Fri, 19 Sep 2014 14:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carlos Pita <carlosjosepita <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 19 Sep 2014 14:03:02 GMT) Full text and rfc822 format available.

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

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.93; [patch] erc completion case inconsistency
Date: Fri, 19 Sep 2014 11:01:58 -0300
(The following was a follow up to bug #11360, but I decided to report it
separately as they're not quite the same issues and, also, because I
know how to fix this one but not the other.)

When using the bitlbee channel (this is the example I have, the issue is
not specific to bitlbee at all), 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.

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 issue. I'm not attaching an
explicit patch as the fix is quite trivial, but the resulting
pcomplete-erc-all-nicks should look like:



(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
                              ;; change this -----.
                              ;;                  v
                              (concat (erc-server-user-nickname user) postfix)
                              nicks)))
               erc-server-users))
      nicks))



Best regards
--
Carlos


------------------------------------------------------------

In GNU Emacs 24.3.93.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2)
 of 2014-09-11 on archiso
Windowing system distributor `The X.Org Foundation', version 11.0.11600000
Configured using:
 `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
 --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18509; Package emacs. (Sun, 27 Dec 2015 20:44:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Carlos Pita <carlosjosepita <at> gmail.com>
Cc: 18509 <at> debbugs.gnu.org
Subject: Re: bug#18509: 24.3.93; [patch] erc completion case inconsistency
Date: Sun, 27 Dec 2015 21:43:16 +0100
Carlos Pita <carlosjosepita <at> gmail.com> writes:

> Changing (erc-server-user-nickname user) for nick in
> pcomplete-erc-all-nicks will fix this issue. I'm not attaching an
> explicit patch as the fix is quite trivial, but the resulting
> pcomplete-erc-all-nicks should look like:

Can you send a patch for this instead?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18509; Package emacs. (Thu, 04 Feb 2016 06:05:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Carlos Pita <carlosjosepita <at> gmail.com>
Cc: 18509 <at> debbugs.gnu.org
Subject: Re: bug#18509: 24.3.93; [patch] erc completion case inconsistency
Date: Thu, 04 Feb 2016 17:03:47 +1100
Carlos Pita <carlosjosepita <at> gmail.com> writes:

> Changing (erc-server-user-nickname user) for nick in
> pcomplete-erc-all-nicks will fix this issue. I'm not attaching an
> explicit patch as the fix is quite trivial, but the resulting
> pcomplete-erc-all-nicks should look like:

Thanks; installed in emacs-25.

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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 04 Feb 2016 06:05:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 25.1, send any further explanations to 18509 <at> debbugs.gnu.org and Carlos Pita <carlosjosepita <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 04 Feb 2016 06:05:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 03 Mar 2016 12:24:03 GMT) Full text and rfc822 format available.

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

Previous Next


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