From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: tex-mode.el/`tex-view' (diff)
Date: Mon, 18 Oct 2004 14:18:48 GMT [thread overview]
Message-ID: <jwvmzykjf03.fsf-monnier+gnu.emacs.sources@gnu.org> (raw)
In-Reply-To: mailman.3714.1098057205.2017.gnu-emacs-sources@gnu.org
> (defun set-tex-dvi-view-command ()
> (setq tex-dvi-view-command
> (concat "dvips -o tex-output.ps * && "
> (if (with-temp-buffer (insert (shell-command-to-string "ps -a"))
> (goto-char (point-min))
> (search-forward-regexp "gv$" nil t))
> (concat "ratpoison -c \"select "
> (with-temp-buffer (insert (shell-command-to-string "ratpoison -c windows"))
> (goto-char (point-min))
> (search-forward-regexp "\\([0-9]+\\)[-+*]gv.*" nil t)
> (let ((matched (match-string 1)))
> matched))
> "\"")
> "gv -watch tex-output.ps"))))
Why not create a script like
#!/bin/sh
winnum=$(ratpoison -c windows | sed -n -e 's/\([0-9]+\)[-+*]gv.*/\1/p')
if [ "$winnum" = "" ]; then
gv -watch "$1"
else
ratpoison -c "select $winnum"
fi
and then use it in tex-dvi-view-command ?
It has the advantage of also working in tex-compile-commands without having
to additionally hack that code.
Stefan
parent reply other threads:[~2004-10-18 14:18 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <mailman.3714.1098057205.2017.gnu-emacs-sources@gnu.org>]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvmzykjf03.fsf-monnier+gnu.emacs.sources@gnu.org \
--to=monnier@iro.umontreal.ca \
/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.
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).