all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to select one of the buffers that match a substring in "switch-to-buffer"?
@ 2015-06-08 16:47 KARR, DAVID
  2015-06-08 17:01 ` Dmitry Gutov
  2015-06-08 18:05 ` Drew Adams
  0 siblings, 2 replies; 11+ messages in thread
From: KARR, DAVID @ 2015-06-08 16:47 UTC (permalink / raw
  To: help-gnu-emacs@gnu.org

I remember in an older "switch-to-buffer" user interface, if I typed a substring of a buffer name that matched more than one buffer, there was a convenient interface that let me select one of the choices, even if the substring I entered didn't start at the beginning of the file name.  I think that might have been called "iswitchb", but I think that's been deprecated.  In the current interface, it lists the buffer names that match the substring, but it appears that all I can do at this point is erase what I've entered so far and then enter the string that begins the buffer name I want.

Is there any way to get the "old and enhanced" behavior?



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to select one of the buffers that match a substring in "switch-to-buffer"?
  2015-06-08 16:47 How to select one of the buffers that match a substring in "switch-to-buffer"? KARR, DAVID
@ 2015-06-08 17:01 ` Dmitry Gutov
  2015-06-08 18:05 ` Drew Adams
  1 sibling, 0 replies; 11+ messages in thread
From: Dmitry Gutov @ 2015-06-08 17:01 UTC (permalink / raw
  To: KARR, DAVID, help-gnu-emacs@gnu.org

On 06/08/2015 07:47 PM, KARR, DAVID wrote:
> I remember in an older "switch-to-buffer" user interface, if I typed a substring of a buffer name that matched more than one buffer, there was a convenient interface that let me select one of the choices, even if the substring I entered didn't start at the beginning of the file name.  I think that might have been called "iswitchb", but I think that's been deprecated.  In the current interface, it lists the buffer names that match the substring, but it appears that all I can do at this point is erase what I've entered so far and then enter the string that begins the buffer name I want.
>
> Is there any way to get the "old and enhanced" behavior?

You can try icomplete-mode or ido-mode instead.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: How to select one of the buffers that match a substring in "switch-to-buffer"?
  2015-06-08 16:47 How to select one of the buffers that match a substring in "switch-to-buffer"? KARR, DAVID
  2015-06-08 17:01 ` Dmitry Gutov
@ 2015-06-08 18:05 ` Drew Adams
  2015-06-08 18:39   ` KARR, DAVID
  1 sibling, 1 reply; 11+ messages in thread
From: Drew Adams @ 2015-06-08 18:05 UTC (permalink / raw
  To: KARR, DAVID, help-gnu-emacs

> "iswitchb", but I think that's been deprecated...
> Is there any way to get the "old and enhanced" behavior?

`icomplete-mode' is the official replacement for `iswitchb', AFAIK.

Icicles completion will also give you what you want.  Likewise,
`ido-mode'.  Also, in the scenario you described (vanilla `C-x b'),
you can type some more chars to continue completing (with TAB).



^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: How to select one of the buffers that match a substring in "switch-to-buffer"?
  2015-06-08 18:05 ` Drew Adams
@ 2015-06-08 18:39   ` KARR, DAVID
  2015-06-08 18:59     ` Tassilo Horn
                       ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: KARR, DAVID @ 2015-06-08 18:39 UTC (permalink / raw
  To: Drew Adams, help-gnu-emacs@gnu.org



> -----Original Message-----
> From: Drew Adams [mailto:drew.adams@oracle.com]
> Sent: Monday, June 08, 2015 11:05 AM
> To: KARR, DAVID; help-gnu-emacs@gnu.org
> Subject: RE: How to select one of the buffers that match a
> substring in "switch-to-buffer"?
> 
> > "iswitchb", but I think that's been deprecated...
> > Is there any way to get the "old and enhanced" behavior?
> 
> `icomplete-mode' is the official replacement for `iswitchb', AFAIK.
> 
> Icicles completion will also give you what you want.  Likewise,
> `ido-mode'.  Also, in the scenario you described (vanilla `C-x b'),
> you can type some more chars to continue completing (with TAB).

I already have icomplete enabled.  It's useless if you've typed a substring that doesn't represent the start of the file name.

Icicles appears to be closer to what I need.  I'll have to use it a bit more so my fingers remember whether this gives me what iswitchb gave me before.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to select one of the buffers that match a substring in "switch-to-buffer"?
  2015-06-08 18:39   ` KARR, DAVID
@ 2015-06-08 18:59     ` Tassilo Horn
  2015-06-08 19:09       ` KARR, DAVID
  2015-06-08 20:05     ` Drew Adams
       [not found]     ` <mailman.4643.1433794001.904.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 11+ messages in thread
From: Tassilo Horn @ 2015-06-08 18:59 UTC (permalink / raw
  To: KARR, DAVID; +Cc: help-gnu-emacs@gnu.org

"KARR, DAVID" <dk068x@att.com> writes:

>> `icomplete-mode' is the official replacement for `iswitchb', AFAIK.
>> 
>> Icicles completion will also give you what you want.  Likewise,
>> `ido-mode'.  Also, in the scenario you described (vanilla `C-x b'),
>> you can type some more chars to continue completing (with TAB).
>
> I already have icomplete enabled.  It's useless if you've typed a
> substring that doesn't represent the start of the file name.

But it should work for buffers, no?

If so, the reason why it doesn't work for file name completion is
because there, emacs doesn't use substring completion.  But you can
configure it to do so.

,----[ C-h v completion-category-overrides RET ]
| completion-category-overrides is a variable defined in ‘minibuffer.el’.
| Its value is nil.
| 
| Documentation:
| List of category-specific user overrides for completion styles.
| Each override has the shape (CATEGORY . ALIST) where ALIST is
| an association list that can specify properties such as:
| - ‘styles’: the list of ‘completion-styles’ to use for that category.
| - ‘cycle’: the ‘completion-cycle-threshold’ to use for that category.
| Categories are symbols such as ‘buffer’ and ‘file’, used when
| completing buffer and file names, respectively.
| This overrides the defaults specified in ‘completion-category-defaults’.
`----

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: How to select one of the buffers that match a substring in "switch-to-buffer"?
  2015-06-08 18:59     ` Tassilo Horn
@ 2015-06-08 19:09       ` KARR, DAVID
  2015-06-08 19:19         ` Tassilo Horn
  0 siblings, 1 reply; 11+ messages in thread
From: KARR, DAVID @ 2015-06-08 19:09 UTC (permalink / raw
  To: Tassilo Horn; +Cc: help-gnu-emacs@gnu.org

> -----Original Message-----
> From: Tassilo Horn [mailto:tsdh@gnu.org]
> Sent: Monday, June 08, 2015 11:59 AM
> To: KARR, DAVID
> Cc: Drew Adams; help-gnu-emacs@gnu.org
> Subject: Re: How to select one of the buffers that match a
> substring in "switch-to-buffer"?
> 
> "KARR, DAVID" <dk068x@att.com> writes:
> 
> >> `icomplete-mode' is the official replacement for `iswitchb',
> AFAIK.
> >>
> >> Icicles completion will also give you what you want.  Likewise,
> >> `ido-mode'.  Also, in the scenario you described (vanilla `C-x
> b'),
> >> you can type some more chars to continue completing (with TAB).
> >
> > I already have icomplete enabled.  It's useless if you've typed a
> > substring that doesn't represent the start of the file name.
> 
> But it should work for buffers, no?
> 
> If so, the reason why it doesn't work for file name completion is
> because there, emacs doesn't use substring completion.  But you can
> configure it to do so.
> 
> ,----[ C-h v completion-category-overrides RET ]
> | completion-category-overrides is a variable defined in
> ‘minibuffer.el’.
> | Its value is nil.
> |
> | Documentation:
> | List of category-specific user overrides for completion styles.
> | Each override has the shape (CATEGORY . ALIST) where ALIST is
> | an association list that can specify properties such as:
> | - ‘styles’: the list of ‘completion-styles’ to use for that
> category.
> | - ‘cycle’: the ‘completion-cycle-threshold’ to use for that
> category.
> | Categories are symbols such as ‘buffer’ and ‘file’, used when
> | completing buffer and file names, respectively.
> | This overrides the defaults specified in ‘completion-category-
> defaults’.
> `----

Would this variable have changed after I installed Icicles?  Its present value is "((buffer (styles basic substring)))".

In any case, installing Icicles appears to give me what I need.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to select one of the buffers that match a substring in "switch-to-buffer"?
  2015-06-08 19:09       ` KARR, DAVID
@ 2015-06-08 19:19         ` Tassilo Horn
  0 siblings, 0 replies; 11+ messages in thread
From: Tassilo Horn @ 2015-06-08 19:19 UTC (permalink / raw
  To: KARR, DAVID; +Cc: help-gnu-emacs@gnu.org

"KARR, DAVID" <dk068x@att.com> writes:

>> ,----[ C-h v completion-category-overrides RET ]
>> | completion-category-overrides is a variable defined in
>> ‘minibuffer.el’.
>> | Its value is nil.
>> |
>> | Documentation:
>> | List of category-specific user overrides for completion styles.
>> | Each override has the shape (CATEGORY . ALIST) where ALIST is
>> | an association list that can specify properties such as:
>> | - ‘styles’: the list of ‘completion-styles’ to use for that
>> category.
>> | - ‘cycle’: the ‘completion-cycle-threshold’ to use for that
>> category.
>> | Categories are symbols such as ‘buffer’ and ‘file’, used when
>> | completing buffer and file names, respectively.
>> | This overrides the defaults specified in ‘completion-category-
>> defaults’.
>> `----
>
> Would this variable have changed after I installed Icicles?

No.  I just told you in case you want to give icomplete another try.

> Its present value is "((buffer (styles basic substring)))".

Yes.  And its meaning is that with buffer completion, the basic and
substring completion styles are used.  If you also wanted substring
completion for file names, you'd add a similar entry, e.g.,

  (add-to-list 'completion-category-overrides
               '(file (styles basic substring)))

> In any case, installing Icicles appears to give me what I need.

Yes, that's another option.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: How to select one of the buffers that match a substring in "switch-to-buffer"?
  2015-06-08 18:39   ` KARR, DAVID
  2015-06-08 18:59     ` Tassilo Horn
@ 2015-06-08 20:05     ` Drew Adams
       [not found]     ` <mailman.4643.1433794001.904.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 11+ messages in thread
From: Drew Adams @ 2015-06-08 20:05 UTC (permalink / raw
  To: KARR, DAVID, help-gnu-emacs

> I already have icomplete enabled.  It's useless if you've typed a
> substring that doesn't represent the start of the file name.

GNU Emacs specifically deprecated IswitchB in favor of Icomplete mode.
Perhaps they were wrong to do so?

Icomplete mode is supposed to be as featureful as IswitchB.  If you
find that this is not the case, please consider filing a bug report
or enhancement request.  Use `M-x report-emacs-bug' to do either.

> Icicles appears to be closer to what I need.  I'll have to use it a
> bit more so my fingers remember whether this gives me what iswitchb
> gave me before.

Also: You can still find IswitchB here: http://cvs.savannah.gnu.org/viewvc/*checkout*/emacs/emacs/lisp/iswitchb.el
The fact that it is no longer distributed with Emacs does not mean
that you can't still use it.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to select one of the buffers that match a substring in "switch-to-buffer"?
       [not found]     ` <mailman.4643.1433794001.904.help-gnu-emacs@gnu.org>
@ 2015-06-08 20:33       ` Stefan Monnier
  2015-06-08 22:10         ` Drew Adams
       [not found]         ` <mailman.4653.1433801416.904.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 11+ messages in thread
From: Stefan Monnier @ 2015-06-08 20:33 UTC (permalink / raw
  To: help-gnu-emacs

> The fact that it is no longer distributed with Emacs does not mean
> that you can't still use it.

Huh?  It's still very much distributed with Emacs.
It's just not auto-loaded, so you need to (require 'iswtchb) if you
want it.
That's been the standard way to handle obsoleted packages for the last
... 10 years at least.



        Stefan


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: How to select one of the buffers that match a substring in "switch-to-buffer"?
  2015-06-08 20:33       ` Stefan Monnier
@ 2015-06-08 22:10         ` Drew Adams
       [not found]         ` <mailman.4653.1433801416.904.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 11+ messages in thread
From: Drew Adams @ 2015-06-08 22:10 UTC (permalink / raw
  To: Stefan Monnier, help-gnu-emacs

> > The fact that it is no longer distributed with Emacs does not mean
> > that you can't still use it.
> 
> Huh?  It's still very much distributed with Emacs.  It's just not
> auto-loaded, so you need to (require 'iswtchb) if you want it.

I stand corrected; thx.  So much the better.

And then there's this:
http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00144.html

And this thread, which discusses icomplete vs iswitchb:
http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00135.html



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to select one of the buffers that match a substring in "switch-to-buffer"?
       [not found]         ` <mailman.4653.1433801416.904.help-gnu-emacs@gnu.org>
@ 2015-06-08 22:34           ` Stefan Monnier
  0 siblings, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2015-06-08 22:34 UTC (permalink / raw
  To: help-gnu-emacs

>> > The fact that it is no longer distributed with Emacs does not mean
>> > that you can't still use it.
>> Huh?  It's still very much distributed with Emacs.  It's just not
>> auto-loaded, so you need to (require 'iswtchb) if you want it.
> I stand corrected; thx.  So much the better.

Oh, right, actually it's still autoloaded (contrary to all other
packages in lisp/obsolete).


        Stefan


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-06-08 22:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-08 16:47 How to select one of the buffers that match a substring in "switch-to-buffer"? KARR, DAVID
2015-06-08 17:01 ` Dmitry Gutov
2015-06-08 18:05 ` Drew Adams
2015-06-08 18:39   ` KARR, DAVID
2015-06-08 18:59     ` Tassilo Horn
2015-06-08 19:09       ` KARR, DAVID
2015-06-08 19:19         ` Tassilo Horn
2015-06-08 20:05     ` Drew Adams
     [not found]     ` <mailman.4643.1433794001.904.help-gnu-emacs@gnu.org>
2015-06-08 20:33       ` Stefan Monnier
2015-06-08 22:10         ` Drew Adams
     [not found]         ` <mailman.4653.1433801416.904.help-gnu-emacs@gnu.org>
2015-06-08 22:34           ` Stefan Monnier

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.