all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 16334@debbugs.gnu.org
Subject: bug#16334: 24.3.50; company-capf eats the first char in IELM filename completions
Date: Sun, 05 Jan 2014 06:20:58 +0400	[thread overview]
Message-ID: <52C8C18A.3010501@yandex.ru> (raw)
In-Reply-To: <jwvvby0nyav.fsf-monnier+emacsbugs@gnu.org>

On 04.01.2014 09:00, Stefan Monnier wrote:
> That's normal.  Try C-x C-f / TAB TAB and you'll see that the leading /
> is also "missing" in the *Completions* buffer.
 > ...
 > Indeed, Company can't handle all completion-at-point-functions so far
 > because it assumes all completion tables are "simple", unlike
 > for example filename completion.
 >
 > You can know how many chars are "missing" by calling
 > `completion-boundaries'.

Thanks, I didn't know about that.

 > Ideally, Company should be extended to handle this feature,

It's not hard to do, but are you sure it would be a good addition to the 
API? "Completion prefix" and "completion bounds" are easy to mix up, and 
from what I see in various completion mechanisms, the non-simple 
completion tables more often need to look at the whole buffer before 
point, or at least a large chunk of it.

`completion-file-name-table' is more of an exception, I think. But if it 
was only passed the segment of STRING after the last path separator, it 
could still look behind it in the buffer and see the full path.

 > but for now that can be handled in company-capf.

Ok, I'll try.





  reply	other threads:[~2014-01-05  2:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-03 23:20 bug#16334: 24.3.50; company-capf eats the first char in IELM filename completions Dmitry Gutov
2014-01-04  5:00 ` Stefan Monnier
2014-01-05  2:20   ` Dmitry Gutov [this message]
2014-01-05  3:17     ` Dmitry Gutov
2014-01-05  4:53     ` Stefan Monnier
2014-01-06  5:33       ` Dmitry Gutov
2014-01-06 15:23         ` Stefan Monnier
2014-01-07  2:52           ` Dmitry Gutov
2014-01-08  3:33             ` Stefan Monnier
2014-01-09  6:21               ` Dmitry Gutov
2014-01-09 16:00                 ` Stefan Monnier
2014-01-10  6:23                   ` Dmitry Gutov
2014-01-10 14:58                     ` Stefan Monnier

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52C8C18A.3010501@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=16334@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 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.