all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Is there a way to configure word separator for partial completion style?
@ 2023-03-15  3:02 Milan Glacier
  2023-03-15  3:43 ` Michael Heerdegen
  0 siblings, 1 reply; 3+ messages in thread
From: Milan Glacier @ 2023-03-15  3:02 UTC (permalink / raw)
  To: help-gnu-emacs


The emacs documentation
(https://www.gnu.org/software/emacs/manual/html_node/emacs/Completion-Styles.html)
suggests that "partial-completion" uses hyphens or spaces as word
separator. Is there a way to use other characters as the word separator?

This is very useful for other languages (say python, C) which usually
uses underscore as the word separator. Say I want to complete `foo_bar`,
then I may just type `f_m` to complete `foo_bar`.

Thanks in advance for your kind help.



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

* Re: Is there a way to configure word separator for partial completion style?
  2023-03-15  3:02 Is there a way to configure word separator for partial completion style? Milan Glacier
@ 2023-03-15  3:43 ` Michael Heerdegen
  2023-03-15  5:20   ` Milan Glacier
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Heerdegen @ 2023-03-15  3:43 UTC (permalink / raw)
  To: help-gnu-emacs

Milan Glacier <news@milanglacier.com> writes:

> The emacs documentation
> (https://www.gnu.org/software/emacs/manual/html_node/emacs/Completion-Styles.html)
> suggests that "partial-completion" uses hyphens or spaces as word
> separator. Is there a way to use other characters as the word separator?

`completion-pcm-word-delimiters'?

> This is very useful for other languages (say python, C) which usually
> uses underscore as the word separator. Say I want to complete `foo_bar`,
> then I may just type `f_m` to complete `foo_bar`.

Hmm - the underscore is already in that delimiters list, so what you
want should work out of the box, unless I'm missing something.  In Elisp
it works for me, I can e.g. complete (epg-K_CR) to
(epg--status-KEY_CREATED).

Michael.




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

* Re: Is there a way to configure word separator for partial completion style?
  2023-03-15  3:43 ` Michael Heerdegen
@ 2023-03-15  5:20   ` Milan Glacier
  0 siblings, 0 replies; 3+ messages in thread
From: Milan Glacier @ 2023-03-15  5:20 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs


Michael Heerdegen <michael_heerdegen@web.de> writes:

> Milan Glacier <news@milanglacier.com> writes:
>
>> The emacs documentation
>> (https://www.gnu.org/software/emacs/manual/html_node/emacs/Completion-Styles.html)
>> suggests that "partial-completion" uses hyphens or spaces as word
>> separator. Is there a way to use other characters as the word 
>> separator?
>
> `completion-pcm-word-delimiters'?
>
>> This is very useful for other languages (say python, C) which usually
>> uses underscore as the word separator. Say I want to complete 
>> `foo_bar`,
>> then I may just type `f_m` to complete `foo_bar`.
>
> Hmm - the underscore is already in that delimiters list, so what you
> want should work out of the box, unless I'm missing something.  In 
> Elisp
> it works for me, I can e.g. complete (epg-K_CR) to
> (epg--status-KEY_CREATED).
>
> Michael.

Thanks for your reply!

Yes, I think I am "not even wrong"...

What I actually want is to let "company-dabbrev-code" behave the same
like the completion in emacs-lisp-mode (which in turns is
"elisp-completion-at-point" via "company-capf").

So my actual question is indeed: how to let company-dabbrev-code works
like "partial-completion"?



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

end of thread, other threads:[~2023-03-15  5:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-15  3:02 Is there a way to configure word separator for partial completion style? Milan Glacier
2023-03-15  3:43 ` Michael Heerdegen
2023-03-15  5:20   ` Milan Glacier

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.