From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James N. V. Cash Newsgroups: gmane.emacs.bugs Subject: bug#45879: 28.0.50; [PATCH] missing defvar for keymap-name-history Date: Fri, 15 Jan 2021 10:08:56 -0500 Message-ID: <87lfcu6xvb.fsf@gmail.com> References: <82d9d68b-dac2-4cd8-84fe-2b7c81036e20@default> 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="36201"; mail-complaints-to="usenet@ciao.gmane.io" To: Drew Adams , 45879@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 15 16:13:43 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 1l0QnH-0009Iu-7J for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Jan 2021 16:13:43 +0100 Original-Received: from localhost ([::1]:43210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0QnG-0007ch-1g for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Jan 2021 10:13:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0Qji-00042E-33 for bug-gnu-emacs@gnu.org; Fri, 15 Jan 2021 10:10:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58183) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0Qjh-0008Jr-PK for bug-gnu-emacs@gnu.org; Fri, 15 Jan 2021 10:10:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l0Qjh-00047R-J4 for bug-gnu-emacs@gnu.org; Fri, 15 Jan 2021 10:10:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: James N. V. Cash Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Jan 2021 15:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45879 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 45879-submit@debbugs.gnu.org id=B45879.161072334615750 (code B ref 45879); Fri, 15 Jan 2021 15:10:01 +0000 Original-Received: (at 45879) by debbugs.gnu.org; 15 Jan 2021 15:09:06 +0000 Original-Received: from localhost ([127.0.0.1]:41496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0Qio-00045y-Dj for submit@debbugs.gnu.org; Fri, 15 Jan 2021 10:09:06 -0500 Original-Received: from mail-qv1-f45.google.com ([209.85.219.45]:46999) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0Qil-00045O-JB for 45879@debbugs.gnu.org; Fri, 15 Jan 2021 10:09:06 -0500 Original-Received: by mail-qv1-f45.google.com with SMTP id a1so4062674qvd.13 for <45879@debbugs.gnu.org>; Fri, 15 Jan 2021 07:09:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=xIvXcRrpI9XXQ9N/Fp8mvWJusox/1RrEh5Pqqszc/Pk=; b=iWiYPP7QXlLUTYtmw3VntRmL7cVLYfFvucNKpjpmde7MUJ6jpFoeSdZLsBh6iZaobZ len937BU2QBFd/ytMl868snH57Ih+V6bFEjZdxN9Gbff/DC9MjVG8q8NNHqPVtINjAbG UpkyZ/3CRX0C9SiXcXjaJuC8xDp3igIj3Dmiq/MjUOh+OpWOGO6uoU4IS4KK2Rvqt/fn fC289w5pujS2SGfzYo6STdxN1nWDxIQLJvB79cXlHGyBteC+wCmbRdWp7nPLiHnARoMI lf3nTbFdMovZFfktapKfVHuNP35mJuYZV3Eb5zGSSLVmImD0LvgeSxGK8wEEOX7vFj+w Su7g== X-Gm-Message-State: AOAM5320YswkUBn8xs2nQA/2kEX7JUJDaHU37CR6ARCNfrij17SOZR6F Yxy1ocfeIc/aRdYeUIxQirWE0lEPQkQGFA== X-Google-Smtp-Source: ABdhPJyQow3f2am66THsuidzHpW8lxZY7OWOsQmxCMuZHrB7RNpi4MHPq5uBfgsdsRDhleomAvoLPg== X-Received: by 2002:ad4:4ae2:: with SMTP id cp2mr12430920qvb.50.1610723337806; Fri, 15 Jan 2021 07:08:57 -0800 (PST) Original-Received: from gonk ([2607:fea8:10e1:3200:89fb:dfb3:c914:25ff]) by smtp.gmail.com with ESMTPSA id o5sm4860445qti.47.2021.01.15.07.08.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 07:08:57 -0800 (PST) In-Reply-To: <82d9d68b-dac2-4cd8-84fe-2b7c81036e20@default> 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:197988 Archived-At: Drew Adams writes: > FWIW, I don't think it's required for the HIST arg > of `completing-read' (or `read-from-minibuffer') to > be predefined. It can be any symbol, which is taken > as a variable - no need for a defvar. Ah, okay -- reading the help for `completing-read', it says that HIST "can be a symbol, which is the history list variable to use", which I took to mean that it should refer to a variable. > E.g. in `emacs -Q': > > (completing-read "aaa: " obarray nil nil nil 'toto) > > No error occurs, and `toto' gets populated correctly > as a variable, starting with an initial value of nil, > and regardless of input. > > (And the byte-compiler issues no warning either.) Indeed, I noticed this as well, but I wasn't sure if that was intended, or just a coincidence of implementation that it happened to work. > But it sounds (just a guess) like it's Helm that has > a bug here. Again though, it's good to provide a > defvar anyway. Hah, funnily enough, Helm also says that this an Emacs bug: https://github.com/emacs-helm/helm/issues/2327#issuecomment-647912917 =F0=9F=98=86 Not entirely sure how to resolve this then, other than just de= fining the variable myself in my own config. > I thought this "feature" was documented, but I don't > find it now in the Elisp manual or doc strings. > Perhaps it's there somewhere. (Not very important > anyway.) If this is indeed intended behaviour, I can submit a patch to clarify the docstring for completing-read.