emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: emacs-orgmode@gnu.org
Subject: Re: Re: PocketMod for org-mode
Date: Thu, 18 Oct 2007 13:21:41 +0100	[thread overview]
Message-ID: <87ir54oboq.fsf@bzg.ath.cx> (raw)
In-Reply-To: <loom.20071018T094832-18@post.gmane.org> (Christian Egli's message of "Thu, 18 Oct 2007 09:51:35 +0000 (UTC)")

[-- Attachment #1: Type: text/plain, Size: 430 bytes --]

Christian Egli <christian.egli@novell.com> 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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org.el.patch --]
[-- Type: text/x-diff, Size: 1772 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 216 bytes --]


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

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

  reply	other threads:[~2007-10-18 11:21 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-16 23:19 PocketMod for org-mode Christian Egli
2007-10-17  1:08 ` Bastien
2007-10-17 11:58   ` Christian Egli
2007-10-17 13:08     ` Bastien
2007-10-17 12:51       ` Christian Egli
2007-10-17 14:00         ` Bastien
     [not found]           ` <q4odex6f0i.fsf@home.net>
2007-10-17 15:00             ` Bastien
2007-10-17 20:59           ` Christian Egli
2007-10-18  1:47             ` Bastien
2007-10-18  1:37               ` Leo
2007-10-18 10:05                 ` Bastien
2007-10-18  9:51                   ` Christian Egli
2007-10-18 12:21                     ` Bastien [this message]
2007-10-25  5:48     ` Carsten Dominik
2007-10-25 12:46       ` Christian Egli
2007-10-25 20:29         ` Christian Egli
2007-10-26  1:56           ` Bastien
2007-10-17  2:03 ` Dan Griswold
2007-10-17  9:42   ` Leo
2007-10-17 10:56     ` Dan Griswold
2007-10-17 11:47     ` Bastien
2007-10-17 12:14     ` pete phillips
2007-10-17 13:36       ` Bastien
2007-10-17 12:02   ` Christian Egli
2007-10-17 20:15     ` Dan Griswold
2007-10-17 10:09 ` Ian Barton
2007-10-17 10:25   ` Leo
2007-10-17 10:45     ` Ian Barton
2007-10-17 10:36   ` [OT] pdfjam [Was: PocketMod for org-mode] Stefan Kamphausen
2007-10-17 11:46   ` PocketMod for org-mode Bastien

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.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ir54oboq.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).