3 votes

Ignore stderr when calling call-shell-region

Your list is quoted, so you are passing in a list with two symbols rather than a buffer and nil. Use list rather than quote: (call-shell-region (point-min) (point-max) (concat "...
user avatar
  • 11.7k
2 votes

Elisp function to open file name with space?

I recommend using call-process instead of shell-command: (defun open-a-file () (interactive) (call-process "xdg-open" nil 0 nil (read-file-name "Open: "))) One large ...
user avatar
  • 11.7k
1 vote

How to use a variable for an output :file path for call-process

You should use Backquote (call-process "/bin/ls" nil `(:file ,path-to-output-test)) or list directly (call-process "/bin/ls" nil (list :file path-to-output-test))
user avatar
  • 1,306

Only top scored, non community-wiki answers of a minimum length are eligible