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

adding an option to emacspeak-wizards-pdf-open



I really should check on the list of emacspeak-wizards commands more
often, I usually find something new I've been doing a stupid way.  
Thus it was with emacspeak-wizards-pdf-open.  I did, though, find I
needed to switch between -layout and -raw depending on the supplied
file.  Attached is a trivial patch to add an option for this.  Diff
was generated against rev 4466.  
cheers
Peter
--- emacspeak-wizards.el	2007-04-24 22:06:07.000000000 +0200
+++ emacspeak-wizards.el.new	2007-04-24 22:01:13.000000000 +0200
@@ -2012,6 +2012,12 @@
   :type 'string
   :group 'emacspeak-wizards)
 
+(defcustom emacspeak-wizards-pdf-to-text-options
+  "-layout"
+  "options to Command for running pdftotext."
+  :type 'string
+  :group 'emacspeak-wizards)
+
 (defun emacspeak-wizards-pdf-open (filename)
   "Open pdf file as text."
   (interactive "fFilename:")
@@ -2019,8 +2025,8 @@
                                (file-name-sans-extension
                                 (file-name-nondirectory filename)))))
     (shell-command
-     (format "pdftotext -layout %s - | cat -s "
-             filename)
+     (format "%s %s  %s - | cat -s "
+             emacspeak-wizards-pdf-to-text-program emacspeak-wizards-pdf-to-text-options filename)
      output-buffer)
     (switch-to-buffer output-buffer)
     (set-buffer-modified-p nil)
 

-- 
Peter Rayner: LSCE/IPSL, Laboratoire CEA-CNRS-UVSQ
address: Bat. 701 LSCE - CEA de Saclay
Orme des Merisiers, 91191 Gif/Yvette
work: +33  (1) 69 08 88 11;	mobile: +33 (6) 75 46 56 52;	 fax: +33 (1) 69 08 77 16
mail-to: peter.rayner@xxxxxxxxxxx


If you have questions about this archive or had problems using it, please send mail to:

priestdo@xxxxxxxxxxx No Soliciting!

Emacspeak List Archive | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998 | Pre 1998

Emacspeak Files | Emacspeak Blog