all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* partial completion and switch-to-buffer
@ 2009-08-21 14:20 Tobias Gerdin
  2009-08-22 15:10 ` Drew Adams
  2009-08-26  7:05 ` comment-padding type ? Pierre Lorenzon
  0 siblings, 2 replies; 6+ messages in thread
From: Tobias Gerdin @ 2009-08-21 14:20 UTC (permalink / raw)
  To: help-gnu-emacs

Greetings,

With the advent of partial-completion-mode in Emacs 23, I was wondering
if there isn't any way to use this mechanism with switch-to-buffer ("C-x b")?

Switch-to-buffer still seems to do only prefix-matching.

I am aware of iswitch-mode and ido-mode, which does substring matching
(which is basically what I want), but find them too obtrusive. I do not
want any completion to be done unless I say so (by pressing <tab>).

I'm using Emacs CVS from 2009-07-30 (i.e. pretty much 23.1).

-Tobias




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

* RE: partial completion and switch-to-buffer
  2009-08-21 14:20 partial completion and switch-to-buffer Tobias Gerdin
@ 2009-08-22 15:10 ` Drew Adams
  2009-08-24 15:31   ` Tobias Gerdin
  2009-08-26  7:05 ` comment-padding type ? Pierre Lorenzon
  1 sibling, 1 reply; 6+ messages in thread
From: Drew Adams @ 2009-08-22 15:10 UTC (permalink / raw)
  To: 'Tobias Gerdin', help-gnu-emacs

> I am aware of iswitch-mode and ido-mode, which does substring matching
> (which is basically what I want), but find them too obtrusive. I do not
> want any completion to be done unless I say so (by pressing <tab>).

Icicles does no completion until you say so (by pressing TAB), by default.

http://www.emacswiki.org/cgi-bin/wiki/Icicles


----

Details -

* To get substring completion instead of prefix completion, use S-TAB.

* Or, if you want to use TAB for both prefix and substring completion, then set
option `icicle-cycling-respects-completion-mode' to t. (Use TAB / S-TAB to
change the completion mode: prefix / substring.)

* S-TAB actually does regexp completion, by default. To get only substring
completion, set option `icicle-regexp-quote-flag' to non-nil. Or use `C-`' in
the minibuffer to toggle it.

* When buffer *Completions* is showing, the completion candidates are updated as
you type (incremental completion), by default. To turn this off, set option
`icicle-incremental-completion-flag' to nil. Or use `C-#' in the minibuffer to
toggle it.






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

* Re: partial completion and switch-to-buffer
  2009-08-22 15:10 ` Drew Adams
@ 2009-08-24 15:31   ` Tobias Gerdin
  0 siblings, 0 replies; 6+ messages in thread
From: Tobias Gerdin @ 2009-08-24 15:31 UTC (permalink / raw)
  To: Drew Adams; +Cc: help-gnu-emacs

"Drew Adams" <drew.adams@oracle.com> writes:

>> I am aware of iswitch-mode and ido-mode, which does substring matching
>> (which is basically what I want), but find them too obtrusive. I do not
>> want any completion to be done unless I say so (by pressing <tab>).
>
> Icicles does no completion until you say so (by pressing TAB), by default.

I am aware of Icicles, but I would prefer not to have to rely on
an external package for this simple matter.  But thanks for the thorough
explanation.

-Tobias




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

* comment-padding type ?
  2009-08-21 14:20 partial completion and switch-to-buffer Tobias Gerdin
  2009-08-22 15:10 ` Drew Adams
@ 2009-08-26  7:05 ` Pierre Lorenzon
  2009-08-26 15:06   ` Stefan Monnier
  1 sibling, 1 reply; 6+ messages in thread
From: Pierre Lorenzon @ 2009-08-26  7:05 UTC (permalink / raw)
  To: help-gnu-emacs, monnier


Hi All,

comment-padding documentation is as follows :

Padding string that `comment-region' puts between comment chars and text.
Can also be an integer which will be automatically turned into a string
of the corresponding number of spaces.

