GNU bug report logs - #20116
24.4.91; [PATCH]Don't use iswitchb in erc.

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Mon, 16 Mar 2015 07:47:02 UTC

Severity: normal

Tags: patch

Found in version 24.4.91

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 20116 <at> debbugs.gnu.org
Subject: Re: bug#20116: 24.4.91; [PATCH]Don't use iswitchb in erc.
Date: Mon, 16 Mar 2015 09:07:12 -0400
> Using completing-read allow ido user to use ido, helm users helm etc...

Indeed, thanks.

> +  (switch-to-buffer
> +   (completing-read "Switch-to: "
> +                    (mapcar 'buffer-name
> +                            (erc-buffer-list
> +                             nil
> +                             (when arg erc-server-process)))
> +                    nil t nil nil
> +                    (when (boundp 'erc-modified-channels-alist)
> +                      (buffer-name (caar (last erc-modified-channels-alist)))))))  

Compared to `C-x b' this loses the ability to obey the
completion-category-overrides setting for buffers (i.e. it won't
default to substring matches).  Also it won't obey
read-buffer-completion-ignore-case.

I suggest you try and use `read-buffer' instead of `completing-read'.
IIUC this will require changes at the C level to add a `predicate'
argument to `read-buffer'.  And I see this will then have to break
backward compatibility since read-buffer-function will end up with
a new argument.


        Stefan




This bug report was last modified 10 years and 73 days ago.

Previous Next


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