From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: Emacs bindings in other programs
Date: Fri, 23 Nov 2007 16:05:47 +1100 [thread overview]
Message-ID: <873auxzh3o.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: fi56bm$rqt$1@reader1.panix.com
dkcombs@panix.com (David Combs) writes:
> In article <87d4usupsu.fsf@lion.rapttech.com.au>,
> Tim X <timx@nospam.dev.null> wrote:
>>
>>Note that you can call other X apps from within emacs as a sub-process, you
>>just can't run them 'within' emacs itself. The downside is that you don't ...
>
> Like in dired, "!" on a .ps-file will run ghostview (I think I reacall), on a
> .pdf will use either acrobat or xpdf, etc.
>
> For me, the problem is that when you do that, everything else
> in emacs is (or looks like it's) frozen.
>
> Problematic when you want to read through some doc, and
> while doing it, to pause while checking something out in some
> other buffer. No can do, at least not by "!" alone.
>
> Would be nice if, say, a C-u ! put the new prog into
> background or something, letting you bounce back and forth
> between emacs and the app.
>
I think this is just a limitation in how dired does the command call. Emacs
can do synchronous and asynchronous processes. I believe other packages
that can be used to call a new process to run another program can do it
asynchronously and therefore don't block emacs. Not sure if/how you can
make dired do this automatically, but if, for example, you have the cursor
on a pdf file and hit !, you will be prompted (with a default of something
like xpdf) for the program. If you enter xpdf * &, rather than accepting
the default, emacs will do an asynchronous process call to run xpdf and you
will be able to switch between xpdf and emacs with no problems.
It may be possible to make this behavior the default by customizing dired
or dired-x.
My issue isn't the sunchronous/asynchronous problem, its that once I have
(lets say) xpdf running, if I want to cut and copy bits into an emacs
buffer, I have to use that bloody awful rodent and not the familiar and
faster emacs keybindings. Same sort of issue with searching and other
operations. For this reason, I've written my own little converter utility
which takes the file type (*.doc, *.pdf, *.ps etc) and converts it to text
and displays it in an emacs buffer. You do lose some formatting, but I find
this is offset by the better integration into emacs. I use a defadvice on
view-file so that if I hit v in dired on one of these file types, it
automatically does the conversion - otherwise it just views the file as
normal. I've also added a call to browse-url for files ending in html or
htm, so if I hit v on an html file, it is rendered with w3m. If I want to
see the actual contents for any of the file types that are handled
specially, I just use enter rather than 'v'.
Tim
--
tcross (at) rapttech dot com dot au
next prev parent reply other threads:[~2007-11-23 5:05 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-26 16:33 Emacs bindings in other programs YSK
2007-10-27 0:29 ` Xah Lee
2007-10-28 3:55 ` YSK
2007-10-31 0:15 ` John
2007-10-31 7:27 ` Sebastian Tennant
2007-10-31 7:47 ` Martin Rubey
2007-10-31 16:30 ` Stefan Monnier
2007-10-31 17:52 ` Martin Rubey
2007-10-31 20:06 ` Joel J. Adamson
2007-11-02 1:23 ` Stefan Monnier
2007-11-03 0:37 ` Tim X
2007-11-05 23:02 ` David Kastrup
2007-11-23 0:20 ` David Combs
2007-11-23 5:05 ` Tim X [this message]
2007-10-31 18:16 ` Amy Templeton
[not found] ` <mailman.2805.1193854394.18990.help-gnu-emacs@gnu.org>
2007-10-31 19:06 ` Rajappa Iyer
2007-10-31 14:12 ` Joel J. Adamson
2007-10-31 14:14 ` Joel J. Adamson
2007-10-31 18:11 ` YSK
2007-10-31 18:15 ` YSK
2007-10-31 19:19 ` Sven Bretfeld
2007-10-31 20:08 ` Joel J. Adamson
2007-12-04 13:08 ` Sebastian Tennant
[not found] ` <mailman.4489.1196774026.18990.help-gnu-emacs@gnu.org>
2007-12-04 14:46 ` Joel J. Adamson
2007-12-04 20:55 ` Sebastian Tennant
2007-12-04 19:56 ` Malte Spiess
2007-12-04 22:02 ` Sebastian Tennant
2007-12-16 19:05 ` David Combs
2007-12-17 20:51 ` Malte Spiess
[not found] ` <mailman.2808.1193858401.18990.help-gnu-emacs@gnu.org>
2007-10-31 20:22 ` YSK
2007-11-01 3:20 ` Alok G. Singh
[not found] ` <mailman.2824.1193886791.18990.help-gnu-emacs@gnu.org>
2007-11-06 21:31 ` YSK
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873auxzh3o.fsf@lion.rapttech.com.au \
--to=timx@nospam.dev.null \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.