From mboxrd@z Thu Jan 1 00:00:00 1970 From: Emre Sahin Subject: org-blog bug in 4.77 org-export-region-as-html? Date: Mon, 11 Jun 2007 19:21:49 +0300 Message-ID: <87lkeqsbqa.fsf@leonardo.iesahin.net> 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 1Hxmex-0004DV-QO for emacs-orgmode@gnu.org; Mon, 11 Jun 2007 12:22:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hxmew-0004DJ-2R for emacs-orgmode@gnu.org; Mon, 11 Jun 2007 12:22:26 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hxmev-0004DG-TD for emacs-orgmode@gnu.org; Mon, 11 Jun 2007 12:22:25 -0400 Received: from manyas.bcc.bilkent.edu.tr ([139.179.30.24]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hxmeu-0001V7-F3 for emacs-orgmode@gnu.org; Mon, 11 Jun 2007 12:22:25 -0400 Received: from leonardo.iesahin.net (unknown [81.214.248.165]) by manyas.bcc.bilkent.edu.tr (Postfix) with ESMTP id 5105D26F47 for ; Mon, 11 Jun 2007 19:22:18 +0300 (EEST) 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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi all, This may be a problem in my installation, however I couldn't solve the issue.=20 My Emacs is on a Debian testing (lenny) and has a version of: GNU Emacs 22.1.50.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2007-06-08 on pacem, modified by Debian (from emacs-snapshot site, I'm using the unstable version of this package.) I'm using 4.77 org.el along with 1.17 org-blog.el. I have installed these without deleting the older versions and reload the files via (load-file "/usr/local/share/emacs/site-lisp/org.el") (load-file "/usr/local/share/emacs/site-lisp/org-publish.el") (load-file "/usr/local/share/emacs/site-lisp/org-mouse.el") (load-file "/usr/local/share/emacs/site-lisp/org-install.el") and trying to publish two pages in ~/blog/. I have a single project. My alist in .emacs is (require 'org-blog) (autoload 'org-publish "org-publish" nil t) (autoload 'org-publish "org-publish-all" nil t) (autoload 'org-publish "org-publish-current-file" nil t) (autoload 'org-publish "org-publish-current-project" nil t) (add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) (setq org-log-done t) (setq org-publish-project-alist (list '("blog"=20 :base-directory "~/blog/" :base-extension "org" :publishing-directory "~/public_html/blog/" :publishing-function org-publish-org-to-html :auto-index t :blog-base-url "http://emresahin.net/" :blog-title "emre=C5=9Fahin.net" :blog-description "Emre =C5=9Eahin" :blog-export-rss t :index-function org-publish-blog-index :index-filename "index2.org" :index-title "okuyan bir ki=C5=9Fiye" :language "en" :index-posts 6))) As far as I understand, I did the steps described in org-blog.el correctly. However when I use M-x org-publish-all an error (which produces the attached debug report) occurs.=20 There may be problems about locale, my initial installation of this system was with Turkish locale and there was a different error about publishing. Then I tried to switch to English locale (by changing the value in /etc/defaults/locale and set my language environment as (set-language-environment "UTF-8") (setq default-file-name-coding-system 'utf-8) (setq locale-coding-system 'utf-8) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) (set-selection-coding-system 'utf-8) (set-clipboard-coding-system 'utf-8) (prefer-coding-system 'utf-8) in my .emacs. (Locale problem may be about emacs in general, because when I was playing with blorg.el recently, I didn't get any output due to an error also. And there is strange bug in gnus which make emacs to shut down immediately when I try to open some e-mail messages. However I couldn't reproduce this bug to submit a nice report, and emacs 21.4 doesn't have such a problem.) Above bug also occurs in Emacs 21.4 (GNU Emacs 21.4.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2007-03-11 on raven, modified by Debian) If there is any information I can further give, I'd be glad to help.=20 Best Regards, Emre=20 --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=org-export-region-as-html.dbg.el Content-Transfer-Encoding: quoted-printable Debugger entered--Lisp error: (wrong-type-argument stringp nil) string-match(nil "") (while (string-match org-maybe-keyword-time-regexp s) (if (and ... ...) (= throw ... "")) (or b (setq b ...)) (if (not org-export-with-timestamps) (se= tq r ... s ...) (setq r ... s ...))) (let (r b) (while (string-match org-maybe-keyword-time-regexp s) (if ... = ...) (or b ...) (if ... ... ...)) (if (not r) s (setq r ...) (unless ... ..= .) r)) (catch (quote exit) (let (r b) (while ... ... ... ...) (if ... s ... ... = r))) org-html-handle-time-stamps("") (setq line (org-html-handle-time-stamps line)) (catch (quote nextline) (when (and inquote ...) (insert "\n") (setq= inquote nil)) (when inquote (insert ... "\n") (throw ... nil)) (when (and = org-export-with-fixed-width ...) (when ... ... ...) (insert ... "\n") (when= ... ... ...) (throw ... nil)) (when (get-text-property 0 ... line) (let ..= . ... ... ... ...) (throw ... nil)) (when (string-match "^[ ]*-\\{5,\\}[ = ]*$" line) (insert "\n
\n") (throw ... nil)) (while (string-match "<<]*\\)>>>?\\((INVISIBLE)\\)?[ ]*\n?" line) (cond ... ... ...)) (setq= line (org-html-handle-time-stamps line)) (setq line (org-html-expand line)= ) (setq start 0) (while (string-match org-bracket-link-analytic-regexp line= start) (setq start ...) (setq type ...) (setq path ...) (setq desc1 ... de= sc2 ... descp ... desc ...) (when ... ... ...) (cond ... ... ... ... ...) (= setq line ... start ...)) (if (and ... ...) (if ... ... ...)) (while (strin= g-match "\\([^* ].*?\\)\\[\\([0-9]+\\)\\]" line) (let ... ...)) (cond (...= ... ... ... ... ... ... ...) (... ... ... ...) (t ... ... ... ... ...))) (while (setq line (pop lines) origline line) (catch (quote nextline) (whe= n ... ... ...) (when inquote ... ...) (when ... ... ... ... ...) (when ... = ... ...) (when ... ... ...) (while ... ...) (setq line ...) (setq line ...)= (setq start 0) (while ... ... ... ... ... ... ... ...) (if ... ...) (while= ... ...) (cond ... ... ...))) (let ((case-fold-search nil) (org-odd-levels-only odd)) (mapcar (lambda .= .. ...) org-export-plist-vars) (setq umax (if arg ... org-export-headline-l= evels)) (setq umax-toc (if ... ... umax)) (unless body-only (insert ...) (i= nsert ...) (when ... ...)) (if (and org-export-with-toc ...) (progn ... ...= ... ... ...)) (setq head-count 0) (org-init-section-numbers) (while (setq = line ... origline line) (catch ... ... ... ... ... ... ... ... ... ... ... = ... ... ...)) (when inquote (insert "\n")) (when in-local-list (while= local-list-num ... ... ...) (setq local-list-indent nil in-local-list nil)= ) (org-html-level-start 1 nil umax (and org-export-with-toc ...) head-count= ) (unless body-only (when ... ... ...) (if org-export-html-with-timestamp .= ..) (insert ...) (insert "\n\n")) (normal-mode) (if (eq major= -mode default-major-mode) (html-mode)) (goto-char (point-min)) (when thetoc= (if ... ... ... ...) (mapc ... thetoc)) (goto-char (point-min)) (while (re= -search-forward "

[ =0D\n ]*

" nil t) (replace-match "")) (goto-char (= point-min)) (while (re-search-forward "
  • [ =0D\n ]*
  • \n?" nil t) (repl= ace-match "")) (or to-buffer (save-buffer)) (goto-char (point-min)) (messag= e "Exporting... done") (if (eq to-buffer ...) (prog1 ... ...) (current-buff= er))) (let* ((opt-plist ...) (style ...) (link-validate ...) valid thetoc have-= headings first-heading-pos (odd org-odd-levels-only) (region-p ...) (org-cu= rrent-export-dir ...) (org-current-export-file buffer-file-name) (level 0) = (line "") (origline "") txt todo (umax nil) (umax-toc nil) (filename ...) (= current-dir ...) (buffer ...) (org-levels-open ...) (date ...) (time ...) (= author ...) (title ...) (quote-re0 ...) (quote-re ...) (inquote nil) (infix= ed nil) (in-local-list nil) (local-list-num nil) (local-list-indent nil) (l= lt org-plain-list-ordered-item-terminator) (email ...) (language ...) (lang= -words nil) (target-alist nil) tg (head-count 0) cnt (start 0) (coding-syst= em ...) (coding-system-for-write coding-system) (save-buffer-coding-system = coding-system) (charset ...) (region ...) (lines ...) table-open type ...) = (let (buffer-read-only) (org-unmodified ...)) (message "Exporting...") (set= q org-last-level 1) (org-init-section-numbers) (setq lang-words (or ... ...= )) (set-buffer buffer) (erase-buffer) (fundamental-mode) (let (... ...) (ma= pcar ... org-export-plist-vars) (setq umax ...) (setq umax-toc ...) (unless= body-only ... ... ...) (if ... ...) (setq head-count 0) (org-init-section-= numbers) (while ... ...) (when inquote ...) (when in-local-list ... ...) (o= rg-html-level-start 1 nil umax ... head-count) (unless body-only ... ... ..= . ...) (normal-mode) (if ... ...) (goto-char ...) (when thetoc ... ...) (go= to-char ...) (while ... ...) (goto-char ...) (while ... ...) (or to-buffer = ...) (goto-char ...) (message "Exporting... done") (if ... ... ...))) org-export-as-html(nil nil nil string :body-only) (setq rtn (org-export-as-html nil nil nil buffer body-only)) (let ((transient-mark-mode t) (zmacs-regions t) rtn) (goto-char end) (set= -mark (point)) (goto-char beg) (setq rtn (org-export-as-html nil nil nil bu= ffer body-only)) (if (fboundp ...) (deactivate-mark)) (if (and ... ...) (sw= itch-to-buffer-other-window rtn) rtn)) org-export-region-as-html(1 160 :body-only string) (save-current-buffer (set-buffer temp-buffer) (insert description) (org-e= xport-region-as-html (point-min) (point-max) :body-only (quote string))) (with-current-buffer temp-buffer (insert description) (org-export-region-= as-html (point-min) (point-max) :body-only (quote string))) (unwind-protect (with-current-buffer temp-buffer (insert description) (or= g-export-region-as-html ... ... :body-only ...)) (and (buffer-name temp-buf= fer) (kill-buffer temp-buffer))) (let ((temp-buffer ...)) (unwind-protect (with-current-buffer temp-buffer= ... ...) (and ... ...))) (with-temp-buffer (insert description) (org-export-region-as-html (point-= min) (point-max) :body-only (quote string))) (let ((description-html ...)) (format " \n %s\n %s\n %s\n %s\n \n" title description-html pubdate permalink)) org-blog-rss-item("G\x8fczel insan olmak g\x8fczel bir \x5107f\ ey" "http= ://emresahin.net/blog-2007-06-11-0201.html" "\n\nMevcutlar i\x8e7inde kendi= mizi nas\x51051l geli\x5107ftirece\x5103fimizi, nas\x51051l anla\x5107f\ ab= ilece\x5103fimizi g\x8f6rmek laz\x51051m. A\x8e7\x51051k olmak laz\x51051m.= Ruhumuzu anlamak, beynimizi takip etmek laz\x51051m. \n" "Mon, 11 Jun 2007= 02:01:00 +0300") (cons (org-blog-rss-item post-title (concat blog-base-url ... ".html") po= st-content post-time) blog-rss-feed) (setq blog-rss-feed (cons (org-blog-rss-item post-title ... post-content = post-time) blog-rss-feed)) (push (org-blog-rss-item post-title (concat blog-base-url ... ".html") po= st-content post-time) blog-rss-feed) (progn (push (org-blog-rss-item post-title ... post-content post-time) bl= og-rss-feed)) (if rss (progn (push ... blog-rss-feed))) (when rss (push (org-blog-rss-item post-title ... post-content post-time)= blog-rss-feed)) (progn (when rss (push ... blog-rss-feed)) (if (< count num-posts) (progn= ... ... ...) (progn ... ... ...))) (if (not (string=3D basename index-filename)) (progn (when rss ...) (if .= .. ... ...))) (when (not (string=3D basename index-filename)) (when rss (push ... blog-= rss-feed)) (if (< count num-posts) (progn ... ... ...) (progn ... ... ...))) (let ((basename ...) (post-title nil) (post-time ...) (post-description n= il)) (with-temp-buffer (insert-file-contents p) (goto-char ...) (re-search-= forward "#\\+TITLE: \\(.*\\)$" nil t) (setf post-title ...) (re-search-forw= ard "#\\+DESCRIPTION: \\(.*\\)$" nil t) (setf post-description ...) (setf p= ost-content ...)) (when (not ...) (when rss ...) (if ... ... ...)) (setq co= unt (+ 1 count))) (while (setq p (pop posts)) (let (... ... ... ...) (with-temp-buffer ... = ... ... ... ... ... ...) (when ... ... ...) (setq count ...))) (save-current-buffer (set-buffer temp-buffer) (while (setq p ...) (let ..= . ... ... ...)) (when rss (push ... blog-rss-feed) (with-temp-buffer ... ..= . ...)) (goto-char (point-min)) (while (search-forward "#+TITLE: " nil t) (= replace-match "** " nil t)) (when index-title (goto-char ...) (insert ...))= (write-file index-file) (kill-buffer (current-buffer))) (with-current-buffer temp-buffer (while (setq p ...) (let ... ... ... ...= )) (when rss (push ... blog-rss-feed) (with-temp-buffer ... ... ...)) (goto= -char (point-min)) (while (search-forward "#+TITLE: " nil t) (replace-match= "** " nil t)) (when index-title (goto-char ...) (insert ...)) (write-file = index-file) (kill-buffer (current-buffer))) (unwind-protect (with-current-buffer temp-buffer (while ... ...) (when rs= s ... ...) (goto-char ...) (while ... ...) (when index-title ... ...) (writ= e-file index-file) (kill-buffer ...)) (and (buffer-name temp-buffer) (kill-= buffer temp-buffer))) (let ((temp-buffer ...)) (unwind-protect (with-current-buffer temp-buffer= ... ... ... ... ... ... ...) (and ... ...))) (with-temp-buffer (while (setq p ...) (let ... ... ... ...)) (when rss (p= ush ... blog-rss-feed) (with-temp-buffer ... ... ...)) (goto-char (point-mi= n)) (while (search-forward "#+TITLE: " nil t) (replace-match "** " nil t)) = (when index-title (goto-char ...) (insert ...)) (write-file index-file) (ki= ll-buffer (current-buffer))) (let* ((posts ...) (base-directory ...) (blog-base-url ...) (blog-title .= ..) (publishing-directory ...) (blog-description ...) (blog-rss-feed nil) (= rss ...) (post-content nil) (index-file ...) (index-buffer ...) (num-posts = ...) (index-title ...) (count 0) (p nil)) (message "RSS =3D %S" rss) (if in= dex-buffer (kill-buffer index-buffer)) (when rss (push ... blog-rss-feed)) = (with-temp-buffer (while ... ...) (when rss ... ...) (goto-char ...) (while= ... ...) (when index-title ... ...) (write-file index-file) (kill-buffer .= ..))) org-publish-blog-index((:base-directory "~/blog/" :base-extension "org" := publishing-directory "~/public_html/blog/" :publishing-function org-publish= -org-to-html :auto-index t :blog-base-url "http://emresahin.net/" :blog-tit= le "emre\x5107f\ ahin.net" :blog-description "Emre \x5107e\ ahin" :blog-exp= ort-rss t :index-function org-publish-blog-index :index-filename "index2.or= g" :index-title "okuyan bir ki\x5107fiye" :language "en" :index-posts 6) "i= ndex2.org") funcall(org-publish-blog-index (:base-directory "~/blog/" :base-extension= "org" :publishing-directory "~/public_html/blog/" :publishing-function org= -publish-org-to-html :auto-index t :blog-base-url "http://emresahin.net/" := blog-title "emre\x5107f\ ahin.net" :blog-description "Emre \x5107e\ ahin" := blog-export-rss t :index-function org-publish-blog-index :index-filename "i= ndex2.org" :index-title "okuyan bir ki\x5107fiye" :language "en" :index-pos= ts 6) "index2.org") (if index-p (funcall index-function plist index-filename)) (let* ((exclude-regexp ...) (publishing-function ...) (index-p ...) (inde= x-filename ...) (index-function ...) (preparation-function ...) (f nil)) (w= hen preparation-function (funcall preparation-function)) (if index-p (funca= ll index-function plist index-filename)) (let (...) (while ... ...))) org-publish-plist((:base-directory "~/blog/" :base-extension "org" :publi= shing-directory "~/public_html/blog/" :publishing-function org-publish-org-= to-html :auto-index t :blog-base-url "http://emresahin.net/" :blog-title "e= mre\x5107f\ ahin.net" :blog-description "Emre \x5107e\ ahin" :blog-export-r= ss t :index-function org-publish-blog-index :index-filename "index2.org" :i= ndex-title "okuyan bir ki\x5107fiye" :language "en" :index-posts 6)) mapcar(org-publish-plist ((:base-directory "~/blog/" :base-extension "org= " :publishing-directory "~/public_html/blog/" :publishing-function org-publ= ish-org-to-html :auto-index t :blog-base-url "http://emresahin.net/" :blog-= title "emre\x5107f\ ahin.net" :blog-description "Emre \x5107e\ ahin" :blog-= export-rss t :index-function org-publish-blog-index :index-filename "index2= .org" :index-title "okuyan bir ki\x5107fiye" :language "en" :index-posts 6)= )) (let ((org-publish-use-timestamps-flag ...) (plists ...)) (mapcar (quote = org-publish-plist) plists)) (save-window-excursion (let (... ...) (mapcar ... plists))) org-publish-all(nil) call-interactively(org-publish-all) execute-extended-command(nil) call-interactively(execute-extended-command) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--