I am new to elisp and am trying to write an Elisp function that calls
org-pandoc-export-to-html5-pdf-and-openis an interactive function that will write to a file, and when called via
M-x, it prompts the user for a filename to enter in the minibuffer.
I want to pass a default value for the filename so that the user does not have to enter the name manually. The file and its path is
What is the simplest way for me to do this?
I want to acknowledge that many versions of this question have been asked before, if someone automatically marks this as a duplicate. Below is a table, with some comments.
I think question 4 comes closest in spirit to this question, but it wasn't answered, and marked as a duplicate of a question which is similar in the way that australiopithecus is similar to homo sapiens sapiens - similar at root level but there is a meaningful difference.
Otherwise, my question is one of approach:
- Qs 1,6 suggest
- Q 7 suggests
- I have tried various combinations of
command-execute, but the user prompt remains.
- I have read some of the manual describing interactive calls here, and have done
C-h fon the function at hand, but can't quite translate what little I understand from the manual to the desired functionality.
|Question||Function/topic||Resolved? (And probable solution?)||Useful in this case?|
|1. Call a function and insert text in minibuffer prompt||
|2. Call function interactively and set initial content||Default value when calling
|3. How to call an interactive function and pass arguments to it from within Elisp?||Use
||Yes-ish - wrong argument type passed||No|
|4. Call an interactive function without asking for user input [duplicate]||Call e.g.
||No, marked as duplicate of 5||Maybe - same question, unresolved|
|5. How to use 'interactive' arguments when calling the command from code||Call an interactive function which takes user input||Yes, trivially:
||No, and not sure how it answers 4!|
|6. Inserting Text into an Active Minibuffer||Insert text into minibuffer after external command is run (like Q1)||Yes,
||Maybe - statement that
|7. emacs interactive commands with default value||Default values for interactive commands,
|8. call write-file interactively with prompting||Use
||Maybe, another answer suggests
|9. emacs how to use call-interactively with parameter||Call