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

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

Re: shell escape function


From: Philipp
Subject: Re: shell escape function
Date: Sat, 27 Feb 2021 16:25:17 +0100


> Am 27.02.2021 um 12:51 schrieb Tomas Hlavaty <tom@logand.com>:
> 
> Hi,
> 
> in order to read graphics pdf and media on the console, I have the
> following two functions:
> 
> (defun fbpdf (fname)
>  (interactive "sFile name: ")
>  (suspend-emacs (format "fbpdf -w '%s'; fg" (expand-file-name fname))))
> 
> (defun fbmpv (fname)
>  (interactive "sFile name: ")
>  (suspend-emacs (format "mpv --vo=drm '%s'; fg" (expand-file-name fname))))
> 
> I can use them as follows:
> 
> (fbpdf "~/Downloads/pdf/bad-is-stronger-than-good.pdf")
> (fbmpv "~/Downloads/vid/how-complex.mkv")
> 
> Is there a function in emacs which escapes shell string, in this case
> the filename?

shell-quote-argument



reply via email to

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