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#12254: 24.2; completion fails backward-char Date: Thu, 30 Aug 2012 11:39:59 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1346341277 22623 80.91.229.3 (30 Aug 2012 15:41:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Aug 2012 15:41:17 +0000 (UTC) Cc: 12254@debbugs.gnu.org To: Leo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 30 17:41:18 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 1T76rt-0006WX-Gd for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Aug 2012 17:41:17 +0200 Original-Received: from localhost ([::1]:38757 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T76rr-0006ws-8k for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Aug 2012 11:41:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T76rY-00068s-LH for bug-gnu-emacs@gnu.org; Thu, 30 Aug 2012 11:40:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T76rU-0008Ls-Jp for bug-gnu-emacs@gnu.org; Thu, 30 Aug 2012 11:40:56 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T76rU-0008Lk-E8 for bug-gnu-emacs@gnu.org; Thu, 30 Aug 2012 11:40:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T76sc-0001Ey-9s for bug-gnu-emacs@gnu.org; Thu, 30 Aug 2012 11:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Aug 2012 15:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12254 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 12254-submit@debbugs.gnu.org id=B12254.13463412754699 (code B ref 12254); Thu, 30 Aug 2012 15:42:02 +0000 Original-Received: (at 12254) by debbugs.gnu.org; 30 Aug 2012 15:41:15 +0000 Original-Received: from localhost ([127.0.0.1]:58206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T76rq-0001Dk-IL for submit@debbugs.gnu.org; Thu, 30 Aug 2012 11:41:14 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:58215) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T76rn-0001Dc-Oh for 12254@debbugs.gnu.org; Thu, 30 Aug 2012 11:41:12 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09FxKEe/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="197087265" Original-Received: from 69-196-161-30.dsl.teksavvy.com (HELO pastel.home) ([69.196.161.30]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Aug 2012 11:40:00 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 143E759407; Thu, 30 Aug 2012 11:40:00 -0400 (EDT) In-Reply-To: (Leo's message of "Thu, 30 Aug 2012 20:05:03 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) 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:63612 Archived-At: > This isn't clear on the documentation on completion-at-point-functions. > It is a trap that one can easily fall into. I wonder if you may add a > note in the doc-string of completion-at-point-functions. Thanks. How 'bout the patch below? Stefan === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2012-08-14 17:10:38 +0000 +++ lisp/minibuffer.el 2012-08-30 15:39:14 +0000 @@ -1821,7 +1821,9 @@ `:predicate' a predicate that completion candidates need to satisfy. `:exclusive' If `no', means that if the completion table fails to match the text at point, then instead of reporting a completion - failure, the completion should try the next completion function.") + failure, the completion should try the next completion function. +As is the case with most hooks, the functions are responsible to preserve +things like point and current buffer.") (defvar completion--capf-misbehave-funs nil "List of functions found on `completion-at-point-functions' that misbehave.