But in function comment-padright we find this piece of code :

    (let ((s (match-string 1 str))	;actual string
	  (lpad (substring str 0 (match-beginning 1))) ;left padding
	  (rpad (concat (substring str (match-end 1)) ;original right padding
			(substring comment-padding ;additional right padding
				   (min (- (match-end 0) (match-end 1))
					(length comment-padding)))))

where comment-padding is actually supposed to be a sequence and
not an integer. Actually in one mode comment-padding was set to
1 and I got an error when trying to execute
comment-padright. When setting the value to " " everything goes
well ! 

In my opinion the comment-padding documentation is
abusive. Either it should be changed or a conversion mechanism
should be added.

Regards 

Pierre






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

* Re: comment-padding type ?
  2009-08-26  7:05 ` comment-padding type ? Pierre Lorenzon
@ 2009-08-26 15:06   ` Stefan Monnier
  2009-08-26 15:19     ` Pierre Lorenzon
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2009-08-26 15:06 UTC (permalink / raw)
  To: Pierre Lorenzon; +Cc: help-gnu-emacs

> But in function comment-padright we find this piece of code :

>     (let ((s (match-string 1 str))	;actual string
> 	  (lpad (substring str 0 (match-beginning 1))) ;left padding
> 	  (rpad (concat (substring str (match-end 1)) ;original right padding
> 			(substring comment-padding ;additional right padding
> 				   (min (- (match-end 0) (match-end 1))
> 					(length comment-padding)))))

> where comment-padding is actually supposed to be a sequence and
> not an integer. Actually in one mode comment-padding was set to
> 1 and I got an error when trying to execute
> comment-padright. When setting the value to " " everything goes
> well ! 

> In my opinion the comment-padding documentation is
> abusive. Either it should be changed or a conversion mechanism
> should be added.

There is a conversion mechanism.  It's in comment-normalize-vars which
you failed to call (and whose importance I obviously fail to make
clear, in the doc).


        Stefan





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

* Re: comment-padding type ?
  2009-08-26 15:06   ` Stefan Monnier
@ 2009-08-26 15:19     ` Pierre Lorenzon
  0 siblings, 0 replies; 6+ messages in thread
From: Pierre Lorenzon @ 2009-08-26 15:19 UTC (permalink / raw)
  To: monnier, help-gnu-emacs


Hi !

From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: comment-padding type ?
Date: Wed, 26 Aug 2009 11:06:46 -0400

>> But in function comment-padright we find this piece of code :
> 
>>     (let ((s (match-string 1 str))	;actual string
>> 	  (lpad (substring str 0 (match-beginning 1))) ;left padding
>> 	  (rpad (concat (substring str (match-end 1)) ;original right padding
>> 			(substring comment-padding ;additional right padding
>> 				   (min (- (match-end 0) (match-end 1))
>> 					(length comment-padding)))))
> 
>> where comment-padding is actually supposed to be a sequence and
>> not an integer. Actually in one mode comment-padding was set to
>> 1 and I got an error when trying to execute
>> comment-padright. When setting the value to " " everything goes
>> well ! 
> 
>> In my opinion the comment-padding documentation is
>> abusive. Either it should be changed or a conversion mechanism
>> should be added.
> 
> There is a conversion mechanism.  It's in comment-normalize-vars which
> you failed to call (and whose importance I obviously fail to make
> clear, in the doc).

  OK ! it works now. 

  Thanks !

  Pierre


> 
> 
>         Stefan
> 






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

end of thread, other threads:[~2009-08-26 15:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-21 14:20 partial completion and switch-to-buffer Tobias Gerdin
2009-08-22 15:10 ` Drew Adams
2009-08-24 15:31   ` Tobias Gerdin
2009-08-26  7:05 ` comment-padding type ? Pierre Lorenzon
2009-08-26 15:06   ` Stefan Monnier
2009-08-26 15:19     ` Pierre Lorenzon

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.