From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?Q?H=C3=A9ctor?= Lahoz Newsgroups: gmane.emacs.help Subject: Re: setting non-user variables Date: Thu, 1 Jun 2017 17:22:10 +0200 Message-ID: <20170601152209.GA8628@workstation> References: <20170531142644.GA6848@workstation> <83tw41c9vr.fsf@gnu.org> <20170601092403.GB3432@workstation> <20170601100209.GA4141@tuxteam.de> <922a138a-d91d-41b1-a254-800e764fa4d3@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1496331397 25561 195.159.176.226 (1 Jun 2017 15:36:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Jun 2017 15:36:37 +0000 (UTC) User-Agent: Mutt/1.5.20 (2009-06-14) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 01 17:36:33 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 1dGS9J-0006Pn-6c for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Jun 2017 17:36:33 +0200 Original-Received: from localhost ([::1]:45296 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGS9O-0000is-Cp for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Jun 2017 11:36:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGRvb-0006b6-54 for help-gnu-emacs@gnu.org; Thu, 01 Jun 2017 11:22:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGRvW-0006ZF-6r for help-gnu-emacs@gnu.org; Thu, 01 Jun 2017 11:22:23 -0400 Original-Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:32828) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dGRvW-0006Yl-0F for help-gnu-emacs@gnu.org; Thu, 01 Jun 2017 11:22:18 -0400 Original-Received: by mail-wm0-x22e.google.com with SMTP id m7so5137121wmg.0 for ; Thu, 01 Jun 2017 08:22:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+brDGRCUXOag7ejyD6AsHSCm83ZtFWvpO33TLKSZDsQ=; b=Wl+jJ5ww4/PiwwZM6xL69csRcFahbMXXgKewjCL3aDOzOLL/EUbOlz1/ev6ewDatIR GTbJnjnTNt1ROSO7Zq9LO1xKsAs3HTM9fMzSddL8el4iweSECHv0dDYyz1SaW9gCW5Yz 8JyY7GemulpwrtSm2KhuJkLjMpQKFjzp5rS+JNTThtVcP1UgqVazq84XRp/U6vwNo7AN t7uHIYI7eYUNs8t6IrkXK5N486Hsae8NkglP7Zj9n1A95K2WNWf1ibKZ7NhiJuMReIig ANoMyl8wezm3WWYI46F/iu3fR+9h5CjWZJ/1Bn2Nb55y7uKSAtvVs3Vm37vyc9Id47DX KsUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=+brDGRCUXOag7ejyD6AsHSCm83ZtFWvpO33TLKSZDsQ=; b=Lf0NWBhEKb+XbcZNGA5W+sQQYos8rkvxi9B5r9WR8hc0PXEY/RJaKxhTAHmCj8zyeX AU1ucA+wf0FzkwK0KafXdtJaLzJcpHUMjgEoBxBHXfZZWH/rp7vLCdD/D1ha6J49Fmh0 CFOAhoz53pa+csXhy1HhPGYtzo+hqajQ4hIbkdtNaFZ3XYJ+SeT2ml+gZoAi5SOEOxvN PuctqF1zZg7X7VDLhAc0LBhjM8+xdDFfSdKeTL5io9L7Q8nvTCtTMoxDsvPPzbm9yuTU GF3lwgobzmmo1dzU5Xw9kjWjez7JSoFMPidg+O2n9gt6n+D8Cq6j8UjNcNupB8QmESTP Jj8A== X-Gm-Message-State: AODbwcAs9fgY9Kg7FSWneBzw9weWnVcHS7ygWuVQBi+KVHS4m8bg9a6c 50nVfNGqmLNQWYDu X-Received: by 10.223.138.139 with SMTP id y11mr1968750wry.22.1496330535073; Thu, 01 Jun 2017 08:22:15 -0700 (PDT) Original-Received: from workstation ([193.125.163.216]) by smtp.gmail.com with ESMTPSA id h12sm3787172wrc.43.2017.06.01.08.22.14 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 01 Jun 2017 08:22:14 -0700 (PDT) Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <922a138a-d91d-41b1-a254-800e764fa4d3@default> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22e 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:113311 Archived-At: Drew Adams wrote: > > > (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. > > > > 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: > > > > (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. > You hit the nail on the head. In fact there is a "*" at the beginning of the docstring and I was wondering why I put it there some years ago. Thanks a lot.