all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Simplification of `affixation-function`
@ 2021-04-24 17:35 Daniel Mendler
  2021-04-24 20:22 ` Juri Linkov
  0 siblings, 1 reply; 18+ messages in thread
From: Daniel Mendler @ 2021-04-24 17:35 UTC (permalink / raw)
  To: emacs-devel; +Cc: juri

The `affixation-function`, which can be specified in the completion 
table metadata is allowed to return a list with elements of either two 
or three elements depending on if you want to add only a suffix or both 
a prefix and a suffix.

Would it make sense to use a simpler definition for this function? What 
is the downside of only allowing triples? In case you don't want to use 
a prefix or suffix, specify the empty string.

Or is the idea to make the function extensible over time, such that 
completion UIs should ignore if more than three elements are specified? 
But if that is the case the current definition is problematic. The first 
element is always the candidate, the second element is either suffix or 
prefix and the third element if it exists is the suffix.

It is kind of understandable that this definition has been chosen since 
suffix before prefix is confusing. Still, if extensibility is the goal 
it would be preferable if the position of the strings does not change 
depending on the length of the list.

Daniel



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

end of thread, other threads:[~2021-04-29  2:15 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-24 17:35 Simplification of `affixation-function` Daniel Mendler
2021-04-24 20:22 ` Juri Linkov
2021-04-24 21:17   ` Daniel Mendler
2021-04-24 21:41     ` Juri Linkov
2021-04-24 22:01       ` Daniel Mendler
2021-04-24 22:34   ` Stefan Monnier
2021-04-24 22:48     ` Dmitry Gutov
2021-04-24 22:56       ` Daniel Mendler
2021-04-25 17:58         ` Dmitry Gutov
2021-04-25 18:08           ` Daniel Mendler
2021-04-25 22:31             ` Dmitry Gutov
2021-04-27 16:48               ` Juri Linkov
2021-04-27 17:39                 ` Daniel Mendler
2021-04-27 18:11                   ` Juri Linkov
2021-04-27 18:40                     ` Daniel Mendler
2021-04-28  0:20                 ` Dmitry Gutov
2021-04-28 19:59                   ` Juri Linkov
2021-04-29  2:15                     ` Dmitry Gutov

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.