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

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

Re: Help: execute scripts form emacs


From: wdysun
Subject: Re: Help: execute scripts form emacs
Date: Wed, 14 Oct 2009 01:24:52 -0700 (PDT)

Hello ap,

your suggestion, this one
;;---------------------------------------------------------------
(defun mytex ()
  (interactive)
  (or buffer-file-name
      (call-interactively 'save-buffer))
  (shell-command
   (format "mytex '%s'" buffer-file-name)))
;;----------------------------------------------------------------

works except that is takes the entire buffer name, so it also take the file
extension, in fact it returns a warning like this:


WARNING    /home/pietro/try.tex.tex does not exists

How can I modify the function above in order to get the file name without
extension in the last line above? I tried to put somehow the function
file-name-sans-extension which is supposed to what I probably put it in a
wrong way.

Best 
Pietro 




-- 
View this message in context: 
http://www.nabble.com/Help%3A-execute-scripts-form-emacs-tp25853628p25887185.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





reply via email to

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