[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-recutils] [bug #44957] `rec-cmd-compile' fails with file paths cont
From: |
Thom |
Subject: |
[bug-recutils] [bug #44957] `rec-cmd-compile' fails with file paths containing spaces |
Date: |
Wed, 29 Apr 2015 05:34:21 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.5.17 (KHTML, like Gecko) Version/8.0.5 Safari/600.5.17 |
Follow-up Comment #2, bug #44957 (project recutils):
Hmm, or maybe this works better for the markup (includes indentation this
time, copied from Emacs buffer instead of original submission):
(defun rec-cmd-compile ()
"Compile the current file with recfix."
(interactive)
(let ((cur-buf (current-buffer))
(cmd (concat rec-recfix " "))
(tmpfile (make-temp-file "rec-mode-")))
(if buffer-file-name
;; HERE (1/2)
(setq cmd (concat cmd (shell-quote-argument buffer-file-name)))
(with-temp-file tmpfile
(insert-buffer-substring cur-buf))
;; HERE (2/2)
(setq cmd (concat cmd (shell-quote-argument tmpfile))))
(compilation-start cmd)))
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?44957>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/