? ?
Notes from a Medium-Sized Island [entries|archive|friends|userinfo]

[ website | My Website ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Sep. 28th, 2009|12:16 pm]
[Tags|, , , ]

Debian discovery of the day: old-ass programs that try to access /dev/dsp (such as xmms, which I was able to obtain by adding "deb ./" to my /etc/apt/sources.list — anyone know if there's a more canonical linux mp3 player that the kids are using these days?) can be placated by installing package oss-compat.

Emacs discovery of the day:
(defun jcreed-tex-file ()
  (let ((b (get-buffer "thesis.tex")))
    (when b (set-buffer b)))

(defun jcreed-tex-signal ()

    (let* ((proc (tex-shell-proc))
	   (buf (process-buffer proc))
	    (concat "kill -USR1 " (number-to-string (process-id (get-process "xdvi"))))))
      ;; Switch to buffer before checking for subproc output in it.
      (set-buffer buf)
      (goto-char (process-mark proc))
      (insert string)

Seems to accomplish what I want in terms of xdvi updating right away when I TeX a file. In my previous life as a one-screen computer user, this never mattered, since X11 refresh events (occurring as I paged down to it in fvwm2) were enough to tell xdvi that it might want to check whether the file it's visiting is fresh. Now it's just sitting there placidly on the other monitor, and I have to tell it explicitly. Just doing
(signal-process (process-id (get-process "xdvi")) 'usr1)
directly in jcreed-tex-signal wasn't enough, since the signal would get sent before the tex background job had finished. I wonder if there's a nice way of setting up an "after this shell command is done hook" in comint.

[User Picture]From: bhudson
2009-09-28 07:13 pm (UTC)
You could use a PDF viewer instead; most of those update automatically.
(Reply) (Thread)
From: ext_112345
2009-09-29 02:04 am (UTC)
I use xpdf, which doesn't update automatically and doesn't respond to USR1. However, I figured out how to send it an X11 event for (KeyDown, 'r'), which did the trick.
(Reply) (Parent) (Thread)
From: redglasses
2009-09-28 10:46 pm (UTC)
Commissioner, light the TeX-Signal!
(Reply) (Thread)