emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: Glenn Morris <rgm@gnu.org>
Cc: Lele Gaifax <lele@metapensiero.it>,
	emacs-orgmode@gnu.org, emacs-devel@gnu.org
Subject: Re: org-export raises stringp nil error
Date: Thu, 07 Mar 2013 23:38:02 +0100	[thread overview]
Message-ID: <87zjye96ph.fsf@bzg.ath.cx> (raw)
In-Reply-To: <ccwqtiq5dg.fsf@fencepost.gnu.org> (Glenn Morris's message of "Thu, 07 Mar 2013 16:14:51 -0500")

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

Glenn Morris <rgm@gnu.org> writes:

> Assuming this is a recent regression, then if anyone from Org wants this
> fixed in Emacs 24.3, they should investigate this very quickly and
> suggest the _minimum_ change.

The minimal fix is attached.

The other attachment is the full patch I wanted to apply to merge
Org 7.9.4 into Emacs 24.3.  The changes are all safe bugfixes.

I assumed it was okay to fix bugs after the last pretest, is it so?

Let me know when is the best time for me to merge and I'll release
and merge Org 7.9.4.

Thanks,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: emacs-24.3-fix.patch --]
[-- Type: text/x-patch, Size: 700 bytes --]

diff --git a/lisp/org/org-exp.el b/lisp/org/org-exp.el
index 5ccaec3..63a0659 100644
--- a/lisp/org/org-exp.el
+++ b/lisp/org/org-exp.el
@@ -2113,8 +2110,7 @@ Also, store forced alignment information found in such lines."
       (put-text-property (match-beginning 0) (match-end 0) 'org-normalized-link t))
     (goto-char (point-min))
     (while (re-search-forward re-plain-link nil t)
-      (unless (or (get-text-property (match-beginning 0) 'org-normalized-link)
-		  (assoc :tags (org-context)))
+      (unless (get-text-property (match-beginning 0) 'org-normalized-link)
 	(goto-char (1- (match-end 0)))
 	(org-if-unprotected-at (1+ (match-beginning 0))
 	  (let* ((s (concat (match-string 1)

[-- Attachment #3: emacs-24.3-merge-org-7.9.4.patch --]
[-- Type: text/x-patch, Size: 8249 bytes --]

Changes in master
	Modified   lisp/org/org-agenda.el
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index 79217b6..48328d8 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -6987,6 +6987,8 @@ If the line does not have an effort defined, return nil."
 
 (defun org-agenda-filter-apply (filter type)
   "Set FILTER as the new agenda filter and apply it."
+  ;; Deactivate `org-agenda-entry-text-mode' when filtering
+  (if org-agenda-entry-text-mode (org-agenda-entry-text-mode))
   (let (tags cat)
     (if (eq type 'tag)
 	(setq org-agenda-tag-filter filter)
@@ -7418,17 +7420,23 @@ so that the date SD will be in that range."
 (defun org-agenda-entry-text-mode (&optional arg)
   "Toggle entry text mode in an agenda buffer."
   (interactive "P")
-  (setq org-agenda-entry-text-mode (or (integerp arg)
-                                       (not org-agenda-entry-text-mode)))
-  (org-agenda-entry-text-hide)
-  (and org-agenda-entry-text-mode
-       (let ((org-agenda-entry-text-maxlines
-	      (if (integerp arg) arg org-agenda-entry-text-maxlines)))
-	 (org-agenda-entry-text-show)))
-  (org-agenda-set-mode-name)
-  (message "Entry text mode is %s.  Maximum number of lines is %d"
-	   (if org-agenda-entry-text-mode "on" "off")
-	   (if (integerp arg) arg org-agenda-entry-text-maxlines)))
+  (if (or org-agenda-tag-filter
+	  org-agenda-category-filter
+	  org-agenda-top-category-filter)
+      (user-error "Can't show entry text in filtered views")
+    (setq org-agenda-entry-text-mode (or (integerp arg)
+					 (not org-agenda-entry-text-mode)))
+    (org-agenda-entry-text-hide)
+    (and org-agenda-entry-text-mode
+	 (let ((org-agenda-entry-text-maxlines
+		(if (integerp arg) arg org-agenda-entry-text-maxlines)))
+	   (org-agenda-entry-text-show)))
+    (org-agenda-set-mode-name)
+    (message "Entry text mode is %s%s"
+	     (if org-agenda-entry-text-mode "on" "off")
+	     (if (not org-agenda-entry-text-mode) ""
+	       (format " (maximum number of lines is %d)"
+		       (if (integerp arg) arg org-agenda-entry-text-maxlines))))))
 
 (defun org-agenda-clockreport-mode (&optional with-filter)
   "Toggle clocktable mode in an agenda buffer.
	Modified   lisp/org/org-bibtex.el
diff --git a/lisp/org/org-bibtex.el b/lisp/org/org-bibtex.el
index 6ed6abc..704b204 100644
--- a/lisp/org/org-bibtex.el
+++ b/lisp/org/org-bibtex.el
@@ -120,6 +120,7 @@
 (declare-function bibtex-generate-autokey "bibtex" ())
 (declare-function bibtex-parse-entry "bibtex" (&optional content))
 (declare-function bibtex-url "bibtex" (&optional pos no-browse))
+(declare-function longlines-mode "longlines" (&optional arg))
 (declare-function org-babel-trim "ob" (string &optional regexp))
 
 \f
@@ -380,7 +381,7 @@ This variable is relevant only if `org-bibtex-export-tags-as-keywords' is t."
 	   (buf-name (format "*Bibtex Help %s*" name)))
       (with-output-to-temp-buffer buf-name
 	(princ (cdr (assoc field org-bibtex-fields))))
-      (with-current-buffer buf-name (visual-line-mode 1))
+      (with-current-buffer buf-name (longlines-mode t))
       (org-fit-window-to-buffer (get-buffer-window buf-name))
       ((lambda (result) (when (> (length result) 0) result))
        (read-from-minibuffer (format "%s: " name))))))
	Modified   lisp/org/org-clock.el
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index a536d02..b89e644 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -1524,7 +1524,15 @@ to, overriding the existing value of `org-clock-out-switch-to-state'."
 	  (force-mode-line-update)
 	  (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m
 		   (if remove " => LINE REMOVED" ""))
-          (run-hooks 'org-clock-out-hook)
+	  (let ((h org-clock-out-hook))
+	    ;; If a closing note needs to be stored in the drawer
+	    ;; where clocks are stored, let's temporarily disable
+	    ;; `org-clock-remove-empty-clock-drawer'
+	    (if (and (equal org-clock-into-drawer org-log-into-drawer)
+		     (eq org-log-done 'note)
+		     org-clock-out-when-done)
+		(setq h (delq 'org-clock-remove-empty-clock-drawer h)))
+	    (mapc (lambda (f) (funcall f)) h))
 	  (unless (org-clocking-p)
 	    (org-clock-delete-current)))))))
 
	Modified   lisp/org/org-exp.el
diff --git a/lisp/org/org-exp.el b/lisp/org/org-exp.el
index 5ccaec3..63a0659 100644
--- a/lisp/org/org-exp.el
+++ b/lisp/org/org-exp.el
@@ -50,12 +50,9 @@
 		  (&optional buffer-or-name norecord label))
 (declare-function org-unescape-code-in-region "org-src" (beg end))
 
-(autoload 'org-export-generic "org-export-generic" "Export using the generic exporter" t)
-
-(autoload 'org-export-as-odt "org-odt"
-  "Export the outline to a OpenDocument Text file." t)
-(autoload 'org-export-as-odt-and-open "org-odt"
-  "Export the outline to a OpenDocument Text file and open it." t)
+(org-autoload "org-odt" '(org-export-generic
+			  org-export-as-odt
+			  org-export-as-odt-and-open))
 
 (defgroup org-export nil
   "Options for exporting org-listings."
@@ -2113,8 +2110,7 @@ Also, store forced alignment information found in such lines."
       (put-text-property (match-beginning 0) (match-end 0) 'org-normalized-link t))
     (goto-char (point-min))
     (while (re-search-forward re-plain-link nil t)
-      (unless (or (get-text-property (match-beginning 0) 'org-normalized-link)
-		  (assoc :tags (org-context)))
+      (unless (get-text-property (match-beginning 0) 'org-normalized-link)
 	(goto-char (1- (match-end 0)))
 	(org-if-unprotected-at (1+ (match-beginning 0))
 	  (let* ((s (concat (match-string 1)
	Modified   lisp/org/org-freemind.el
diff --git a/lisp/org/org-freemind.el b/lisp/org/org-freemind.el
index 3b1c686..6de5502 100644
--- a/lisp/org/org-freemind.el
+++ b/lisp/org/org-freemind.el
@@ -275,12 +275,6 @@ will also unescape &#nn;."
 			 )))
 		   org-str))))
 
-;; (let* ((str1 "a quote: \", an amp: &, lt: <; over 256: öåäÖÅÄ")
-;;        (str2 (org-freemind-escape-str-from-org str1))
-;;        (str3 (org-freemind-unescape-str-to-org str2)))
-;;     (unless (string= str1 str3)
-;;       (error "Error str3=%s" str3)))
-
 (defun org-freemind-convert-links-helper (matched)
   "Helper for `org-freemind-convert-links-from-org'.
 MATCHED is the link just matched."
@@ -1221,7 +1215,6 @@ PATH should be a list of steps, where each step has the form
 
 ;; Local variables:
 ;; generated-autoload-file: "org-loaddefs.el"
-;; coding: utf-8
 ;; End:
 
 ;;; org-freemind.el ends here
	Modified   lisp/org/org-mobile.el
diff --git a/lisp/org/org-mobile.el b/lisp/org/org-mobile.el
index 293d2a0..2d976dd 100644
--- a/lisp/org/org-mobile.el
+++ b/lisp/org/org-mobile.el
@@ -1063,6 +1063,9 @@ be returned that indicates what went wrong."
      ((eq what 'addheading)
       (if (org-on-heading-p) ; if false we are in top-level of file
 	  (progn
+	    ;; Workaround a `org-insert-heading-respect-content' bug
+	    ;; which prevents correct insertion when point is invisible
+	    (org-show-subtree)
 	    (end-of-line 1)
 	    (org-insert-heading-respect-content t)
 	    (org-demote))
	Modified   lisp/org/org-version.el
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el
index 4fa8653..ce2d50a 100644
--- a/lisp/org/org-version.el
+++ b/lisp/org/org-version.el
@@ -11,7 +11,7 @@
 (defun org-git-version ()
   "The Git version of org-mode.
   Inserted by installing org-mode or when a release is made."
-   (let ((org-git-version "release_7.9.3f-17-g7524ef"))
+   (let ((org-git-version "release_7.9.4"))
      org-git-version))
 ;;;###autoload
 (defvar org-odt-data-dir "/usr/share/emacs/etc/org"
	Modified   lisp/org/org.el
diff --git a/lisp/org/org.el b/lisp/org/org.el
index cc4c93f..13fb44d 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -4898,6 +4898,8 @@ The following commands are available:
   (org-set-local 'outline-regexp org-outline-regexp)
   (org-set-local 'outline-level 'org-outline-level)
   (setq bidi-paragraph-direction 'left-to-right)
+  ;; FIXME Circumvent a bug in outline.el (Emacs <24.4)
+  (set (make-local-variable 'paragraph-start) "\f\\|[ \t]*$\\|\\*+ ")
   (when (and org-ellipsis
              (fboundp 'set-display-table-slot) (boundp 'buffer-display-table)
 	     (fboundp 'make-glyph-code))


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


-- 
 Bastien

  reply	other threads:[~2013-03-07 22:38 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87ip539io1.fsf@nautilus.nautilus>
2013-03-07 21:14 ` org-export raises stringp nil error Glenn Morris
2013-03-07 22:38   ` Bastien [this message]
2013-03-08  1:36     ` Glenn Morris
2013-03-08  6:40       ` Bastien
2013-03-08  7:16         ` Leo Liu
2013-03-08  7:37           ` Bastien
2013-03-08  7:44             ` Leo Liu
2013-03-08  7:56             ` Xue Fuqiao
2013-03-08  8:28           ` Eli Zaretskii
2013-03-08  9:15             ` joakim
2013-03-08  9:17               ` Bastien
2013-03-08  9:19               ` Bastien
2013-03-08  9:25               ` Dmitry Gutov
2013-03-08 10:23                 ` Eli Zaretskii
2013-03-08 11:18                   ` Dmitry Gutov
2013-03-08 14:06                     ` Eli Zaretskii
2013-03-08 21:00                       ` Dmitry Gutov
2013-03-08 16:34                   ` Achim Gratz
2013-03-08 19:48                     ` Eli Zaretskii
2013-03-08  9:55               ` Stephen J. Turnbull
2013-03-08 10:15               ` Eli Zaretskii
2013-03-08 11:12                 ` Dmitry Gutov
2013-03-08 14:21               ` Xue Fuqiao
2013-03-08 15:42                 ` Bastien
2013-03-08 16:29                   ` Nick Dokos
2013-03-08 16:38                     ` Jambunathan K
2013-03-08 17:09                       ` Bastien
2013-03-08 17:41                         ` Nick Dokos
2013-03-08 18:01                           ` Jambunathan K
2013-03-08 18:05                             ` Nick Dokos
2013-03-08 19:40                           ` Achim Gratz
2013-03-08 16:39                     ` Bastien
2013-03-08 22:37                     ` Xue Fuqiao
2013-03-08  7:47         ` Xue Fuqiao
2013-03-08  7:53           ` Bastien
2013-03-08  8:27           ` Stephen J. Turnbull
2013-03-08  8:58             ` Eli Zaretskii
2013-03-08  9:56               ` Stephen J. Turnbull
2013-03-08  8:30           ` Eli Zaretskii
2013-03-08  9:12             ` Bastien
2013-03-08  8:20         ` Stephen J. Turnbull

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=87zjye96ph.fsf@bzg.ath.cx \
    --to=bzg@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=lele@metapensiero.it \
    --cc=rgm@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).