[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Re: PocketMod for org-mode
From: |
Bastien |
Subject: |
Re: [Orgmode] Re: PocketMod for org-mode |
Date: |
Thu, 18 Oct 2007 13:21:41 +0100 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux) |
Christian Egli <address@hidden> 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:
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
- [Orgmode] Re: PocketMod for org-mode, (continued)
- [Orgmode] Re: PocketMod for org-mode, Christian Egli, 2007/10/17
- [Orgmode] Re: PocketMod for org-mode, Christian Egli, 2007/10/17
- Re: [Orgmode] Re: PocketMod for org-mode, Bastien, 2007/10/17
- [Orgmode] Re: PocketMod for org-mode, Leo, 2007/10/17
- Re: [Orgmode] Re: PocketMod for org-mode, Bastien, 2007/10/18
- [Orgmode] Re: PocketMod for org-mode, Christian Egli, 2007/10/18
- Re: [Orgmode] Re: PocketMod for org-mode,
Bastien <=
- Re: [Orgmode] Re: PocketMod for org-mode, Carsten Dominik, 2007/10/25
- [Orgmode] Re: PocketMod for org-mode, Christian Egli, 2007/10/25
- [Orgmode] Re: PocketMod for org-mode, Christian Egli, 2007/10/25
- Re: [Orgmode] Re: PocketMod for org-mode, Bastien, 2007/10/25
[Orgmode] Re: PocketMod for org-mode, Dan Griswold, 2007/10/16