From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#16334: 24.3.50; company-capf eats the first char in IELM filename completions Date: Tue, 07 Jan 2014 22:33:20 -0500 Message-ID: References: <87sit4ejpq.fsf@yandex.ru> <52C8C18A.3010501@yandex.ru> <52CA4035.2020302@yandex.ru> <52CB6BDB.4020601@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389152053 8470 80.91.229.3 (8 Jan 2014 03:34:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jan 2014 03:34:13 +0000 (UTC) Cc: 16334@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 08 04:34:19 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W0juL-0001hM-Tu for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Jan 2014 04:34:18 +0100 Original-Received: from localhost ([::1]:44707 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0juL-0006i5-Ia for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jan 2014 22:34:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0juD-0006hH-9J for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 22:34:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0ju6-0007q0-Q4 for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 22:34:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0ju6-0007pv-MY for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 22:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W0ju6-00020Q-Af for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 22:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Jan 2014 03:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16334-submit@debbugs.gnu.org id=B16334.13891520037638 (code B ref 16334); Wed, 08 Jan 2014 03:34:02 +0000 Original-Received: (at 16334) by debbugs.gnu.org; 8 Jan 2014 03:33:23 +0000 Original-Received: from localhost ([127.0.0.1]:41803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0jtT-0001z8-EY for submit@debbugs.gnu.org; Tue, 07 Jan 2014 22:33:23 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:58566) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0jtR-0001yy-PI for 16334@debbugs.gnu.org; Tue, 07 Jan 2014 22:33:22 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFxKG9/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBgyxE5AKBJEKA4hhnBmBXoMV X-IPAS-Result: Av4EABK/CFFFxKG9/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBgyxE5AKBJEKA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="44445917" Original-Received: from 69-196-161-189.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.196.161.189]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 07 Jan 2014 22:33:20 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id B98C7AE233; Tue, 7 Jan 2014 22:33:20 -0500 (EST) In-Reply-To: <52CB6BDB.4020601@yandex.ru> (Dmitry Gutov's message of "Tue, 07 Jan 2014 06:52:11 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:83158 Archived-At: >>>>> `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 the completion may actually want to *change* the text before >>>> the boundary. E.g. completion of /u/s/d to /usr/share/doc. > Maybe I didn't ask the right question. If the completion may want to change > the text outside of its defined boundaries, doesn't that subvert the meaning > of the "boundaries"? There are 2 levels: the level of try-completion, all-completions, an completion-boundaries. At that level, the completion should not affect the text outside of the boundaries. This is the level at which completion-tables operate. Then there's the level of completion-try-completion and completion-all-completions. This uses the info from the previous level to implement completion according to completion-styles. It can change things outside of the boundaries. This is part of the UI, not of the backends. >>> In that case, "/usr/share/doc" is the completion candidate, not "doc", >>> right? >> Not sure what you mean by "completion candidate": > Elements returned by the completion table? Then "/u/s/d" returns no completion candidates. > Already done: > https://github.com/company-mode/company-mode/compare/b70540b5fcd062c4670dea7004453de326ff4f70...8ecec3594931ae8e2329fec4b793ad4ba392e4ef It's not in elpa yet. > On the other hand, the backend is free to try all completion styles it The backends know nothing about completion styles. > We currently deal with that by only using the backends that respond with the > same prefix as the first one that returned non-nil. Guess we could add the > boundaries to the comparison list, too... Exactly. Stefan