all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Carlos Pita <carlosjosepita@gmail.com>
To: 11360@debbugs.gnu.org
Subject: bug#11360: none
Date: Thu, 11 Sep 2014 16:58:13 -0300	[thread overview]
Message-ID: <8738byrktm.fsf@gmail.com> (raw)
In-Reply-To: <87a966rm2r.fsf@gmail.com> (Carlos Pita's message of "Thu, 11 Sep 2014 16:31:08 -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@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





      reply	other threads:[~2014-09-11 19:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-27 13:38 bug#11360: ERC completion case-sensitive Antoine Levitt
2012-05-05  3:11 ` Stefan Monnier
2012-05-05  7:49   ` Antoine Levitt
2016-02-05 13:38     ` Stefan Monnier
2016-02-06  3:17       ` Lars Ingebrigtsen
2016-02-06 14:06         ` Stefan Monnier
2013-07-01 12:52 ` bug#11360: Case sensitive ERC nick completion regression Barry Warsaw
2013-07-30 20:46   ` Stefan Monnier
2015-12-27 21:26     ` Lars Ingebrigtsen
2016-01-12 19:02       ` Barry Warsaw
2016-02-04  6:45         ` Lars Ingebrigtsen
2016-02-05 19:08           ` Barry Warsaw
2014-09-11 19:31 ` bug#11360: (no subject) Carlos Pita
2014-09-11 19:58   ` Carlos Pita [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8738byrktm.fsf@gmail.com \
    --to=carlosjosepita@gmail.com \
    --cc=11360@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.