* using interactive for getting into a specific directory
@ 2007-11-15 2:33 rustom
2007-11-15 5:13 ` rustom
2007-11-16 0:28 ` Johan Bockgård
0 siblings, 2 replies; 3+ messages in thread
From: rustom @ 2007-11-15 2:33 UTC (permalink / raw)
To: help-gnu-emacs
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: using interactive for getting into a specific directory
2007-11-15 2:33 using interactive for getting into a specific directory rustom
@ 2007-11-15 5:13 ` rustom
2007-11-16 0:28 ` Johan Bockgård
1 sibling, 0 replies; 3+ messages in thread
From: rustom @ 2007-11-15 5:13 UTC (permalink / raw)
To: help-gnu-emacs
What Ive done for now is this. Dont know if its the proper idiom
(defun startorg(file)
(interactive
(let ((default-directory "~/org/"))
(list (call-interactively 'find-file))
)))
Dont know how its working given that the parameter file is not used!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: using interactive for getting into a specific directory
2007-11-15 2:33 using interactive for getting into a specific directory rustom
2007-11-15 5:13 ` rustom
@ 2007-11-16 0:28 ` Johan Bockgård
1 sibling, 0 replies; 3+ messages in thread
From: Johan Bockgård @ 2007-11-16 0:28 UTC (permalink / raw)
To: help-gnu-emacs
rustom <rustompmody@gmail.com> writes:
> I want to write an interactive function that finds an arbitrary file
> from a specific directory
(interactive (list (read-file-name ...)))
--
Johan Bockgård
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-16 0:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-15 2:33 using interactive for getting into a specific directory rustom
2007-11-15 5:13 ` rustom
2007-11-16 0:28 ` Johan Bockgård
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).