From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#18643: 25.0.50; elisp--expect-function-p Date: Thu, 16 Oct 2014 06:42:19 +0400 Message-ID: <543F308B.4000504@yandex.ru> References: <3601111412974400@web5o.yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1413427409 11600 80.91.229.3 (16 Oct 2014 02:43:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Oct 2014 02:43:29 +0000 (UTC) Cc: "18643@debbugs.gnu.org" <18643@debbugs.gnu.org> To: Stefan Monnier , Leo Liu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 16 04:43:20 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 1Xeb28-00063h-An for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Oct 2014 04:43:20 +0200 Original-Received: from localhost ([::1]:47726 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xeb28-0002UF-0B for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Oct 2014 22:43:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xeb1y-0002UA-C9 for bug-gnu-emacs@gnu.org; Wed, 15 Oct 2014 22:43:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xeb1q-0002A9-SM for bug-gnu-emacs@gnu.org; Wed, 15 Oct 2014 22:43:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xeb1q-00029t-O3 for bug-gnu-emacs@gnu.org; Wed, 15 Oct 2014 22:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xeb1q-00040s-7o for bug-gnu-emacs@gnu.org; Wed, 15 Oct 2014 22:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Oct 2014 02:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18643 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18643-submit@debbugs.gnu.org id=B18643.141342734815380 (code B ref 18643); Thu, 16 Oct 2014 02:43:02 +0000 Original-Received: (at 18643) by debbugs.gnu.org; 16 Oct 2014 02:42:28 +0000 Original-Received: from localhost ([127.0.0.1]:45032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xeb1H-0003zz-1u for submit@debbugs.gnu.org; Wed, 15 Oct 2014 22:42:27 -0400 Original-Received: from mail-lb0-f181.google.com ([209.85.217.181]:34585) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xeb1D-0003zj-3b for 18643@debbugs.gnu.org; Wed, 15 Oct 2014 22:42:23 -0400 Original-Received: by mail-lb0-f181.google.com with SMTP id l4so2030803lbv.26 for <18643@debbugs.gnu.org>; Wed, 15 Oct 2014 19:42:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=bIKHwbcUZnXbKaEF3eWl+Y6QrAZITLA4ZJV61RN92Uk=; b=MxuynzSAkoKhHyIZCK1SjcFST7d4BeAk6OOoqTXyGZ1Oq1GVAJlpYbvNfyWsExAD+/ U+UvIsXYNmRY1+iMQSDSie/qUs0po/M6GVHTDM4TCCIYz3kzaFeB9uwAUq876XXGfFa5 SCIJlRnEkxBui9i1G0rC8xdnSLNdohVjS9XlJqCquYB+RPvT6mHb+rw/mv7XCTOI8z/W ymwh8RPPgFi447M9cBRbvMz57lWPBdol/Cn6Kez3C0/gNIgPvTV0AAhpHRKid/6tAlpr QN5xs6Exg3mXRQW4TvPlAuGLGRQqTB4uZQusJtf17zD+eCoZO4PWXEFuGoJ0Cj7Rm6YF Ax9A== X-Received: by 10.112.47.132 with SMTP id d4mr16236134lbn.64.1413427341973; Wed, 15 Oct 2014 19:42:21 -0700 (PDT) Original-Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id t6sm6129236lbb.23.2014.10.15.19.42.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Oct 2014 19:42:21 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 In-Reply-To: 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:94570 On 10/14/2014 10:32 PM, Stefan Monnier wrote: > I agree, we should try to handle both cases better. I.e. have a way to > distinguish "the user explicitly requested completion, so try to come up > with something" from the company case where we only want to auto pop up > a completion menu if we're sufficiently confident that the suggestions > are valuable. The idea makes a certain amount of sense, but I'm not sure if "try to come up with something" should be performed in contexts where other completion functions are likely to be more valuable. > Question is how to do it. One way I see we could do it is by adding > a property to completion data (e.g. in the data returned by the > completion-at-point-function) which says something like "unsure" or > "low-quality" so we could ignore those when the user hasn't explicitly > requested completion. How will that interact with other elements in completion-at-point-functions? Suppose there's another function there, named ispell-complete-at-point. And suppose it always returns non-nil when in strings or comments, which looks like a reasonable behavior. Which function will be used in comment if the user explicitly requested completion, and if lisp-completion-at-point returned `unsure'? Will that depend on the order of the elements in c-a-p-f?