From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6830: widget-complete bad completions in :type 'file Date: Sun, 04 Mar 2012 19:06:16 +0200 Message-ID: <83zkbw9tyv.fsf@gnu.org> References: <871v99wgb1.fsf@stupidchicken.com> <87tym5ufk0.fsf@stupidchicken.com> <83ty2grpn0.fsf@gnu.org> <87d393zj1l.fsf@gnu.org> <83linrs8rj.fsf@gnu.org> <87sjhoiu4q.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1330880901 32620 80.91.229.3 (4 Mar 2012 17:08:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 4 Mar 2012 17:08:21 +0000 (UTC) Cc: 6830@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 04 18:08:20 2012 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 1S4Eux-0006hl-2P for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Mar 2012 18:08:19 +0100 Original-Received: from localhost ([::1]:50931 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4Euw-000788-CY for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Mar 2012 12:08:18 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4EuW-0006Pp-PE for bug-gnu-emacs@gnu.org; Sun, 04 Mar 2012 12:08:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4EuU-0005Pa-Tv for bug-gnu-emacs@gnu.org; Sun, 04 Mar 2012 12:07:52 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54325) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4EuU-0005PU-Px for bug-gnu-emacs@gnu.org; Sun, 04 Mar 2012 12:07:50 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S4Eug-0003tO-SA for bug-gnu-emacs@gnu.org; Sun, 04 Mar 2012 12:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Mar 2012 17:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6830 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6830-submit@debbugs.gnu.org id=B6830.133088083314909 (code B ref 6830); Sun, 04 Mar 2012 17:08:02 +0000 Original-Received: (at 6830) by debbugs.gnu.org; 4 Mar 2012 17:07:13 +0000 Original-Received: from localhost ([127.0.0.1]:32924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S4Ett-0003sB-CT for submit@debbugs.gnu.org; Sun, 04 Mar 2012 12:07:13 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:54978) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S4Etg-0003rU-B5 for 6830@debbugs.gnu.org; Sun, 04 Mar 2012 12:07:01 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0M0D00C00E14S200@a-mtaout23.012.net.il> for 6830@debbugs.gnu.org; Sun, 04 Mar 2012 19:06:15 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.35.38]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M0D00CNJE6E2XA0@a-mtaout23.012.net.il>; Sun, 04 Mar 2012 19:06:15 +0200 (IST) In-reply-to: <87sjhoiu4q.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:57491 Archived-At: > From: Chong Yidong > Cc: rgm@gnu.org, 6830@debbugs.gnu.org > Date: Sun, 04 Mar 2012 17:37:57 +0800 > > As far as the completion code is concerned, the correct field to use is > the `completion' field assigned by completion-in-region. In this case, > it's a mistake to pay attention to the underlying widget field. So why > doesn't it work to give the `completion' overlay a higher priority? See this fragment from find_field: before_field = (XFASTINT (pos) > BEGV ? get_char_property_and_overlay (make_number (XINT (pos) - 1), Qfield, Qnil, NULL) /* Using nil here would be a more obvious choice, but it would fail when the buffer starts with a non-sticky field. */ : after_field); /* See if we need to handle the case where MERGE_AT_BOUNDARY is nil and POS is at beginning of a field, which can also be interpreted as the end of the previous field. Note that the case where if MERGE_AT_BOUNDARY is non-nil (see function comment) is actually the more natural one; then we avoid treating the beginning of a field specially. */ if (NILP (merge_at_boundary)) { Lisp_Object field = get_pos_property (pos, Qfield, Qnil); if (!EQ (field, after_field)) at_field_end = 1; if (!EQ (field, before_field)) at_field_start = 1; What do you get on GNU/Linux for the values of `field', `before_field', and `after_field'? > FWIW, increasing the priority of the `completion' overlay does not cause > widget file name completion to fail on GNU/Linux. Could you try on > Windows? Give me a patch to try, and I will.