help-gnu-emacs
[Top][All Lists]
Advanced

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

using interactive for getting into a specific directory


From: rustom
Subject: using interactive for getting into a specific directory
Date: Wed, 14 Nov 2007 18:33:20 -0800 (PST)
User-agent: G2/1.0

I want to write an interactive function that finds an arbitrary file
from a specific directory "~/org"
The following attempts do not work but should give the idea what I am
trying.

(defun startorg(file)
  (interactive "FFile: ")
  (let ((default-directory "~/org"))
    (find-file file)
  ))

(defun startorg(file)
  (cd "~/org")
  (interactive "FFile: ")
  (find-file file)
)

The general problem can be stated as:
I want to write an interactive command -- here startorg -- whose
interactive actions -- here "F..." -- needs preprocessing with another
function -- here cd.


reply via email to

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