From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: minibuffer.el completion bug with markers Date: Thu, 03 Oct 2013 22:24:03 -0400 Message-ID: References: <20130921213421.4e7b91ec@forcix.kollektiv-hamburg.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1380853461 11950 80.91.229.3 (4 Oct 2013 02:24:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Oct 2013 02:24:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jorgen Schaefer Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 04 04:24:24 2013 Return-path: Envelope-to: ged-emacs-devel@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 1VRv44-0001Qx-4f for ged-emacs-devel@m.gmane.org; Fri, 04 Oct 2013 04:24:24 +0200 Original-Received: from localhost ([::1]:45983 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRv43-0004IC-HV for ged-emacs-devel@m.gmane.org; Thu, 03 Oct 2013 22:24:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRv3u-0004Hy-Jf for emacs-devel@gnu.org; Thu, 03 Oct 2013 22:24:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRv3n-0005MY-A3 for emacs-devel@gnu.org; Thu, 03 Oct 2013 22:24:14 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:31869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRv3n-0005MN-68 for emacs-devel@gnu.org; Thu, 03 Oct 2013 22:24:07 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFLd/fx/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFFLd/fx/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="34722284" Original-Received: from 75-119-247-241.dsl.teksavvy.com (HELO pastel.home) ([75.119.247.241]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Oct 2013 22:20:40 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 6FE6560281; Thu, 3 Oct 2013 22:24:03 -0400 (EDT) In-Reply-To: <20130921213421.4e7b91ec@forcix.kollektiv-hamburg.de> (Jorgen Schaefer's message of "Sat, 21 Sep 2013 21:34:21 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:163838 Archived-At: > The recent changes to minibuffer.el broke completion functions when > they use markers to define where the completed text starts and ends. Thanks, installed. Stefan > (with-temp-buffer > (cl-flet ((test/completion-at-point () > (list (copy-marker (point-min)) > (copy-marker (point)) > 'test/completion-table)) > (test/completion-table (string pred action) > (if (eq action 'lambda) > nil > "test: "))) > (let ((completion-at-point-functions '(test/completion-at-point))) > (insert "TEST") > (completion-at-point) > (assert (equal (buffer-string) > "test: "))))) Thanks for the test, tho it fails. I think you meant to use `flet' above rather than `cl-flet'. Those are quite different (basically, `flet' provides dynamically scoped definitions, whereas `cl-flet' provides lexically scoped definitions). Stefan