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

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

Re: How to pass a evaluated list as argument of macro?


From: Noam Postavsky
Subject: Re: How to pass a evaluated list as argument of macro?
Date: Mon, 6 Jul 2020 09:39:33 -0400

On Mon, 6 Jul 2020 at 09:02, stardiviner <numbchild@gmail.com> wrote:

> (defmacro ffmpeg--command-macro (name arglist &rest body)
>   "Construct ffmpeg command with ARGS and BODY."
>   ;; (declare (debug t))
>   `(defun ,(intern (format "ffmpeg-%s" name)) ()

> (defun ffmpeg-cut-clip (input-filename start-timestamp end-timestamp 
> output-filename)
>   "Cut clip of media INPUT-FILENAME between START-TIMESTAMP END-TIMESTAMP and 
> output to OUTPUT-FILENAME."

>     (ffmpeg--command-macro "cut-clip" arglist)))

The way you are using your macro doesn't make sense to me. Do you want
ffmpeg-cut-clip to define a command which runs ffmpeg (in which case,
maybe it should be a macro), or actually just run the ffmpeg command
(in which case, maybe ffmpeg--comand-macro should not be a macro, but
rather a function (and probably called something like
ffmpeg-run-command instead))?



reply via email to

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