Merge branch 'maint' of orgmode.org:org-mode into maint

This commit is contained in:
Bastien Guerry 2012-09-29 11:10:11 +02:00
commit ecbd57effb
6 changed files with 66 additions and 37 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

@ -746,11 +746,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

@ -1007,11 +1007,11 @@ Line 3\"
(org-test-with-temp-text "Block two has a space after the name.
#+name: foo
#+begin_src emacs-lisp
#+begin_src emacs-lisp
1
#+end_src emacs-lisp
#+name: foo
#+name: foo
#+begin_src emacs-lisp
2
#+end_src

View File

@ -727,23 +727,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."
@ -753,23 +761,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."