From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: setting non-user variables Date: Thu, 1 Jun 2017 07:20:03 -0700 (PDT) Message-ID: <922a138a-d91d-41b1-a254-800e764fa4d3@default> References: <20170531142644.GA6848@workstation> <83tw41c9vr.fsf@gnu.org> <20170601092403.GB3432@workstation> <20170601100209.GA4141@tuxteam.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1496326849 1408 195.159.176.226 (1 Jun 2017 14:20:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Jun 2017 14:20:49 +0000 (UTC) To: tomas@tuxteam.de, help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 01 16:20:44 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGQxv-0008Vq-JO for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Jun 2017 16:20:43 +0200 Original-Received: from localhost ([::1]:44941 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGQxz-0000IB-Tb for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Jun 2017 10:20:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGQxU-0000Hx-Me for help-gnu-emacs@gnu.org; Thu, 01 Jun 2017 10:20:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGQxP-0007Io-Kp for help-gnu-emacs@gnu.org; Thu, 01 Jun 2017 10:20:16 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:48327) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dGQxP-0007H5-Ax for help-gnu-emacs@gnu.org; Thu, 01 Jun 2017 10:20:11 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v51EK7ZL018298 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Jun 2017 14:20:08 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v51EK7HF005597 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 1 Jun 2017 14:20:07 GMT Original-Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id v51EK4L1007928; Thu, 1 Jun 2017 14:20:05 GMT In-Reply-To: <20170601100209.GA4141@tuxteam.de> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6767.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113306 Archived-At: > > (make-variable-buffer-local > > (defvar mpkg-master-file nil > > "The path of the video associated to the current buffer")) > > > > With 23 I could set the variable interactively, with 24 I can't. >=20 > I can confirm that (Emacs 26.0.50 here). Variables defined through > defvar seem not to be indexed, whether buffer local or not. If you > use `defcustom', though, this will work: >=20 > (defcustom mpkg-master-file nil "...") Yes, `set-variable' is for "user variables", aka user options, only, aka symbols that satisfy predicate `user-variable-p'. Today, that means a variable that is defined using defcustom, or an alias to such a variable. It USED to also mean any variable whose doc string begins with `*'. Alas (IMHO), this feature was removed from Emacs 23 (i.e., long ago). In Emacs 22 and prior you could do this: (defvar foo 42 "*This is foo.") (put 'foo 'variable-interactive "nWidth: ") M-x set-variable foo RET Width: 13 RET And `foo' was available for completion (e.g. `f TAB') using `set-variable'. Giving a variable a `variable-interactive' property tells `set-variable' how to read a value for it.