From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Re: PocketMod for org-mode Date: Thu, 18 Oct 2007 13:21:41 +0100 Message-ID: <87ir54oboq.fsf@bzg.ath.cx> References: <87zlyiprzz.fsf@novell.com> <87tzoqfszn.fsf@bzg.ath.cx> <877illubvt.fsf@bzg.ath.cx> <87d4vd6duh.fsf@bzg.ath.cx> <87sl49h2z6.fsf@novell.com> <87zlyh9osd.fsf@bzg.ath.cx> <873aw8ivpq.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IiTRo-0004NO-1L for emacs-orgmode@gnu.org; Thu, 18 Oct 2007 07:21:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IiTRj-0004Jm-Sk for emacs-orgmode@gnu.org; Thu, 18 Oct 2007 07:21:51 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IiTRj-0004JS-L3 for emacs-orgmode@gnu.org; Thu, 18 Oct 2007 07:21:47 -0400 Received: from fk-out-0910.google.com ([209.85.128.185]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IiTRi-0006Kn-U9 for emacs-orgmode@gnu.org; Thu, 18 Oct 2007 07:21:47 -0400 Received: by fk-out-0910.google.com with SMTP id 19so146782fkr for ; Thu, 18 Oct 2007 04:21:45 -0700 (PDT) In-Reply-To: (Christian Egli's message of "Thu, 18 Oct 2007 09:51:35 +0000 (UTC)") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Christian Egli writes: >> Should we use `cal-tex.el'-like output (very nice but very specific, and >> not flexible)? Should we just use a straightforward verbatim display? >> Should we use sections for agenda with multiple views? > > A straightforward verbatim dump of the agenda view is fine for me. In > fact I was just going to use the ps output in my Makefile. Try this patch against Org 5.12c: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=org.el.patch diff -u /home/guerry/elisp/testing/org/org.el /home/guerry/elisp/testing/bzg/org.el --- /home/guerry/elisp/testing/org/org.el 2007-10-12 20:32:10.000000000 +0100 +++ /home/guerry/elisp/testing/bzg/org.el 2007-10-18 13:17:18.000000000 +0100 @@ -17885,7 +17885,8 @@ (error "Cannot write agenda to file %s" file)) (cond ((string-match "\\.html?\\'" file) (require 'htmlize)) - ((string-match "\\.ps\\'" file) (require 'ps-print))) + ((string-match "\\.ps\\'" file) (require 'ps-print)) + ((string-match "\\.tex\\'" file) (require 'org-export-latex))) (org-let (if nosettings nil org-agenda-exporter-settings) '(save-excursion (save-window-excursion @@ -17903,6 +17904,23 @@ (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s" file)) + ((string-match "\\.tex\\'" file) + (let ((buffer-file-name file)) + (set-buffer (org-export-as-latex nil nil nil "*Org LaTeX export*"))) + (goto-char (point-min)) + (save-excursion + (when (re-search-forward "^[a-zA-Z0-9]" nil t) + (replace-match "\\\\begin{verbatim}\n\\&" t nil)) + (while (re-search-forward + "\\\\\\([a-z]+\\){\\([^}]+\\)}\\(?:{\\([^}]+\\)}\\)?" nil t) + (unless (string-match "begin\\|end" (match-string 1)) + (replace-match (or (match-string 3) (match-string 2)) t t)))) + (while (re-search-forward "\\[\\\\#" nil t) + (replace-match "[#" t t)) + (when (search-forward "\\end{document}" nil t) + (replace-match "\\\\end{verbatim}\n\\&" t nil)) + (write-file file) + (message "LaTeX written to %s" file)) ((string-match "\\.ps\\'" file) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) Diff finished. Thu Oct 18 13:18:45 2007 --=-=-= This is just a temporary workaround, but it might be enough in most cases. It performs a few checks on the LaTeX output so that links and priorities are correctly displayed in the verbatim environment. -- Bastien --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--