diff --git a/.gitignore b/.gitignore index ba75c2a07..374f45e72 100644 --- a/.gitignore +++ b/.gitignore @@ -8,23 +8,25 @@ *.bak *.cp *.cps +*.diff *.dvi *.elc *.fn *.fns *.html +*.info *.ky *.kys *.log +*.patch *.pdf *.pg *.pgs +*.ps *.toc *.tp *.vr *.vrs -*.dvi -*.ps orgcard_letter.tex orgcard.txt org diff --git a/ORGWEBPAGE/index.org b/ORGWEBPAGE/index.org index aa8f276a0..559d7b553 100644 --- a/ORGWEBPAGE/index.org +++ b/ORGWEBPAGE/index.org @@ -152,7 +152,7 @@ the command line....): Some more information about this can be found in the [[http://orgmode.org/worg/org-faq.php][FAQ]], under [[http://orgmode.org/worg/org-faq.php#keeping-current-with-Org-mode-development][How do I keep current with Org mode development?]]. For people who cannot use -git, we provide [[file:org-latest.zip][zip]] or [[file:org-latest.tar.gz][tar.gz]] snapshot release files updated each hour +git, we provide [[file:org-latest.zip][zip]] or [[file:org-latest.tar.gz][tar.gz]] snapshot release files updated each day and corresponding to the latest git version. ** Alternative distributions diff --git a/UTILITIES/pw b/UTILITIES/pw index cc1244a77..0cf4bfa48 100755 --- a/UTILITIES/pw +++ b/UTILITIES/pw @@ -285,7 +285,8 @@ def action_apply(rpc, patch_id): sys.exit(1) def action_update_patch(rpc, patch_id, state = None, commit = None, - delegate_str = "", comment_str, archived = False): + delegate_str = "", comment_str = "None", + archived = False): patch = rpc.patch_get(patch_id) if patch == {}: sys.stderr.write("Error getting information on patch ID %d\n" % \ @@ -471,7 +472,8 @@ def merge_with(patch_id, rpc, delegate_str, comment_str): # If it succeeded this far, mark the patch as "Accepted" by the invoking # user. action_update_patch(rpc, patch_id, state = 'Accepted', commit = sha, - delegate_str = delegate_str, archived = True) + delegate_str = delegate_str, comment_str = comment_str, + archived = True) print sha diff --git a/doc/org.texi b/doc/org.texi index bc8369318..16241112a 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -727,10 +727,15 @@ active region by using the mouse to select a region, or pressing If you find problems with Org, or if you have questions, remarks, or ideas about it, please mail to the Org mailing list @email{emacs-orgmode@@gnu.org}. If you are not a member of the mailing list, your mail will be passed to the -list after a moderator has approved it. +list after a moderator has approved it@footnote{Please consider subscribing +to the mailing list, in order to minimize the work the mailing list +moderators have to do.}. -For bug reports, please provide as much information as possible, including -the version information of Emacs (@kbd{M-x emacs-version @key{RET}}) and Org +For bug reports, please first try to reproduce the bug with the latest +version of Org available - if you are running an outdated version, it is +quite possible that the bug has been fixed already. If the bug persists, +prepare a report and provide as much information as possible, including the +version information of Emacs (@kbd{M-x emacs-version @key{RET}}) and Org (@kbd{M-x org-version @key{RET}}), as well as the Org related setup in @file{.emacs}. The easiest way to do this is to use the command @example @@ -749,7 +754,7 @@ about: @item What did you expect to happen? @item What happened instead? @end enumerate -@noindent Thank you for helping to improve this mode. +@noindent Thank you for helping to improve this program. @subsubheading How to create a useful backtrace diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 194f392fc..ad818358b 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -5224,8 +5224,8 @@ could bind the variable in the options section of a custom command.") (if nosort list (when org-agenda-before-sorting-filter-function - (setq list (mapcar org-agenda-before-sorting-filter-function list))) - (delq nil (mapconcat 'identity (sort list 'org-entries-lessp) "\n")))) + (setq list (delq nil (mapcar org-agenda-before-sorting-filter-function list)))) + (mapconcat 'identity (sort list 'org-entries-lessp) "\n"))) (defun org-agenda-highlight-todo (x) (let ((org-done-keywords org-done-keywords-for-agenda) @@ -7138,7 +7138,7 @@ The cursor may be at a date in the calendar, or in the Org agenda." (setq newhead (org-get-heading))) (org-agenda-change-all-lines newhead hdmarker))))) -(defun org-agenda-clock-out (&optional arg) +(defun org-agenda-clock-out () "Stop the currently running clock." (interactive "P") (unless (marker-buffer org-clock-marker) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 4fde94c8e..4383bec67 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -353,7 +353,7 @@ TIME defaults to the current time." (if (fboundp 'looking-at-p) (apply 'looking-at-p args) (save-match-data - (apply 'looking-at-p args)))) + (apply 'looking-at args)))) ; XEmacs does not have `looking-back'. (if (fboundp 'looking-back) diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 6324eba2f..4bf203106 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -471,7 +471,12 @@ matching filenames." (i (plist-get (cdr prj) :include)) (xm (concat "^" b (if r ".+" "[^/]+") "\\.\\(" x "\\)$"))) (when (or - (and i (string-match i filename)) + (and + i + (member filename + (mapcar + (lambda (file) (expand-file-name file b)) + i))) (and (not (and e (string-match e filename))) (string-match xm filename))) diff --git a/lisp/org.el b/lisp/org.el index 49b04f401..67c5b3cd0 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4038,7 +4038,11 @@ group 3: Priority cookie group 4: True headline group 5: Tags") (make-variable-buffer-local 'org-complex-heading-regexp) -(defvar org-complex-heading-regexp-format nil) +(defvar org-complex-heading-regexp-format nil + "Printf format to make regexp to match an exact headline. +This regexp will match the headline of any node which hase the exact +headline text that is put into the format, but may have any TODO state, +priority and tags.") (make-variable-buffer-local 'org-complex-heading-regexp-format) (defvar org-todo-line-tags-regexp nil "Matches a headline and puts TODO state into group 2 if present. @@ -6440,7 +6444,9 @@ the headline hierarchy above." (selected-point (if (eq interface 'outline) (car (org-get-location (current-buffer) org-goto-help)) - (nth 3 (org-refile-get-location "Goto: "))))) + (let ((pa (org-refile-get-location "Goto: "))) + (org-refile-check-position pa) + (nth 3 pa))))) (if selected-point (progn (org-mark-ring-push org-goto-start-pos) @@ -9939,15 +9945,8 @@ on the system \"/user@host:\"." (setq level (org-reduced-level (- (match-end 1) (match-beginning 1))) txt (org-link-display-format (match-string 4)) - re (concat "^" (regexp-quote - (buffer-substring - (match-beginning 1) - (match-end 4))))) - (if (match-end 5) (setq re (concat - re "[ \t]+" - (regexp-quote - (match-string 5))))) - (setq re (concat re "[ \t]*$")) + re (format org-complex-heading-regexp-format + (regexp-quote (match-string 4)))) (when org-refile-use-outline-path (setq txt (mapconcat 'org-protect-slash @@ -10246,6 +10245,7 @@ This can be done with a 0 prefix: `C-0 C-c C-w'" (setq answ (funcall cfunc prompt tbl nil (not new-nodes) nil 'org-refile-history)) (setq pa (or (assoc answ tbl) (assoc (concat answ "/") tbl))) + (org-refile-check-position pa) (if pa (progn (when (or (not org-refile-history) @@ -10272,6 +10272,26 @@ This can be done with a 0 prefix: `C-0 C-c C-w'" (org-refile-new-child parent-target child))) (error "Invalid target location"))))) +(defun org-refile-check-position (refile-pointer) + "Check if the refile pointer matches the readline to which it points." + (let* ((file (nth 1 refile-pointer)) + (re (nth 2 refile-pointer)) + (pos (nth 3 refile-pointer)) + buffer) + (when (org-string-nw-p re) + (setq buffer (if (markerp pos) + (marker-buffer pos) + (or (find-buffer-visiting file) + (find-file-noselect file)))) + (with-current-buffer buffer + (save-excursion + (save-restriction + (widen) + (goto-char pos) + (beginning-of-line 1) + (unless (org-looking-at-p re) + (error "Invalid refile position, please rebuild the cache")))))))) + (defun org-refile-new-child (parent-target child) "Use refile target PARENT-TARGET to add new CHILD below it." (unless parent-target @@ -12755,7 +12775,7 @@ With prefix ARG, realign all tags in headings in the current buffer." (col (current-column)) (org-setting-tags t) table current-tags inherited-tags ; computed below when needed - tags p0 c0 c1 rpl) + tags p0 c0 c1 rpl di tc level) (if arg (save-excursion (goto-char (point-min)) @@ -12805,6 +12825,9 @@ With prefix ARG, realign all tags in headings in the current buffer." ;; Insert new tags at the correct column (beginning-of-line 1) + (setq level (or (and (looking-at org-outline-regexp) + (- (match-end 0) (point) 1)) + 1)) (cond ((and (equal current "") (equal tags ""))) ((re-search-forward @@ -12813,11 +12836,14 @@ With prefix ARG, realign all tags in headings in the current buffer." (if (equal tags "") (setq rpl "") (goto-char (match-beginning 0)) - (setq c0 (current-column) p0 (if (equal (char-before) ?*) - (1+ (point)) (point)) - c1 (max (1+ c0) (if (> org-tags-column 0) - org-tags-column - (- (- org-tags-column) (length tags)))) + (setq c0 (current-column) + ;; compute offset for the case of org-indent-mode active + di (if org-indent-mode + (* (1- org-indent-indentation-per-level) (1- level)) + 0) + p0 (if (equal (char-before) ?*) (1+ (point)) (point)) + tc (+ org-tags-column (if (> org-tags-column 0) (- di) di)) + c1 (max (1+ c0) (if (> tc 0) tc (- (- tc) (length tags)))) rpl (concat (make-string (max 0 (- c1 c0)) ?\ ) tags))) (replace-match rpl t t) (and (not (featurep 'xemacs)) c0 indent-tabs-mode (tabify p0 (point)))