From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yagnesh Raghava Yakkala Subject: Re: Near real-time preview of PDF/ODT export? Date: Mon, 25 Nov 2013 21:25:04 +0900 Message-ID: <87bo184qjj.fsf@yagnesh.org> References: <87wqk0o7uj.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkvEF-0004eU-3K for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 07:25:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VkvE9-0003lL-RT for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 07:25:27 -0500 Received: from plane.gmane.org ([80.91.229.3]:54415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkvE9-0003l9-L5 for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 07:25:21 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VkvE7-00021y-CL for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 13:25:19 +0100 Received: from sealion.lowtem.hokudai.ac.jp ([133.87.217.30]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Nov 2013 13:25:19 +0100 Received: from hi by sealion.lowtem.hokudai.ac.jp with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Nov 2013 13:25:19 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain On Nov 22 2013, Bastien wrote: Hello all, I have been using a simple bash script with a Makefile to make pdf file to be updated with org source on each save while I am editing. It is working fine for me. Of course its not exactly real time but fast enough feedback for me. I am attaching my files hoping that they may be useful for others. one may need to edit init.el and Makefile for their use case. I run something like this. $ watcher.sh paper.org make Watcher script checks every second to see if the org file is modified and runs make command. --=-=-= Content-Type: text/x-sh Content-Disposition: attachment; filename=watcher.sh #!/bin/bash FILE="$1" CMD="$2" LAST=`ls -l "$FILE"` while true; do sleep 1 NEW=`ls -l "$FILE"` if [ "$NEW" != "$LAST" ]; then t="$(date +%s)" echo "watcher action started at " $(date) "$CMD" 2>&1 | tee /tmp/wathcer.log.$$ LAST="$NEW" t="$(($(date +%s)-t))" printf "done; %02d:%02d\n" "$((t/60%60))" "$((t%60))" fi done --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=Makefile Content-Transfer-Encoding: base64 RU1BQ1M9ZW1hY3MKQkFUQ0hfRU1BQ1M9JChFTUFDUykgLS1iYXRjaCAtUSAtbCBpbml0LmVsCk1B SU5ET0MJPSBwYXBlcgpSTSA9IHJtCgolLnRleDoKCSQoQkFUQ0hfRU1BQ1MpICQqLm9yZyAtZiBv cmctbGF0ZXgtZXhwb3J0LXRvLWxhdGV4CgolLnBkZjogJS50ZXgKCWlmIHBkZmxhdGV4ICQqLnRl eCA8L2Rldi9udWxsOyB0aGVuIFwKCQl0cnVlOyBcCgllbHNlIFwKCQlzdGF0PSQkPzsgdG91Y2gg JCoucGRmOyBleGl0ICQkc3RhdDsgXAoJZmkKCWJpYnRleCAkKgoJd2hpbGUgZ3JlcCAiUmVydW4g dG8gZ2V0IiAkKi5sb2c7IGRvIFwKCQlpZiBwZGZsYXRleCAkKi50ZXggPC9kZXYvbnVsbDsgdGhl biBcCgkJCXRydWU7IFwKCQllbHNlIFwKCQkJc3RhdD0kJD87IHRvdWNoICQqLnBkZjsgZXhpdCAk JHN0YXQ7IFwKCQlmaTsgXAoJZG9uZQoKYWxsOiBwZGYKdGV4OiAkKE1BSU5ET0MpLnRleApwZGY6 ICQoTUFJTkRPQykucGRmCmh0bWw6CgkkKEJBVENIX0VNQUNTKSAkKE1BSU5ET0MpLm9yZyAtZiBv cmctaHRtbC1leHBvcnQtYXMtaHRtbAoKY2xlYW46CgkkKFJNKSAtZiAqLmF1eCAqLmJibCAqLmJs ZyAqLmxvZwoKY2xlYW5hbGwgOiBjbGVhbgoJJChSTSkgLWYgKi5kdmkgKi5jZmcgKi5pZHggKi5p bGcgKi5pbmQgKi50b2MgKi5sb3QgKi5sb2YgKi5wZGYgKi5vdXQKCSQoUk0pIC1yZiAkKE1BSU5E T0MpCgouUEhPTlk6IGNsZWFuIGNsZWFuYWxsCg== --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=init.el Content-Transfer-Encoding: quoted-printable (setq user-full-name "Yagnesh Raghava Yakkala") (setq user-mail-address "hi@yagnesh.org") (setq el-get-install-dir "~/.emacs.d/el-get") (add-to-list 'load-path (cons (expand-file-name (concat el-get-install-dir "/el-get")) load-path)) (setq org-install-dir (concat el-get-install-dir "/org-mode")) (add-to-list 'load-path (concat org-install-dir "/contrib/lisp")) (add-to-list 'load-path (concat org-install-dir "/lisp")) (require 'org) (require 'ox-latex) ;;; ignore heading (defun org-latex-ignore-heading-filter-headline (headline backend info) "Strip headline from HEADLINE. Ignore BACKEND and INFO." (when (and (org-export-derived-backend-p backend 'latex) (string-match "\\`.*ignoreheading.*\n" headline)) (replace-match "" nil nil headline))) (add-to-list 'org-export-filter-headline-functions 'org-latex-ignore-heading-filter-headline) (setq org-export-allow-BIND t) (setq debug-on-error t) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Thanks., -- ఎందరో మహానుభావులు అందరికి వందనములు. YYR --=-=-=--