From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: org-export raises stringp nil error Date: Thu, 07 Mar 2013 23:38:02 +0100 Message-ID: <87zjye96ph.fsf@bzg.ath.cx> References: <87ip539io1.fsf@nautilus.nautilus> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: In-Reply-To: (Glenn Morris's message of "Thu, 07 Mar 2013 16:14:51 -0500") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org To: Glenn Morris Cc: Lele Gaifax , emacs-orgmode@gnu.org, emacs-devel@gnu.org List-Id: emacs-orgmode.gnu.org --=-=-= Content-Type: text/plain Glenn Morris 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, --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=emacs-24.3-fix.patch 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) --=-=-= Content-Type: text/x-patch; charset=iso-8859-1 Content-Disposition: attachment; filename=emacs-24.3-merge-org-7.9.4.patch Content-Transfer-Encoding: 8bit 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)) @@ -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) " \\|[ \t]*$\\|\\*+ ") (when (and org-ellipsis (fboundp 'set-display-table-slot) (boundp 'buffer-display-table) (fboundp 'make-glyph-code)) --=-=-= Content-Type: text/plain -- Bastien --=-=-=--