From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stuart Newsgroups: gmane.emacs.help Subject: using variable names as args to interactive functions Date: Fri, 11 Jan 2008 16:53:58 -0800 (PST) Organization: http://groups.google.com Message-ID: <96f5c9ae-3f50-4f54-9537-92a27cd618e8@f47g2000hsd.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1200102038 28397 80.91.229.12 (12 Jan 2008 01:40:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Jan 2008 01:40:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 12 02:41:01 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JDVMp-0002xI-DN for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Jan 2008 02:40:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JDVMR-0003Mq-FG for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Jan 2008 20:40:35 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!f47g2000hsd.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-NNTP-Posting-Host: 208.71.56.11 Original-X-Trace: posting.google.com 1200099239 28303 127.0.0.1 (12 Jan 2008 00:53:59 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 12 Jan 2008 00:53:59 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f47g2000hsd.googlegroups.com; posting-host=208.71.56.11; posting-account=kVXI5QoAAABVyFocW0ORjUYeX2nxhaP0 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.0.10) Gecko/20070221 Red Hat/1.5.0.10-0.1.el4 Firefox/1.5.0.10, gzip(gfe), gzip(gfe) X-HTTP-Via: 1.1 mold.dreamworks.com:3128 (squid/2.5.STABLE5) Original-Xref: shelby.stanford.edu gnu.emacs.help:155257 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:50673 Archived-At: I have some variables which I set at startup with setq. There are a bunch of variables that get set. Each is a string representing a directory path. I want a function which I can just type the variable name and it opens dired with that directory. However, this doesn't work because the interactive option "v" doesn't include the variables set with setq because this requires that: "A variable declared to be a user option (i.e., satisfying the predicate user-variable-p)." Any ideas? Thanks. (defun find-my-special-dir (dir) (interactive "vSpecial dir: ") (find-file dir)) Example -------------- startup: (setq my-special-dir-a "/path/to/my/special/dir") minibuffer: Special dir: my-special-dir-a