[carbon-emacs:184] Re: [OS X TeX] Re: PDFViewer

Roussanka Loukanova rloukano at stp.lingfil.uu.se
Thu May 17 22:35:32 CEST 2007


On Thu, 17 May 2007, Kasper Daniel Hansen wrote:

> The following lines
>
> (server-start)
>
> (defun raise-emacs-on-aqua()
>  (do-applescript "tell application \"Emacs\" to activate"))
>
> (add-hook 'server-switch-hook 'raise-emacs-on-aqua)
>
> in your .emacs together with using the "Emacs" preset from PDFView should
> make inverse search work: that means if you CMD+click in yourPDFView window
> you should get taken to the relevant line of the relevant tex file in Carbon
> Emacs - and the Emacs windows should be activated (raised to the front). All
> of this now happens without creating the *Async... buffer

Kasper, I'm getting all this now working by commenting out the above code 
in .emacs. I've tried several times:

- I Quited both emacs and pdfview (and just in case for the test, I 
deleted the file.pdfsync that has been created). Then, I started up emacs 
and typeset the file.tex. All works.

Here is what I have in .emacs:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; this is from PDFView instrs:
;; Starts the Emacs server
(server-start)
;; to make Emacs auto-raise when a CMD + Click is executed in PDFView
;; (defun raise-emacs-on-aqua()
;;   (do-applescript "tell application \"Emacs\" to activate"))
;; ;; The following only works with AUCTeX loaded
;; ;; To make PDFView jump to the relevant line of the LaTeX source by Cmd + Click:
  (require 'tex-site)
  (add-hook 'TeX-mode-hook
  	  (lambda ()
  	    (add-to-list 'TeX-output-view-style
  			 '("^pdf$" "."
  			   "/Applications/PDFView.app/Contents/MacOS/gotoline.sh %n %(OutFullPath)"))
  	    (add-to-list 'TeX-expand-list
  			 '("%(OutFullPath)" (lambda nil
  					      (expand-file-name
  					       (TeX-active-master 
(TeX-output-extension) t)
  					       (TeX-master-directory))))))
  	  )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list