From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Sperber Subject: Current patches to make org-mode run on XEmacs Date: Wed, 31 Aug 2011 20:12:06 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QypGn-00064z-Ub for emacs-orgmode@gnu.org; Wed, 31 Aug 2011 14:12:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QypGm-000732-Ly for emacs-orgmode@gnu.org; Wed, 31 Aug 2011 14:12:13 -0400 Received: from h615406.serverkompetenz.net ([81.169.143.132]:39027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QypGm-00072l-9h for emacs-orgmode@gnu.org; Wed, 31 Aug 2011 14:12:12 -0400 Received: from h615406.serverkompetenz.net (localhost [127.0.0.1]) by h615406.serverkompetenz.net (Postfix) with ESMTP id 180FD1706F for ; Wed, 31 Aug 2011 18:12:09 +0000 (UTC) Received: from eta.local (p5482F129.dip.t-dialin.net [84.130.241.41]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by h615406.serverkompetenz.net (Postfix) with ESMTPSA id 994C217066 for ; Wed, 31 Aug 2011 18:12:08 +0000 (UTC) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable ... are attached. I've run with this for a few weeks now, and what I use mostly works. So I would appreciate if these could go into the git repo. Let me draw your attention to this hunk: --- a/lisp/org.el +++ b/lisp/org.el @@ -7360,7 +7360,7 @@ would end up with no indentation after the change, = nothing at all is done." col) (while (re-search-forward (concat "\\(" (regexp-opt org-all-time-keywords) - "\\|" "^[ \t]*" org-tsr-regexp-both "*$" + "\\|" "^[ \t]*" org-tsr-regexp-both "$" "\\|" "^[ \t]*:[a-zA-Z][a-zA-Z0-9_]*:.*$" "\\)") (or drawer-end end) t) (beginning-of-line) While I needed this to make the code run on XEmacs, it really looks like a bug fix to me: The "*" that I deleted makes that part of the disjunction match the empty string, and that makes `org-fixup-indentation' loop infinitely. --=20 Cheers =3D8-} Mike Friede, V=F6lkerverst=E4ndigung und =FCberhaupt blabla --=-=-= Content-Disposition: inline diff --git a/lisp/ob-calc.el b/lisp/ob-calc.el index 45d9441..b246636 100644 --- a/lisp/ob-calc.el +++ b/lisp/ob-calc.el @@ -28,8 +28,9 @@ ;;; Code: (require 'ob) (require 'calc) -(require 'calc-store) -(unless (featurep 'xemacs) (require 'calc-trail)) +(unless (featurep 'xemacs) + (require 'calc-trail) + (require 'calc-store)) (eval-when-compile (require 'ob-comint)) (defvar org-babel-default-header-args:calc nil diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index b1fa5f5..7e4da31 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4306,8 +4306,8 @@ of what a project is and how to check if it stuck, customize the variable "\\)\\>")) (tags (nth 2 org-stuck-projects)) (tags-re (if (member "*" tags) - (org-re (concat org-outline-regexp-bol - ".*:[[:alnum:]_@#%]+:[ \t]*$")) + (concat org-outline-regexp-bol + (org-ref ".*:[[:alnum:]_@#%]+:[ \t]*$")) (if tags (concat org-outline-regexp-bol ".*:\\(" diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 3e9c202..d093700 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -251,8 +251,11 @@ Works on both Emacs and XEmacs." (defun org-activate-mark () (when (mark t) (setq mark-active t) - (unless transient-mark-mode - (setq transient-mark-mode 'lambda))))) + (when (and (boundp 'transient-mark-mode) + (not transient-mark-mode)) + (setq transient-mark-mode 'lambda)) + (when (boundp 'zmacs-regions) + (setq zmacs-regions t))))) ;; Invisibility compatibility diff --git a/lisp/org-exp.el b/lisp/org-exp.el index f795fbd..43752ca 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -1028,7 +1028,8 @@ Pressing `1' will switch between these two options." (setq r1 (read-char-exclusive))) (error "No enclosing node with LaTeX_CLASS or EXPORT_TITLE or EXPORT_FILE_NAME") ))))) - (redisplay) + (if (fboundp 'redisplay) + (redisplay)) (and bpos (goto-char bpos)) (setq r2 (if (< r1 27) (+ r1 96) r1)) (unless (setq ass (assq r2 cmds)) diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index 04389ef..a3bd9bf 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -70,13 +70,13 @@ ;; their definition. ;; ;; `org-re' is used for regexp compatibility with XEmacs. - (org-re (concat "\\[\\(?:" - ;; Match inline footnotes. - "fn:\\([-_[:word:]]+\\)?:\\|" - ;; Match other footnotes. - "\\(?:\\([0-9]+\\)\\]\\)\\|" - "\\(fn:[-_[:word:]]+\\)" - "\\)")) + (concat (org-re "\\[\\(?:") + ;; Match inline footnotes. + (org-re "fn:\\([-_[:word:]]+\\)?:\\|") + ;; Match other footnotes. + (org-re "\\(?:\\([0-9]+\\)\\]\\)\\|") + (org-re "\\(fn:[-_[:word:]]+\\)") + (org-re "\\)")) "Regular expression for matching footnotes.") (defconst org-footnote-definition-re @@ -265,10 +265,9 @@ label, start, end and definition of the footnote otherwise." (re-search-backward message-signature-separator nil t))))) (or (and (re-search-forward - (org-re - (concat org-outline-regexp-bol "\\|" - org-footnote-definition-re "\\|" - "^[ \t]*$")) + (concat org-outline-regexp-bol "\\|" + org-footnote-definition-re "\\|" + "^[ \t]*$") bound 'move) (progn (skip-chars-forward " \t\n") (point-at-bol))) (point)))) diff --git a/lisp/org.el b/lisp/org.el index d63b854..e77b4af 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7360,7 +7360,7 @@ would end up with no indentation after the change, nothing at all is done." col) (while (re-search-forward (concat "\\(" (regexp-opt org-all-time-keywords) - "\\|" "^[ \t]*" org-tsr-regexp-both "*$" + "\\|" "^[ \t]*" org-tsr-regexp-both "$" "\\|" "^[ \t]*:[a-zA-Z][a-zA-Z0-9_]*:.*$" "\\)") (or drawer-end end) t) (beginning-of-line) @@ -19662,10 +19662,11 @@ the functionality can be provided as a fall-back.") ;; through to `fill-paragraph' when appropriate. (org-set-local 'fill-paragraph-function 'org-fill-paragraph) ;; Prevent auto-fill from inserting unwanted new items. - (org-set-local 'fill-nobreak-predicate - (if (memq 'org-fill-item-nobreak-p fill-nobreak-predicate) - fill-nobreak-predicate - (cons 'org-fill-item-nobreak-p fill-nobreak-predicate))) + (if (boundp 'fill-nobreak-predicate) + (org-set-local 'fill-nobreak-predicate + (if (memq 'org-fill-item-nobreak-p fill-nobreak-predicate) + fill-nobreak-predicate + (cons 'org-fill-item-nobreak-p fill-nobreak-predicate)))) ;; Adaptive filling: To get full control, first make sure that ;; `adaptive-fill-regexp' never matches. Then install our own matcher. (unless (local-variable-p 'adaptive-fill-regexp (current-buffer)) --=-=-=--