[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using variable names as args to interactive functions

From: Stuart
Subject: using variable names as args to interactive functions
Date: Fri, 11 Jan 2008 16:53:58 -0800 (PST)
User-agent: G2/1.0

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

Any ideas? Thanks.

(defun find-my-special-dir (dir)
        (interactive "vSpecial dir: ")
        (find-file dir))

     (setq my-special-dir-a "/path/to/my/special/dir")

     Special dir: my-special-dir-a

reply via email to

[Prev in Thread] Current Thread [Next in Thread]