unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* new dired viewer
@ 2003-04-01 20:55 John Russell
  0 siblings, 0 replies; 3+ messages in thread
From: John Russell @ 2003-04-01 20:55 UTC (permalink / raw)


This isn't so much a bug report as a suggestion.  I just downloaded
emacs from cvs yesterday.  I really like the dired viewer that allows
the spawning of external viewers for certain file types.  However, emacs
seems to have to wait for the process to die.  Is there any way to start
a viewer and then cut it loose?  It would be nice to view a pdf in xpdf
and still be able to use emacs afterward.  Thanks.

John

^ permalink raw reply	[flat|nested] 3+ messages in thread

* new dired viewer
@ 2003-04-03  1:40 Luc Teirlinck
  2003-04-03 14:44 ` John Russell
  0 siblings, 1 reply; 3+ messages in thread
From: Luc Teirlinck @ 2003-04-03  1:40 UTC (permalink / raw)
  Cc: bug-gnu-emacs

John Russell wrote:

    This isn't so much a bug report as a suggestion.  I just downloaded
    emacs from cvs yesterday.  I really like the dired viewer that allows
    the spawning of external viewers for certain file types.  However,
    emacs seems to have to wait for the process to die.  Is there any way
    to start a viewer and then cut it loose?  It would be nice to view a
    pdf in xpdf and still be able to use emacs afterward.  Thanks.

! xpdf * &

is probably the most convenient available way.  I do not know whether
this is convenient enough for your purposes.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: new dired viewer
  2003-04-03  1:40 new dired viewer Luc Teirlinck
@ 2003-04-03 14:44 ` John Russell
  0 siblings, 0 replies; 3+ messages in thread
From: John Russell @ 2003-04-03 14:44 UTC (permalink / raw)
  Cc: bug-gnu-emacs

>     This isn't so much a bug report as a suggestion.  I just downloaded
>     emacs from cvs yesterday.  I really like the dired viewer that allows
>     the spawning of external viewers for certain file types.  However,
>     emacs seems to have to wait for the process to die.  Is there any way
>     to start a viewer and then cut it loose?  It would be nice to view a
>     pdf in xpdf and still be able to use emacs afterward.  Thanks.

> ! xpdf * &
> 
> is probably the most convenient available way.  I do not know whether
> this is convenient enough for your purposes.

Actually, rms sent me this fix which is exactly what I was hoping for. 




How about this replacement function?


(defun dired-view-file ()
  "In Dired, examine a file in view mode, returning to dired when done.
When file is a directory, show it in this buffer if it is inserted.
Some kinds of files are displayed using external viewer programs;
see `dired-view-command-alist'.  Otherwise, display it in another
buffer."
  (interactive)
  (let ((file (dired-get-file-for-visit)))
    (if (file-directory-p file)
        (or (and (cdr dired-subdir-alist)
                 (dired-goto-subdir file))
            (dired file))
      (let (cmd)
        ;; Look for some other way to view a certain file.
        (dolist (elt dired-view-command-alist)
          (if (string-match (car elt) file)
              (setq cmd (cdr elt))))
        (if cmd
            (call-process shell-file-name nil 0 nil
                          "-c"
                          (concat cmd " "
                                  (shell-quote-argument file)
                                  " &"))
          (view-file file))))))

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-04-03 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-03  1:40 new dired viewer Luc Teirlinck
2003-04-03 14:44 ` John Russell
  -- strict thread matches above, loose matches on Subject: below --
2003-04-01 20:55 John Russell

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).