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

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

shell escape function


From: Tomas Hlavaty
Subject: shell escape function
Date: Sat, 27 Feb 2021 12:51:29 +0100

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?

I have not found anything so far.

Thanks in advance,

Tomas



reply via email to

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