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: Tue, 06 Mar 2012 23:12:02 +0200 Message-ID: <83d38pa0yl.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> <83zkbw9tyv.fsf@gnu.org> <87boobd9tr.fsf@gnu.org> <83linf9cup.fsf@gnu.org> <83ipii9ylf.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1331068429 23041 80.91.229.3 (6 Mar 2012 21:13:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Mar 2012 21:13:49 +0000 (UTC) Cc: 6830@debbugs.gnu.org, cyd@gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 06 22:13:48 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 1S51hc-0004Ae-5j for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Mar 2012 22:13:48 +0100 Original-Received: from localhost ([::1]:44408 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S51hb-00054J-Gq for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Mar 2012 16:13:47 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S51hT-00053z-Co for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2012 16:13:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S51hR-0003Lh-JD for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2012 16:13:38 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S51hR-0003Lb-G1 for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2012 16:13:37 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S51hq-0001a6-4V for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2012 16:14: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: Tue, 06 Mar 2012 21:14: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.13310684036022 (code B ref 6830); Tue, 06 Mar 2012 21:14:02 +0000 Original-Received: (at 6830) by debbugs.gnu.org; 6 Mar 2012 21:13:23 +0000 Original-Received: from localhost ([127.0.0.1]:36580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S51hC-0001Yu-El for submit@debbugs.gnu.org; Tue, 06 Mar 2012 16:13:23 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:47921) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S51gz-0001YE-Hc for 6830@debbugs.gnu.org; Tue, 06 Mar 2012 16:13:11 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M0H00J00EFDLF00@a-mtaout22.012.net.il> for 6830@debbugs.gnu.org; Tue, 06 Mar 2012 23:12:04 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.223.165]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M0H00IN5EVYSXG0@a-mtaout22.012.net.il>; Tue, 06 Mar 2012 23:11:59 +0200 (IST) In-reply-to: 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:57546 Archived-At: > From: Stefan Monnier > Cc: cyd@gnu.org, 6830@debbugs.gnu.org > Date: Tue, 06 Mar 2012 15:45:02 -0500 > > >> Ideally, the cursor position should not be considered as "in the > >> boundary", so the boundary overlay should not be considered for > >> determining `field'. > >> For that, I'd guess that you'd want the boundary's marker to use the > >> insertion type t. But AFAIK, the code already sets its type to t. > >> So I'm not sure what's going on, here. > > > I don't think I follow. Can you elaborate on the role of the boundary > > marker in this issue? > > I'm not sure what's the role of the boundary marker. But from what you > say, the problem is that the boundary overlay's field property > interferes. But the cursor should not be considered as being "in the > boundary field". And indeed, the boundary's start marker is of > insertion-type t, which means that Fget_pos_property should ignore this > overlay when we're right in front of it. Ah, that's a simple misunderstanding, then. The boundary marker is not related to this issue at all. See below. > The values that Chong sees for before_field, after_field, and field > are correct. If in your case, `field' has a value different from > `completion' (e.g. it has value `boundary' or nil), then this is the > problem whose origin we need to find. The value of `field' on MS-Windows is neither `boundary' nor nil. It is the value of the widget itself. Here's just its beginning, as an illustration: (gdb) pp field (file :format " %v" :value "chown" :parent (custom-variable :documentation-shown t :custom-state modified :tag "Dired Chown Program" :value dired-chown-program :custom-form edit :custom-magic (custom-magic :args (nil) :parent #1 :indent 0 :children ((choice-item :help-echo "Change the state of this item." ... As I explained earlier, this value comes from this snippet in widget-specify-field: (let ((overlay (make-overlay from to nil nil rear-sticky))) (widget-put widget :field-overlay overlay) ;;(overlay-put overlay 'detachable nil) (overlay-put overlay 'field widget) <<<<<<<<<<<<<<<<<<<<<<<<<<<< (overlay-put overlay 'local-map keymap) (overlay-put overlay 'face face) (overlay-put overlay 'follow-link follow-link) (overlay-put overlay 'help-echo help-echo))) When this is called as part of Customize, the Lisp backtrace looks like this: "widget-specify-field" (0x82eac8) "widget-setup" (0x82ed24) "custom-buffer-create-internal" (0x82ef94) "custom-buffer-create" (0x82f1e4) "customize-variable" (0x82f4c4) "call-interactively" (0x82f704) "execute-extended-command" (0x82f954) "call-interactively" (0x82fb84) IIUC, this code is part of setting up editable fields of a widget.