all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* using variable names as args to interactive functions
@ 2008-01-12  0:53 Stuart
  2008-01-12  2:09 ` Pascal Bourguignon
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Stuart @ 2008-01-12  0:53 UTC (permalink / raw)
  To: help-gnu-emacs

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-01-16  3:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-12  0:53 using variable names as args to interactive functions Stuart
2008-01-12  2:09 ` Pascal Bourguignon
2008-01-12  3:28 ` Daniel Pittman
2008-01-13  8:40 ` Mathias Dahl
2008-01-15  3:17 ` Kevin Rodgers
2008-01-16  1:42 ` Stuart
2008-01-16  3:01   ` Kevin Rodgers

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.