From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Buksas Subject: Re: Args out of range error when exporting agenda when maxlines > 0 Date: Thu, 30 Apr 2009 15:15:50 -0600 Message-ID: References: <9749.1241123534@alphaville.usa.hp.com> Reply-To: mike.buksas@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lzdbk-0006EH-OL for emacs-orgmode@gnu.org; Thu, 30 Apr 2009 17:15:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lzdbk-0006E4-4Q for emacs-orgmode@gnu.org; Thu, 30 Apr 2009 17:15:52 -0400 Received: from [199.232.76.173] (port=60461 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lzdbj-0006E1-UX for emacs-orgmode@gnu.org; Thu, 30 Apr 2009 17:15:52 -0400 Received: from yw-out-1718.google.com ([74.125.46.155]:63898) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lzdbj-0004TT-L6 for emacs-orgmode@gnu.org; Thu, 30 Apr 2009 17:15:51 -0400 Received: by yw-out-1718.google.com with SMTP id 5so1245518ywm.66 for ; Thu, 30 Apr 2009 14:15:51 -0700 (PDT) In-Reply-To: <9749.1241123534@alphaville.usa.hp.com> 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: nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org On Thu, Apr 30, 2009 at 2:32 PM, Nick Dokos wrote: >> I'm trying to export the daily/weekly agenda as a ps file with C-c >> C-w. > > That should be C-x C-w. Oops. Unforced error. > I can't reproduce this (latest git org: 6.26trans, emacs 23.0.91). > Are you running emacs 22.something? Emacs 23.0.60.1 (from Debian's emacs-snapshot package) > Why do you think it's too large? Afaict, it's (point-max), i.e. the > end of the buffer. My agenda e.g. has 2525 chars. So 1695 does not > seem too large. I should have said it looked larger than the buffer. For the test I just ran, the argument producing the error is 1227, and (point-max) in *Org Agenda* is 1226, but the 'to' argument to auto-compose-region is 1294. This difference of 68 characters looks to be about the difference caused by included text. In fact, if I export to text and load the resulting file, it's size is 1294. It looks like auto-compose-region is getting called on the *Org Agenda* buffer instead of *temp*, but getting a final point based on the size of *temp* Thanks, Mike > > HTH, > Nick > >> >> I'm using org 6.26d. Here's the backtrace: >> >> Debugger entered--Lisp error: (args-out-of-range 1571 1571) >> =A0 font-at(1571 #) >> =A0 auto-compose-region(1 1695) >> =A0 ps-mule-begin-job(1 1695) >> =A0 ps-generate(# 1 1695 ps-generate-postscript-with-f= aces) >> =A0 ps-spool-with-faces(1 1695 nil) >> =A0 ps-print-with-faces(1 1695 "~/test.ps") >> =A0 ps-print-buffer-with-faces("~/test.ps") >> =A0 (progn (fset (quote ps-get-buffer-name) (function* ...)) >> (ps-print-buffer-with-faces file)) >> =A0 (unwind-protect (progn (fset ... ...) (ps-print-buffer-with-faces >> file)) (if --cl-letf-bound-- (fset ... --cl-letf-save--) (fmakunbound >> ...))) >> =A0 (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...)) >> (unwind-protect (progn ... ...) (if --cl-letf-bound-- ... ...))) >> =A0 (letf ((... ...)) (ps-print-buffer-with-faces file)) >> =A0 (letf* ((... ...)) (ps-print-buffer-with-faces file)) >> =A0 (flet ((ps-get-buffer-name nil "Agenda View")) >> (ps-print-buffer-with-faces file)) >> =A0 (cond ((string-match "\\.html?\\'" file) (set-buffer ...) (when ... >> ... ... ...) (write-file file) (kill-buffer ...) (message "HTML >> written to %s" file)) ((string-match "\\.ps\\'" file) (require ...) >> (flet ... ...) (message "Postscript written to %s" file)) >> ((string-match "\\.pdf\\'" file) (require ...) (flet ... ...) >> (call-process "ps2pdf" nil nil nil ... ...) (message "PDF written to >> %s" file)) ((string-match "\\.ics\\'" file) (let ... ...)) (t (let ... >> ... ... ... ... ... ...))) >> =A0 (save-current-buffer (set-buffer temp-buffer) (insert bs) >> (org-agenda-remove-marked-text (quote org-filtered)) (while (setq beg >> ...) (delete-region beg ...)) (run-hooks (quote >> org-agenda-before-write-hook)) (cond (... ... ... ... ... ...) (... >> ... ... ...) (... ... ... ... ...) (... ...) (t ...))) >> =A0 (with-current-buffer temp-buffer (insert bs) >> (org-agenda-remove-marked-text (quote org-filtered)) (while (setq beg >> ...) (delete-region beg ...)) (run-hooks (quote >> org-agenda-before-write-hook)) (cond (... ... ... ... ... ...) (... >> ... ... ...) (... ... ... ... ...) (... ...) (t ...))) >> =A0 (unwind-protect (with-current-buffer temp-buffer (insert bs) >> (org-agenda-remove-marked-text ...) (while ... ...) (run-hooks ...) >> (cond ... ... ... ... ...)) (and (buffer-name temp-buffer) >> (kill-buffer temp-buffer))) >> =A0 (let ((temp-buffer ...)) (unwind-protect (with-current-buffer >> temp-buffer ... ... ... ... ...) (and ... ...))) >> =A0 (with-temp-buffer (insert bs) (org-agenda-remove-marked-text (quote >> org-filtered)) (while (setq beg ...) (delete-region beg ...)) >> (run-hooks (quote org-agenda-before-write-hook)) (cond (... ... ... >> ... ... ...) (... ... ... ...) (... ... ... ... ...) (... ...) (t >> ...))) >> =A0 (let ((bs ...) beg) (org-agenda-unmark-filtered-text) >> (with-temp-buffer (insert bs) (org-agenda-remove-marked-text ...) >> (while ... ...) (run-hooks ...) (cond ... ... ... ... ...))) >> =A0 (save-window-excursion (org-agenda-mark-filtered-text) (let (... >> beg) (org-agenda-unmark-filtered-text) (with-temp-buffer ... ... ... >> ... ...))) >> =A0 (save-excursion (save-window-excursion >> (org-agenda-mark-filtered-text) (let ... ... ...))) >> =A0 (let nil (save-excursion (save-window-excursion ... ...)) #> *Org Agenda*>) >> =A0 eval((let nil (save-excursion (save-window-excursion ... ...)) >> #)) >> =A0 org-let(nil (save-excursion (save-window-excursion >> (org-agenda-mark-filtered-text) (let ... ... ...))) #> Agenda*>) >> =A0 org-write-agenda("~/test.ps" nil) >