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

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

bug#17059: 24.3; cannot view extracted text for a pdf


From: John Covici
Subject: bug#17059: 24.3; cannot view extracted text for a pdf
Date: Fri, 21 Mar 2014 11:46:10 -0400

go into emacs.  I will enclose my .emacs or attach.
Here is my .emacs
--------------------
(setq  gnus-inhibit-startup-message t        )

(setq default-major-mode 'text-mode)
(load "bookmark")
(load "saveplace")
(setq-default save-place t)
(setq history-length t)

(add-hook'c-mode-common-hook 
 (function(lambda()
(c-toggle-auto-state 1))))
   (autoload 'csharp-mode "csharp-mode" "Major mode for editing C# code." t)
   (setq auto-mode-alist
      (append '(("\\.cs$" . csharp-mode)) auto-mode-alist))
   (setq auto-mode-alist
      (append '(("\\.cs$" . csharp-mode)) auto-mode-alist))

(add-hook 'text-mode-hook 'turn-on-auto-fill)
(global-set-key [f1] 'help-command)
(global-set-key "\C-s" 'nonincremental-re-search-forward)
(global-set-key "\C-r" 'nonincremental-re-search-backward)
(global-set-key [f6] 'nonincremental-repeat-search-forward)
(global-set-key [f7] 'nonincremental-repeat-search-backward)
(global-set-key [f8] 'replace-regexp)
(global-set-key [f9] 'repeat-matching-complex-command)
(global-set-key [home] 'beginning-of-line)
(global-set-key [end] 'end-of-line)
(column-number-mode 1)

;(autoload 'perl-mode "cperl-mode" "alternate mode for editing Perl programs" t)
(add-hook'cperl-mode-hook
 (function(lambda()
(setq cperl-hairy t)
(setq cperl-extra-newline-before-brace 1)
(setq cperl-auto-newline 1)
(setq cperl-auto-newline-after-colon 1)
(setq cperl-indent-level 4)
(setq cperl-electric-parens-string nil)
(setq cperl-continued-statement-offset 0)

)))

;; Add signature at the end of the email.
(add-hook 'mh-letter-mode-hook
       '(lambda () (save-excursion
               (goto-char (point-max))
               (mh-insert-signature))))
(setq-default next-line-add-newlines nil)
(setq font-running-xemacs nil)
;          (defun turn-off-backup ()
;            (set (make-local-variable 'version-control) 2))
          
;(add-hook 'nnfolder-save-buffer-hook (lambda () (turn-off-backup)))
(setq next-screen-context-lines 0)
(setq inhibit-startup-message t)
(menu-bar-mode -1); turn off those ------- menus
(setq browse-url-lynx-input-attempts 1)
(setq browse-url-lynx-emacs-args "-showcursor")
(defun browse-url-lynx-emacs (url &optional new-buffer)
  "Ask the Lynx WWW browser to load URL.
Default to the URL around or before point.  With a prefix argument, run
a new Lynx process in a new buffer.

When called interactively, if variable `browse-url-new-window-flag' is
non-nil, load the document in a new lynx in a new term window,
otherwise use any existing one.  A non-nil interactive prefix argument
reverses the effect of `browse-url-new-window-flag'.

When called non-interactively, optional second argument NEW-WINDOW is
used instead of `browse-url-new-window-flag'."
  (interactive (browse-url-interactive-arg "Lynx URL: "))
  (let* ((system-uses-terminfo t)       ; Lynx uses terminfo
         ;; (term-term-name "vt100") ; ??
         (buf (get-buffer "*lynx*"))
         (proc (and buf (get-buffer-process buf)))
         (n browse-url-lynx-input-attempts))
    (if (and (browse-url-maybe-new-window new-buffer) buf)
        ;; Rename away the OLD buffer. This isn't very polite, but
        ;; term insists on working in a buffer named *lynx* and would
        ;; choke on *lynx*<1>
        (progn (set-buffer buf)
               (rename-uniquely)))
    (if (or (browse-url-maybe-new-window new-buffer)
            (not buf)
            (not proc)
            (not (memq (process-status proc) '(run stop))))
        ;; start a new lynx
        (progn
          (setq buf
                (apply #'make-term
                       `("lynx" "lynx" nil ,@browse-url-lynx-emacs-args
                         ,url)))
          (switch-to-buffer buf)
          (term-char-mode)
          (set-process-sentinel
           (get-buffer-process buf)
           ;; Don't leave around a dead one (especially because of its
           ;; munged keymap.)
           (lambda (process event)
             (if (not (memq (process-status process) '(run stop)))
                 (let ((buf (process-buffer process)))
                   (if buf (kill-buffer buf)))))))
      ;; send the url to lynx in the old buffer
      (let ((win (get-buffer-window buf t)))
        (if win
            (select-window win)
          (switch-to-buffer buf)))
      (if (eq (following-char) ?_)
          (cond ((eq browse-url-lynx-input-field 'warn)
                 (error "Please move out of the input field first"))
                ((eq browse-url-lynx-input-field 'avoid)
                 (while (and (eq (following-char) ?_) (> n 0))
                   (term-send-down) ; down arrow
                   (sit-for browse-url-lynx-input-delay))
                 (if (eq (following-char) ?_)
                     (error "Cannot move out of the input field, sorry")))))
      (term-send-string proc (concat "g" ; goto
                                     "\C-u" ; kill default url
                                     url
                                     "\r")))))

(defun forward-word-to-nonblank ()
"forwards past the blank space where forward-word normally lands"
(interactive)
(forward-word 2)
(forward-word -1)
)
(global-set-key [\C-right] 'forward-word-to-nonblank)
(global-set-key [\M-right] 'forward-word-to-nonblank)
(global-set-key "\M-f" 'forward-word-to-nonblank)
 
(defun  eir-fix-articles () 
"function to replaceeir articles with correct versions and do cleanup"
(setq ignore-auto 1)
(setq noconfirm 1)
(setq preserve-modes 1)
(shell-command "ls *.TXT >temp.sc")
(shell-command "chmod u+x temp.sc")
(find-file "temp.sc")
(goto-char (point-min))
  (while (re-search-forward "^.*$" nil t)
    (replace-match "\\& \\&" nil nil))
(goto-char (point-min))
  (while (re-search-forward " EIR...\$*" nil t)
    (replace-match " " nil nil))
(goto-char (point-min))
  (while (re-search-forward "\\$" nil t)
    (replace-match "\\\\$" nil nil))
(goto-char (point-min))
  (while (re-search-forward "^" nil t)
    (replace-match "mv " nil nil))
(beginning-of-line)
(kill-line)
(save-buffer)
(shell-command "./temp.sc")
(when (file-exists-p "CON.TXT")
(rename-file "CON.TXT" "CONX.TXT"))
(shell-command "ls *.TXT >temp.sc")
(revert-buffer ignore-auto noconfirm preserve-modes)
(goto-char (point-min))
  (while (re-search-forward "^" nil t)
    (replace-match "miles2 " nil nil))
(beginning-of-line)
(kill-line)
(save-buffer)
(shell-command "./temp.sc")
(shell-command "ls -1 -F -a .. >temp.sc")
(revert-buffer ignore-auto noconfirm preserve-modes)
(goto-char (point-min))
(re-search-forward "txt/" nil t)
(beginning-of-line)
(kill-line)
(kill-line)
(goto-char (point-min))
(kill-line)
(kill-line)
(kill-line)
(kill-line)
  (while (re-search-forward "\*" nil t)
    (replace-match "" nil nil))
(goto-char (point-min))
  (while (re-search-forward "^.*$" nil t)
    (replace-match "\\& \\&" nil nil))
(goto-char (point-min))
  (while (re-search-forward "\\..* " nil t)
    (replace-match ".art ../" nil nil))
(goto-char (point-min))
  (while (re-search-forward "^" nil t)
    (replace-match "mv " nil nil))
(beginning-of-line)
(kill-line)
(save-buffer)
)
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(browse-url-browser-function (quote browse-url-lynx-emacs))
 '(browse-url-lynx-emacs-args nil t)
 '(browse-url-lynx-input-field nil)
 '(canlock-password "5de3542f3d08b117db60777f7b3f934ff0248a72")
 '(delete-old-versions t)
 '(desktop-missing-file-warning nil)
 '(desktop-path (quote (".")))
 '(desktop-save t)
 '(desktop-save-mode t nil (desktop))
 '(dired-kept-versions 1)
 '(dired-recursive-copies (quote always))
 '(dired-recursive-deletes (quote always))
 '(doc-view-conversion-refresh-interval 0)
 '(doc-view-pdftotext-program "pdftotext")
 '(doc-view-unoconv-program "odt2txt")
 '(erc-log-channels-directory "~/irclog")
 '(erc-log-mode t)
 '(erc-log-write-after-insert t)
 '(erc-log-write-after-send t)
 '(erc-nick "covici")
 '(kept-new-versions 5)
 '(kept-old-versions 0)
 '(large-file-warning-threshold 93000000)
 '(line-number-display-limit 100000000)
 '(mail-archive-file-name "copy_of_outgoing.txt")
 '(mail-default-headers nil)
 '(mail-default-reply-to "covici@ccs.covici.com")
 '(mail-host-address nil)
 '(mail-send-nonascii nil)
 '(mail-signature t)
 '(mail-use-rfc822 t)
 '(mail-user-agent (quote message-user-agent))
 '(mail-yank-ignored-headers 
"^via:\\|^mail-from:\\|^origin:\\|^status:\\|^remailed\\|^received:\\|^message-id:\\|^summary-line:\\|^in-reply-to:\\|^return-path:")
 '(mail-yank-prefix ">")
 '(mh-compose-space-does-completion-flag t)
 '(mh-delete-yanked-msg-window-flag t)
 '(mh-display-buttons-for-alternatives-flag t)
 '(mh-forward-subject-format "%s: %s (fwd)")
 '(mh-identity-default nil)
 '(mh-identity-list (quote (("covici" ((":pgg-default-user-id" . "covici"))))))
 '(mh-invisible-header-fields (quote ("Organization" "Sender" "User-agent" 
"X-")))
 '(mh-reply-default-reply-to "all")
 '(mh-yank-behavior (quote autoattrib))
 '(next-line-add-newlines nil)
 '(pgg-query-keyserver t)
 '(save-place-version-control (quote nospecial))
 '(scroll-down-aggressively nil)
 '(scroll-up-aggressively nil)
 '(split-width-threshold nil)
 '(tab-width 5)
 '(track-eol t)
 '(undo-ask-before-discard nil)
 '(undo-limit 30000)
 '(undo-outer-limit 4000000)
 '(undo-strong-limit 40000)
 '(url-automatic-caching t)
 '(url-keep-history t)
 '(url-news-server "news.patriot.net")
 '(url-personal-mail-address "covici@ccs.covici.com")
 '(url-privacy-level (quote none))
 '(user-full-name "John Covici")
 '(version-control t)
 '(w3-maximum-line-length 80))

(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )




(add-hook 'w3-mode-hook (lambda () (setq truncate-lines nil)))
;;; Emacs-w3 configuration options
(autoload 'w3-preview-this-buffer "w3" "WWW Previewer" t)
(autoload 'w3-follow-url-at-point "w3" "Find document at pt" t)
(autoload 'w3 "w3" "WWW Browser" t)
(autoload 'w3-open-local "w3" "Open local file for WWW browsing" t)
(autoload 'w3-fetch "w3" "Open remote file for WWW browsing" t)
(autoload 'w3-use-hotlist "w3" "Use shortcuts to view WWW docs" t)
(autoload 'w3-show-hotlist "w3" "Use shortcuts to view WWW docs" t)
(autoload 'w3-follow-link "w3" "Follow a hypertext link." t)
(autoload 'w3-batch-fetch "w3" "Batch retrieval of URLs" t)
(autoload 'url-get-url-at-point "url" "Find the url under the cursor" nil)
(autoload 'url-file-attributes  "url" "File attributes of a URL" nil)
(autoload 'url-popup-info "url" "Get info on a URL" t)
(autoload 'url-retrieve   "url" "Retrieve a URL" nil)
(autoload 'url-buffer-visiting "url" "Find buffer visiting a URL." nil)
(autoload 'gopher-dispatch-object "gopher" "Fetch gopher dir" t)
;;; End of Emacs-w3 configuration options
;;; Emacs-w3 configuration options
(autoload 'w3-preview-this-buffer "w3" "WWW Previewer" t)
(autoload 'w3-follow-url-at-point "w3" "Find document at pt" t)
(autoload 'w3 "w3" "WWW Browser" t)
(autoload 'w3-open-local "w3" "Open local file for WWW browsing" t)
(autoload 'w3-fetch "w3" "Open remote file for WWW browsing" t)
(autoload 'w3-use-hotlist "w3" "Use shortcuts to view WWW docs" t)
(autoload 'w3-show-hotlist "w3" "Use shortcuts to view WWW docs" t)
(autoload 'w3-follow-link "w3" "Follow a hypertext link." t)
(autoload 'w3-batch-fetch "w3" "Batch retrieval of URLs" t)
(autoload 'url-get-url-at-point "url" "Find the url under the cursor" nil)
(autoload 'url-file-attributes  "url" "File attributes of a URL" nil)
(autoload 'url-popup-info "url" "Get info on a URL" t)
(autoload 'url-retrieve   "url" "Retrieve a URL" nil)
(autoload 'url-buffer-visiting "url" "Find buffer visiting a URL." nil)
(autoload 'gopher-dispatch-object "gopher" "Fetch gopher dir" t)
;;; End of Emacs-w3 configuration options

;;; Emacs/W3 Configuration
(setq load-path (cons "/usr/share/emacs/site-lisp" load-path))
(condition-case () (require 'w3-auto "w3-auto") (error nil))

(put 'upcase-region 'disabled nil)
   (autoload 'vm "vm" "Start VM on your primary inbox." t)
   (autoload 'vm-visit-folder "vm" "Start VM on an arbitrary folder." t)
   (autoload 'vm-visit-virtual-folder "vm" "Visit a VM virtual folder." t)
   (autoload 'vm-mode "vm" "Run VM major mode on a buffer" t)
   (autoload 'vm-mail "vm" "Send a mail message using VM." t)
   (autoload 'vm-submit-bug-report "vm" "Send a bug report about VM." t)
----------------------

Then find a pdf with text.
In emacs23 you immediately get the unable to render file prompt.  In 24,
you get the pdf raw.  Now do escape-x and type docview-mode.
Now you get the unable to render file prompt.  When you hit y to the
view extracted text instead, you get the following:
DocView: process pdf->txt changed status to killed.

By the way, this is done from a text console.




In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.8.2)
 of 2013-08-26 on ccs.covici.com
System Description:     Gentoo Base System release 2.2

Configured using:
 `configure '--prefix=/usr' '--build=x86_64-pc-linux-gnu'
 '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man'
 '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc'
 '--localstatedir=/var/lib' '--libdir=/usr/lib64'
 '--disable-dependency-tracking' '--program-suffix=-emacs-24'
 '--infodir=/usr/share/info/emacs-24'
 '--enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../lib64'
 '--with-gameuser=games' '--without-compress-info' '--without-hesiod'
 '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus'
 '--without-gnutls' '--with-xml2' '--without-selinux'
 '--without-wide-int' '--with-sound' '--with-x' '--without-ns'
 '--without-gconf' '--without-gsettings' '--without-toolkit-scroll-bars'
 '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff'
 '--with-xpm' '--without-imagemagick' '--without-xft' '--without-libotf'
 '--without-m17n-flt' '--with-x-toolkit=gtk3'
 'GENTOO_PACKAGE=app-editors/emacs-24.3-r2'
 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu'
 'CFLAGS=-O2 -mtune=core2 -pipe -ggdb' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed'
 'CPPFLAGS=''

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Text

Minor modes in effect:
  doc-view-minor-mode: t
  gpm-mouse-mode: t
  desktop-save-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  auto-fill-function: do-auto-fill
  transient-mark-mode: t

Recent input:
C-x C-f 1 0 0 0 TAB RET ESC x C-g ESC x d o c TAB - 
DEL v TAB C-g ESC x d o v DEL c i v DEL DEL v i e w 
TAB DEL DEL DEL DEL DEL DEL DEL d o c - v i e TAB m 
o d e RET y ESC x r e p o r t - b u TAB RET

Recent messages:
Desktop: 0 buffers restored.
For information about GNU Emacs and the GNU system, type C-h C-a.
Quit
Making completion list...
Quit
No PNG support is available, or some conversion utility for pdf files is 
missing.
Error during redisplay: (eval (number-to-string (doc-view-current-page))) 
signaled (wrong-type-argument numberp nil)
Unable to render file.  View extracted text instead? (y or n)  y
Type C-c C-c to toggle between editing or viewing the document.
DocView: process pdf->txt changed status to killed.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr warnings emacsbug message format-spec
cl rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils help-mode doc-view easymenu jka-compr
image-mode dired edmacro pcase kmacro t-mouse time-date desktop
easy-mmode cus-start cus-load saveplace bookmark cl-macs gv derived
cl-lib pp site-gentoo tooltip ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind dynamic-setting move-toolbar gtk x-toolkit x multi-tty emacs)

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici
         covici@ccs.covici.com





reply via email to

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