all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Reading a directory with (interactive "Dxxx")
@ 2005-04-19  8:51 Joakim Hove
  2005-04-19 15:46 ` Mathias Dahl
  0 siblings, 1 reply; 4+ messages in thread
From: Joakim Hove @ 2005-04-19  8:51 UTC (permalink / raw)



Hello,

I have function:

(defun store (directory)
  (interactive "DPath to store in:")
  (.....))

Which queries the user for an existing directory, and then stores a
file in there. The minibuffer dialog employs the working directory of
the current buffer as default, however I would like to provide my own
default, in general different from the working directory. Is this
possible?


Best Regards

Joakim

-- 
Joakim Hove
hove AT ift uib no                 /    
Tlf: +47 (55 5)8 27 90            /     Stabburveien 18		 
Fax: +47 (55 5)8 94 40           /      N-5231 Paradis		 
http://www.ift.uib.no/~hove/    /      	55 91 28 18 / 92 68 57 04

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

* Re: Reading a directory with (interactive "Dxxx")
  2005-04-19  8:51 Reading a directory with (interactive "Dxxx") Joakim Hove
@ 2005-04-19 15:46 ` Mathias Dahl
  2005-04-20  6:06   ` Joakim Hove
  0 siblings, 1 reply; 4+ messages in thread
From: Mathias Dahl @ 2005-04-19 15:46 UTC (permalink / raw)


Joakim Hove <hove@ift.uib.no> writes:

> (defun store (directory)
>   (interactive "DPath to store in:")
>   (.....))
>
> Which queries the user for an existing directory, and then stores a
> file in there. The minibuffer dialog employs the working directory of
> the current buffer as default, however I would like to provide my own
> default, in general different from the working directory. Is this
> possible?

What about doing this instead:

 (interactive)
 ...
 (read-directory-name "Enter dir: " "~/")

/Mathias

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

* Re: Reading a directory with (interactive "Dxxx")
  2005-04-19 15:46 ` Mathias Dahl
@ 2005-04-20  6:06   ` Joakim Hove
  2005-04-20  9:33     ` Mathias Dahl
  0 siblings, 1 reply; 4+ messages in thread
From: Joakim Hove @ 2005-04-20  6:06 UTC (permalink / raw)



Mathias Dahl <brakjoller.rem0veth1s@gmail.com> writes:


> What about doing this instead:
>
>  (interactive)
>  ...
>  (read-directory-name "Enter dir: " "~/")

Sure thing - I had tried "apropos ing" for something like that, but
had not found it. Thanks a lot.

Joakim


-- 
Joakim Hove
hove AT ift uib no                 /    
Tlf: +47 (55 5)8 27 90            /     Stabburveien 18		 
Fax: +47 (55 5)8 94 40           /      N-5231 Paradis		 
http://www.ift.uib.no/~hove/    /      	55 91 28 18 / 92 68 57 04

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

* Re: Reading a directory with (interactive "Dxxx")
  2005-04-20  6:06   ` Joakim Hove
@ 2005-04-20  9:33     ` Mathias Dahl
  0 siblings, 0 replies; 4+ messages in thread
From: Mathias Dahl @ 2005-04-20  9:33 UTC (permalink / raw)


Joakim Hove <hove@ift.uib.no> writes:

>> What about doing this instead:
>>
>>  (interactive)
>>  ...
>>  (read-directory-name "Enter dir: " "~/")
>
> Sure thing - I had tried "apropos ing" for something like that, but
> had not found it. Thanks a lot.

When on the subject, all these functions seems start with "read-",
read-string, read-file-name etc. Nice to know.

/Mathias

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

end of thread, other threads:[~2005-04-20  9:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-19  8:51 Reading a directory with (interactive "Dxxx") Joakim Hove
2005-04-19 15:46 ` Mathias Dahl
2005-04-20  6:06   ` Joakim Hove
2005-04-20  9:33     ` Mathias Dahl

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.