0

I'd like to ask to the user where to save a .png file, where I provide some defaults, like:

(read-file-name  "Picture name:" "/tmp" "mydefaultname.png")

(ideally in a way compatible with ido) However because the file does not (yet) exist, ido does not prefill the file name, it's like if no file were specified:

enter image description here

How could I make it work for ido as well?

4
  • emacs.stackexchange.com/tags/elisp/info
    – Drew
    Commented Jul 13, 2022 at 17:15
  • @Drew thanks. So what should I use for questions related to elisp code?
    – tobiasBora
    Commented Jul 14, 2022 at 9:45
  • Use tags that are more specific to what you're asking how to do or what concept you want help with. If it's about using Lisp to do something then ask about how to do that something. You'll typically find tags that are relevant for that, including tags related directly to coding, such as iteration.
    – Drew
    Commented Jul 14, 2022 at 14:34
  • Ok thanks, for such simple code it's maybe not always relevant, but thanks ^^
    – tobiasBora
    Commented Jul 15, 2022 at 15:18

1 Answer 1

1

I needed to use initial-value instead of default file name:

(read-file-name  "Picture name:" "/tmp" nil nil "myedfault.png")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.