[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20116: 24.4.91; [PATCH]Don't use iswitchb in erc.

From: Stefan Monnier
Subject: bug#20116: 24.4.91; [PATCH]Don't use iswitchb in erc.
Date: Mon, 16 Mar 2015 09:07:12 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> 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

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]