From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: What does all-completions with COLLECTION == obarray return? Date: Wed, 15 Apr 2015 15:56:25 +0200 Message-ID: <87twwh1omu.fsf@web.de> References: <87k2xr7skh.fsf@web.de> <87iodaxvg0.fsf@web.de> <87lhi3hs6d.fsf@web.de> <87iod68tj3.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1429106214 3596 80.91.229.3 (15 Apr 2015 13:56:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Apr 2015 13:56:54 +0000 (UTC) Cc: Thierry Volpiatto , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 15 15:56:45 2015 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 1YiNo2-00066W-AT for ged-emacs-devel@m.gmane.org; Wed, 15 Apr 2015 15:56:42 +0200 Original-Received: from localhost ([::1]:60669 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiNo1-0008Oj-4P for ged-emacs-devel@m.gmane.org; Wed, 15 Apr 2015 09:56:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiNnv-0008Od-0H for emacs-devel@gnu.org; Wed, 15 Apr 2015 09:56:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiNnp-0007OY-UD for emacs-devel@gnu.org; Wed, 15 Apr 2015 09:56:34 -0400 Original-Received: from mout.web.de ([212.227.17.11]:61355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiNnp-0007OU-Lf for emacs-devel@gnu.org; Wed, 15 Apr 2015 09:56:29 -0400 Original-Received: from drachen.dragon ([94.217.116.84]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0MgwdY-1Z4KXT0c2y-00M3zt; Wed, 15 Apr 2015 15:56:27 +0200 In-Reply-To: <87iod68tj3.fsf@web.de> (Michael Heerdegen's message of "Wed, 08 Apr 2015 18:38:24 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:R2j5Hu8CcavL8kqnOOlX71EQunCWELGtAGN8bISFp/hHVgGdcS6 5ii0HDnTUekkeRI1XCB99c1gxocDjZWBxsPbCdlPbeqmKHhYKgMCz6PenftfUvzgFqWqmR/ xA2Rpo/1vY76Wbzch73pH/hC9IJ9qy5j1J6CUroBFIKK0iGUOi4e6G1+1wK/2+I8NLZIn8D cMKTVk4iCcFv/csnFlXeA== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.11 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:185451 Archived-At: Michael Heerdegen writes: > I'll try to step through the code and find out where something gets > actually added to obarray. I was lucky and could condense a recipe for emacs -Q out of the Helm code we use: --8<---------------cut here---------------start------------->8--- (progn (intern "Bah=C3=A1'=C3=AD Date") ;this happens when requiring org (let* ((collection (all-completions "" obarray)) (test #'facep) (predicate `(lambda (elm) (condition-case err (if (eq (quote ,test) 'commandp) (funcall (quote ,test) (intern elm)) (funcall (quote ,test) elm)) (wrong-type-argument (funcall (quote ,test) (intern elm))))))) (ignore (all-completions "" collection predicate)) ;; Test if "Bah=C3=A1'=C3=AD Date" is the name of more than one interne= d symbol (when (let ((i 0)) (catch 'done (mapatoms (lambda (s) (when (string=3D (symbol-name s) "Bah= =C3=A1'=C3=AD Date") (if (< i 1) (setq i 1) (throw 'done t))))) nil)) (message "Gotcha!")))) --8<---------------cut here---------------end--------------->8--- Copy this into scratch in emacs -Q and hit C-x C-e. I get "Gotcha!", meaning that after evaluation, there is more than one interned symbol named "Bah=C3=A1'=C3=AD Date". I guess this should not happen, so it is a bug in Emacs in think. Thanks, Michael. =20