0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 20:07:46 +00:00

Merge branch 'maint'

This commit is contained in:
Bastien Guerry 2012-09-29 11:10:18 +02:00
commit 4962980938
7 changed files with 76 additions and 39 deletions

View file

@ -49,6 +49,7 @@ helpall::
help helpall::
$(info make config - check main configuration)
helpall::
$(info make config-version - check Org version)
$(info make config-test - check test configuration)
$(info make config-exe - check executables configuration)
$(info make config-cmd - check command configuration)

View file

@ -6593,6 +6593,9 @@ If ERROR is non-nil, throw an error, otherwise just return nil."
"Exit agenda by killing agenda buffer or burying it when
`org-agenda-sticky' is non-NIL"
(interactive)
(if (and (eq org-indirect-buffer-display 'other-window)
org-last-indirect-buffer)
(delete-window (get-buffer-window org-last-indirect-buffer)))
(if org-agenda-columns-active
(org-columns-quit)
(if org-agenda-sticky
@ -7313,10 +7316,16 @@ so that the date SD will be in that range."
(remove-hook 'pre-command-hook 'org-unhighlight-once)
(org-unhighlight))
(defvar org-agenda-pre-follow-window-conf nil)
(defun org-agenda-follow-mode ()
"Toggle follow mode in an agenda buffer."
(interactive)
(unless org-agenda-follow-mode
(setq org-agenda-pre-follow-window-conf
(current-window-configuration)))
(setq org-agenda-follow-mode (not org-agenda-follow-mode))
(unless org-agenda-follow-mode
(set-window-configuration org-agenda-pre-follow-window-conf))
(org-agenda-set-mode-name)
(org-agenda-do-context-action)
(message "Follow mode is %s"
@ -7925,8 +7934,7 @@ use the dedicated frame)."
(unless (or (eq org-indirect-buffer-display 'new-frame)
(eq org-indirect-buffer-display 'dedicated-frame))
(unwind-protect
(progn
(unless (and indirect-window (window-live-p indirect-window)))
(unless (and indirect-window (window-live-p indirect-window))
(setq indirect-window (split-window agenda-window)))
(and indirect-window (select-window indirect-window))
(switch-to-buffer org-last-indirect-buffer :norecord)

View file

@ -760,11 +760,14 @@ Assume point is at beginning of the headline."
(point)))))
;; Clean RAW-VALUE from any quote or comment string.
(when (or quotedp commentedp)
(setq raw-value
(replace-regexp-in-string
(concat "\\(" org-quote-string "\\|" org-comment-string "\\) +")
""
raw-value)))
(let ((case-fold-search nil))
(setq raw-value
(replace-regexp-in-string
(concat
(regexp-opt (list org-quote-string org-comment-string))
"\\(?: \\|$\\)")
""
raw-value))))
;; Clean TAGS from archive tag, if any.
(when archivedp (setq tags (delete org-archive-tag tags)))
(let ((headline

View file

@ -67,9 +67,16 @@ BTEST = $(BATCH) \
# BATCH = $(EMACS) -batch -vanilla # XEmacs
BATCH = $(EMACS) -batch -Q
# Emacs must be started in toplevel directory
BATCHO = $(BATCH) \
--eval '(add-to-list '"'"'load-path "./lisp")'
# How to show Org version
SHOWVER = $(BATCHO) \
--eval '(org-version nil '"'"'full '"'"'message)'
# How to generate local.mk
MAKE_LOCAL_MK = $(BATCH) \
--eval '(add-to-list '"'"'load-path "./lisp")' \
MAKE_LOCAL_MK = $(BATCHO) \
--eval '(load "org-compat.el")' \
--eval '(load "../mk/org-fixup.el")' \
--eval '(org-make-local-mk)'

View file

@ -31,7 +31,7 @@ endif
clean-install cleanelc cleandirs cleanaddcontrib \
cleanlisp cleandoc cleandocs cleantest \
compile compile-dirty uncompiled \
config config-test config-exe config-all config-eol
config config-test config-exe config-all config-eol config-version
CONF_BASE = EMACS DESTDIR ORGCM ORG_MAKE_DOC
CONF_DEST = lispdir infodir datadir testdir
@ -64,7 +64,10 @@ config-cmd config-all::
$(info )
$(info ========= Commands used by make)
$(foreach var,$(CONF_CALL),$(info $(var) = $($(var))$(EOL)))
config config-test config-exe config-all::
config config-test config-exe config-all config-version::
$(info ========= Org version)
$(info make: Org-mode version $(ORGVERSION) ($(GITVERSION) => $(lispdir)))
@echo -n "emacs: " ; $(SHOWVER)
@echo ""
oldorg: compile info # what the old makefile did when no target was specified

View file

@ -739,23 +739,31 @@ CLOCK: [2012-01-01 sun. 00:01]--[2012-01-01 sun. 00:02] => 0:01"
(should-not (org-element-property :quotedp (org-element-at-point)))))
;; Standard position.
(org-test-with-temp-text "* QUOTE Headline"
(let ((org-quote-string "QUOTE"))
(let ((headline (org-element-at-point)))
(should (org-element-property :quotedp headline))
;; Test removal from raw value.
(should (equal (org-element-property :raw-value headline) "Headline"))))
;; Case sensitivity.
(let ((org-quote-string "Quote"))
(should-not (org-element-property :quotedp (org-element-at-point)))))
(let* ((org-quote-string "QUOTE")
(headline (org-element-at-point)))
(should (org-element-property :quotedp headline))
;; Test removal from raw value.
(should (equal (org-element-property :raw-value headline) "Headline"))))
;; Case sensitivity.
(org-test-with-temp-text "* QUOTE Headline"
(let* ((org-quote-string "Quote")
(headline (org-element-at-point)))
(should-not (org-element-property :quotedp headline))
(should (equal (org-element-property :raw-value headline)
"QUOTE Headline"))))
;; With another keyword.
(org-test-with-temp-text "* TODO QUOTE Headline"
(let ((org-quote-string "QUOTE")
(org-todo-keywords '((sequence "TODO" "DONE"))))
(should (org-element-property :quotedp (org-element-at-point)))))
(let* ((org-quote-string "QUOTE")
(org-todo-keywords '((sequence "TODO" "DONE")))
(headline (org-element-at-point)))
(should (org-element-property :quotedp headline))
(should (equal (org-element-property :raw-value headline) "Headline"))))
;; With the keyword only.
(org-test-with-temp-text "* QUOTE"
(let ((org-quote-string "QUOTE"))
(should (org-element-property :quotedp (org-element-at-point))))))
(let* ((org-quote-string "QUOTE")
(headline (org-element-at-point)))
(should (org-element-property :quotedp headline))
(should (equal (org-element-property :raw-value headline) "")))))
(ert-deftest test-org-element/headline-comment-keyword ()
"Test COMMENT keyword recognition."
@ -765,23 +773,30 @@ CLOCK: [2012-01-01 sun. 00:01]--[2012-01-01 sun. 00:02] => 0:01"
(should-not (org-element-property :commentedp (org-element-at-point)))))
;; Standard position.
(org-test-with-temp-text "* COMMENT Headline"
(let ((org-comment-string "COMMENT"))
(let ((headline (org-element-at-point)))
(should (org-element-property :commentedp headline))
;; Test removal from raw value.
(should (equal (org-element-property :raw-value headline) "Headline"))))
;; Case sensitivity.
(let ((org-comment-string "Comment"))
(should-not (org-element-property :commentedp (org-element-at-point)))))
(let ((org-comment-string "COMMENT")
(headline (org-element-at-point)))
(should (org-element-property :commentedp headline))
(should (equal (org-element-property :raw-value headline) "Headline"))))
;; Case sensitivity.
(org-test-with-temp-text "* COMMENT Headline"
(let* ((org-comment-string "Comment")
(headline (org-element-at-point)))
(should-not (org-element-property :commentedp headline))
(should (equal (org-element-property :raw-value headline)
"COMMENT Headline"))))
;; With another keyword.
(org-test-with-temp-text "* TODO COMMENT Headline"
(let ((org-comment-string "COMMENT")
(org-todo-keywords '((sequence "TODO" "DONE"))))
(should (org-element-property :commentedp (org-element-at-point)))))
(let* ((org-comment-string "COMMENT")
(org-todo-keywords '((sequence "TODO" "DONE")))
(headline (org-element-at-point)))
(should (org-element-property :commentedp headline))
(should (equal (org-element-property :raw-value headline) "Headline"))))
;; With the keyword only.
(org-test-with-temp-text "* COMMENT"
(let ((org-comment-string "COMMENT"))
(should (org-element-property :commentedp (org-element-at-point))))))
(let* ((org-comment-string "COMMENT")
(headline (org-element-at-point)))
(should (org-element-property :commentedp headline))
(should (equal (org-element-property :raw-value headline) "")))))
(ert-deftest test-org-element/headline-archive-tag ()
"Test ARCHIVE tag recognition."