auctex
[Top][All Lists]
Advanced

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

[AUCTeX] expand file name with special characters


From: Shiyuan
Subject: [AUCTeX] expand file name with special characters
Date: Mon, 9 Jan 2012 15:44:06 -0600

Hi, 
    I add a function to use Skim as pdf viewer. It works well except when the file name contains special characters. In that case, (buffer-file-name) returns the file name as it is without appropriate quoting. I notice that the function named file seems to do the trick but I cannot see what is in it.  How can I get the buffer-file name with appropriate quoting?  Thanks.  

(defun skim-make-url () (concat
(TeX-current-line)
" "
(expand-file-name (funcall file (TeX-output-extension) t)
(file-name-directory (TeX-master-file)))
" "
(buffer-file-name)))
(add-hook 'LaTeX-mode-hook
 (lambda ()
   (add-to-list 'TeX-expand-list
'("%qq" skim-make-url))))
(setq  TeX-view-program-list 
       '(("Skim" "/Applications/Skim.app/Contents/SharedSupport/displayline %qq")))

Shiyuan 

reply via email to

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