eev
[Top][All Lists]
Advanced

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

[eev] eebg-gv does not working + eebg-xpdf


From: Nikos Apostolakis
Subject: [eev] eebg-gv does not working + eebg-xpdf
Date: Sun, 02 Mar 2008 08:44:13 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

Hello group,

for some reason the original code of eebg doesn't work on my system
(Debian sid, gv 3.6.2).  With the following, rather trivial
modification it seems to work fine:

(defun find-pspage (fname &optional n &rest ignore)
  (interactive "fPS or PDF file: ")
;;;;;;  nea: The following doesn't work:
;;  (let ((command (format "gv -page %d %s &" (or n 1) fname))) 
;; nea: begin my correction
  (let ((command (format "gv --page=%d %s &" (or n 1) fname)))
;; nea: end my correction
    (eev command nil)
    command))

(defun eebg-gv (fname &optional page gvargs)
  (interactive "fPS or PDF file: ")
  (apply 'start-process "gv" "*Messages*"
   (ee-flatten
;;;;;; nea: The following doesn't work:
;;   "gv" (if page (list "-page" (format "%d" page))) gvargs 
;; nea: begin my correction
     "gv" (if page (format "--page=%d" page)) gvargs
;; nea: end my correction.
     (ee-expand fname))))


Also, I usually prefer to open pdf files in xpdf since it offers
options that gv is lacking, for example following hyperlinks and 
seacrch functions.  So I've written the following functions to 
follow a hyperlink with xpdf:

;;
;; nea: hyperlink for viewing pdf's with xpdf.
(defun find-pdfpage (fname &optional n &rest ignore)
  (interactive "fPDF file: ")
  (let ((command (format
         (concat (if (string-match "\\.pdf\\.gz$" fname) "zxpdf "
;; "xpdf ")
              "%s %d &") fname (or n 1))))
    (eev command nil)
    command))

(defun eebg-xpdf (fname &optional page xpdfargs)
  (interactive "fPDF file: ")
  (apply 'start-process "xpdf" "*Messages*"
   (ee-flatten
     (if (string-match "\\.pdf\\.gz$" fname) "zxpdf" "xpdf")
  xpdfargs
    (ee-expand fname)
      (if page (format " %d" page)))))
;;nea: end

Best, 
Nikos






reply via email to

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