From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Cc: 20116@debbugs.gnu.org
Subject: bug#20116: 24.4.91; [PATCH]Don't use iswitchb in erc.
Date: Mon, 16 Mar 2015 09:07:12 -0400 [thread overview]
Message-ID: <jwvk2yhkset.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <878uexpeqr.fsf@gmail.com> (Thierry Volpiatto's message of "Mon, 16 Mar 2015 08:45:32 +0100")
> 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
next prev parent reply other threads:[~2015-03-16 13:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-16 7:45 bug#20116: 24.4.91; [PATCH]Don't use iswitchb in erc Thierry Volpiatto
2015-03-16 13:07 ` Stefan Monnier [this message]
2015-03-16 14:01 ` Thierry Volpiatto
2015-03-16 18:49 ` Stefan Monnier
2015-03-16 18:58 ` Thierry Volpiatto
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvk2yhkset.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=20116@debbugs.gnu.org \
--cc=thierry.volpiatto@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).