From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#45831: 28.0.50; list-colors-display callback arg needs to evaluate to a function? Date: Tue, 12 Jan 2021 20:27:28 -0300 Message-ID: <5ffe3063.1c69fb81.52f23.11a7@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34013"; mail-complaints-to="usenet@ciao.gmane.io" To: 45831@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 13 00:28:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kzT5A-0008hC-0e for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Jan 2021 00:28:12 +0100 Original-Received: from localhost ([::1]:60828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzT57-0001ul-5J for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Jan 2021 18:28:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44520) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzT50-0001ub-J2 for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2021 18:28:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50354) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzT50-00004y-CA for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2021 18:28:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kzT50-0002rM-9h for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2021 18:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jan 2021 23:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45831 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.161049405910960 (code B ref -1); Tue, 12 Jan 2021 23:28:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Jan 2021 23:27:39 +0000 Original-Received: from localhost ([127.0.0.1]:33667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzT4d-0002qh-8W for submit@debbugs.gnu.org; Tue, 12 Jan 2021 18:27:39 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:54976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzT4a-0002qY-47 for submit@debbugs.gnu.org; Tue, 12 Jan 2021 18:27:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzT4Z-0001si-Ts for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2021 18:27:35 -0500 Original-Received: from mail-qv1-xf2d.google.com ([2607:f8b0:4864:20::f2d]:35366) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzT4X-0008KP-Sg for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2021 18:27:35 -0500 Original-Received: by mail-qv1-xf2d.google.com with SMTP id l14so42305qvh.2 for ; Tue, 12 Jan 2021 15:27:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:from:to:subject:date:mime-version :content-transfer-encoding; bh=VJ0VrsjKKbGHGci219OogcbRikMpabddU5eBaTfwno8=; b=DXyeREqpJOJdE/nq5t2m5hImYwCqp3sRJ1wKU5CaSFJoyUz70JE3nDPKUSjPRQG5df 8LMQGC9x8/IZ/Kri4PmLZm7lSuM5407IDTosp5kBwJYI+pVYOcujk1ej8S9nscguFucq JxgbhuGWwPZzJ/UZaPBlhTSwmD61Nh6EpqfF9EkPmEntc+7Rw2M/tUukgoyK72i4+vBO 0Wg4YnESjqNLOLSX7iqKMGTiSUOKx/9wqYs+79MLati6Acxn3tMiQhc0LtrIFKNrf/Kq 60yBwIFFyUxphiMCUb4m6qP3EUupODpnoGTcUHJBm+LBsOUKnY8wq9Uis3e7VijQXGXb E0hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:from:to:subject:date:mime-version :content-transfer-encoding; bh=VJ0VrsjKKbGHGci219OogcbRikMpabddU5eBaTfwno8=; b=n8a3T+ZpUNHzHeMbJVsWcnde1XUksNkhZv+E7MJWOdx5/0fGFzrgjQWttkm1vw3baO 5ckih5KkEbrSlMHWJsGXFw9qgj/K5xPHlVvPNk1ulUUCCrnAbiSBHyK4zTUjEgsSCTHn KNDHuLYFKP/veOrsiTenxgFn7Efat2KGcnF02lNeH0qQIFlB+xRqqB28MFBNgRPzBfRM /2Gd47yeKgyWtfVcWiqznAkr1wOoxKVRvu6S7c3ySFv92NmKiDkc8njejv46x5mDihsL KtPUg5AD3Wa17yIQyTMtFAfTa7PhBW/XLDBTn+2FfjMGpE6pm5aDAJH2nfS/29ap5a6j nU0Q== X-Gm-Message-State: AOAM533xjaL3zn5Ly8fquZ4UOyLKk+k4I2Vv8C1mEp0QnRI/FZ7p6HX0 X+xsrh4s2USR17yvDaK8+dhP62ZU6jw= X-Google-Smtp-Source: ABdhPJwRl6tYwPhLY6/a3ozJeAEw0CPFpgKw7N2wQaLm/obX+gmbMsDlWu36sY2d2P+2OLNkc6A4Tg== X-Received: by 2002:a0c:8c87:: with SMTP id p7mr1691696qvb.46.1610494052496; Tue, 12 Jan 2021 15:27:32 -0800 (PST) Original-Received: from tbb-desktop ([201.213.132.172]) by smtp.gmail.com with ESMTPSA id j203sm156375qke.134.2021.01.12.15.27.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Jan 2021 15:27:31 -0800 (PST) X-Google-Original-Message-ID: <874kjlwxb3.fsf@maurooaranda@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::f2d; envelope-from=maurooaranda@gmail.com; helo=mail-qv1-xf2d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197867 Archived-At: Starting from emacs -Q: 1. Eval the following: (list-colors-display nil nil (let ((cbuf (current-buffer))) (lambda (color) (when (buffer-live-p cbuf) (message "Picked color %s for buffer %s" color (buffer-name cbuf)))))) 2. Hit RET on any color. I hit RET in the first one, which is black. 3. Get the following error: Symbol=E2=80=99s function definition is void: closure Docstring of list-colors-display says: If the optional argument CALLBACK is non-nil, it should be a function to call each time the user types RET or clicks on a color. The function should accept a single argument, the color name. But I'm passing a function and it is erroring out. If instead the CALLBACK argument is a form that evaluates to a function, like in: (list-colors-display nil nil (let ((cbuf (current-buffer))) `(function ,(lambda (color) (when (buffer-live-p cbuf) (message "Picked color %s for buffer %s" color (buffer-name cbuf))))))) it succeeds with: Picked color black for buffer *scratch* This is not what is described in the docstring, but I think the code should be fixed to allow the argument to be like the one provided in step 1. In GNU Emacs 28.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, c= airo version 1.15.10) of 2021-01-12 built on tbb-desktop Repository revision: c734ba68623279d814e857ddc536421a08c38f34 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Ubuntu 18.04.5 LTS Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LC_MONETARY: es_AR.UTF-8 value of $LC_NUMERIC: es_AR.UTF-8 value of $LC_TIME: es_AR.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-print debug backtrace find-func time-date subr-x cl-extra shortdoc text-property-search seq byte-opt gv bytecomp byte-compile cconv help-fns radix-tree color help-mode easymenu cl-loaddefs cl-lib iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 113889 8725) (symbols 48 7333 1) (strings 32 21356 2142) (string-bytes 1 682695) (vectors 16 12605) (vector-slots 8 175429 11483) (floats 8 158 307) (intervals 56 4536 253) (buffers 984 16))