Merge branch 'maint'
This commit is contained in:
commit
4962980938
1
Makefile
1
Makefile
|
@ -49,6 +49,7 @@ helpall::
|
||||||
help helpall::
|
help helpall::
|
||||||
$(info make config - check main configuration)
|
$(info make config - check main configuration)
|
||||||
helpall::
|
helpall::
|
||||||
|
$(info make config-version - check Org version)
|
||||||
$(info make config-test - check test configuration)
|
$(info make config-test - check test configuration)
|
||||||
$(info make config-exe - check executables configuration)
|
$(info make config-exe - check executables configuration)
|
||||||
$(info make config-cmd - check command configuration)
|
$(info make config-cmd - check command configuration)
|
||||||
|
|
|
@ -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
|
"Exit agenda by killing agenda buffer or burying it when
|
||||||
`org-agenda-sticky' is non-NIL"
|
`org-agenda-sticky' is non-NIL"
|
||||||
(interactive)
|
(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
|
(if org-agenda-columns-active
|
||||||
(org-columns-quit)
|
(org-columns-quit)
|
||||||
(if org-agenda-sticky
|
(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)
|
(remove-hook 'pre-command-hook 'org-unhighlight-once)
|
||||||
(org-unhighlight))
|
(org-unhighlight))
|
||||||
|
|
||||||
|
(defvar org-agenda-pre-follow-window-conf nil)
|
||||||
(defun org-agenda-follow-mode ()
|
(defun org-agenda-follow-mode ()
|
||||||
"Toggle follow mode in an agenda buffer."
|
"Toggle follow mode in an agenda buffer."
|
||||||
(interactive)
|
(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))
|
(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-set-mode-name)
|
||||||
(org-agenda-do-context-action)
|
(org-agenda-do-context-action)
|
||||||
(message "Follow mode is %s"
|
(message "Follow mode is %s"
|
||||||
|
@ -7925,8 +7934,7 @@ use the dedicated frame)."
|
||||||
(unless (or (eq org-indirect-buffer-display 'new-frame)
|
(unless (or (eq org-indirect-buffer-display 'new-frame)
|
||||||
(eq org-indirect-buffer-display 'dedicated-frame))
|
(eq org-indirect-buffer-display 'dedicated-frame))
|
||||||
(unwind-protect
|
(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)))
|
(setq indirect-window (split-window agenda-window)))
|
||||||
(and indirect-window (select-window indirect-window))
|
(and indirect-window (select-window indirect-window))
|
||||||
(switch-to-buffer org-last-indirect-buffer :norecord)
|
(switch-to-buffer org-last-indirect-buffer :norecord)
|
||||||
|
|
|
@ -760,11 +760,14 @@ Assume point is at beginning of the headline."
|
||||||
(point)))))
|
(point)))))
|
||||||
;; Clean RAW-VALUE from any quote or comment string.
|
;; Clean RAW-VALUE from any quote or comment string.
|
||||||
(when (or quotedp commentedp)
|
(when (or quotedp commentedp)
|
||||||
(setq raw-value
|
(let ((case-fold-search nil))
|
||||||
(replace-regexp-in-string
|
(setq raw-value
|
||||||
(concat "\\(" org-quote-string "\\|" org-comment-string "\\) +")
|
(replace-regexp-in-string
|
||||||
""
|
(concat
|
||||||
raw-value)))
|
(regexp-opt (list org-quote-string org-comment-string))
|
||||||
|
"\\(?: \\|$\\)")
|
||||||
|
""
|
||||||
|
raw-value))))
|
||||||
;; Clean TAGS from archive tag, if any.
|
;; Clean TAGS from archive tag, if any.
|
||||||
(when archivedp (setq tags (delete org-archive-tag tags)))
|
(when archivedp (setq tags (delete org-archive-tag tags)))
|
||||||
(let ((headline
|
(let ((headline
|
||||||
|
|
|
@ -67,9 +67,16 @@ BTEST = $(BATCH) \
|
||||||
# BATCH = $(EMACS) -batch -vanilla # XEmacs
|
# BATCH = $(EMACS) -batch -vanilla # XEmacs
|
||||||
BATCH = $(EMACS) -batch -Q
|
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
|
# How to generate local.mk
|
||||||
MAKE_LOCAL_MK = $(BATCH) \
|
MAKE_LOCAL_MK = $(BATCHO) \
|
||||||
--eval '(add-to-list '"'"'load-path "./lisp")' \
|
|
||||||
--eval '(load "org-compat.el")' \
|
--eval '(load "org-compat.el")' \
|
||||||
--eval '(load "../mk/org-fixup.el")' \
|
--eval '(load "../mk/org-fixup.el")' \
|
||||||
--eval '(org-make-local-mk)'
|
--eval '(org-make-local-mk)'
|
||||||
|
|
|
@ -31,7 +31,7 @@ endif
|
||||||
clean-install cleanelc cleandirs cleanaddcontrib \
|
clean-install cleanelc cleandirs cleanaddcontrib \
|
||||||
cleanlisp cleandoc cleandocs cleantest \
|
cleanlisp cleandoc cleandocs cleantest \
|
||||||
compile compile-dirty uncompiled \
|
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_BASE = EMACS DESTDIR ORGCM ORG_MAKE_DOC
|
||||||
CONF_DEST = lispdir infodir datadir testdir
|
CONF_DEST = lispdir infodir datadir testdir
|
||||||
|
@ -64,7 +64,10 @@ config-cmd config-all::
|
||||||
$(info )
|
$(info )
|
||||||
$(info ========= Commands used by make)
|
$(info ========= Commands used by make)
|
||||||
$(foreach var,$(CONF_CALL),$(info $(var) = $($(var))$(EOL)))
|
$(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 ""
|
@echo ""
|
||||||
|
|
||||||
oldorg: compile info # what the old makefile did when no target was specified
|
oldorg: compile info # what the old makefile did when no target was specified
|
||||||
|
|
|
@ -1007,11 +1007,11 @@ Line 3\"
|
||||||
(org-test-with-temp-text "Block two has a space after the name.
|
(org-test-with-temp-text "Block two has a space after the name.
|
||||||
|
|
||||||
#+name: foo
|
#+name: foo
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
1
|
1
|
||||||
#+end_src emacs-lisp
|
#+end_src emacs-lisp
|
||||||
|
|
||||||
#+name: foo
|
#+name: foo
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
2
|
2
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
|
@ -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)))))
|
(should-not (org-element-property :quotedp (org-element-at-point)))))
|
||||||
;; Standard position.
|
;; Standard position.
|
||||||
(org-test-with-temp-text "* QUOTE Headline"
|
(org-test-with-temp-text "* QUOTE Headline"
|
||||||
(let ((org-quote-string "QUOTE"))
|
(let* ((org-quote-string "QUOTE")
|
||||||
(let ((headline (org-element-at-point)))
|
(headline (org-element-at-point)))
|
||||||
(should (org-element-property :quotedp headline))
|
(should (org-element-property :quotedp headline))
|
||||||
;; Test removal from raw value.
|
;; Test removal from raw value.
|
||||||
(should (equal (org-element-property :raw-value headline) "Headline"))))
|
(should (equal (org-element-property :raw-value headline) "Headline"))))
|
||||||
;; Case sensitivity.
|
;; Case sensitivity.
|
||||||
(let ((org-quote-string "Quote"))
|
(org-test-with-temp-text "* QUOTE Headline"
|
||||||
(should-not (org-element-property :quotedp (org-element-at-point)))))
|
(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.
|
;; With another keyword.
|
||||||
(org-test-with-temp-text "* TODO QUOTE Headline"
|
(org-test-with-temp-text "* TODO QUOTE Headline"
|
||||||
(let ((org-quote-string "QUOTE")
|
(let* ((org-quote-string "QUOTE")
|
||||||
(org-todo-keywords '((sequence "TODO" "DONE"))))
|
(org-todo-keywords '((sequence "TODO" "DONE")))
|
||||||
(should (org-element-property :quotedp (org-element-at-point)))))
|
(headline (org-element-at-point)))
|
||||||
|
(should (org-element-property :quotedp headline))
|
||||||
|
(should (equal (org-element-property :raw-value headline) "Headline"))))
|
||||||
;; With the keyword only.
|
;; With the keyword only.
|
||||||
(org-test-with-temp-text "* QUOTE"
|
(org-test-with-temp-text "* QUOTE"
|
||||||
(let ((org-quote-string "QUOTE"))
|
(let* ((org-quote-string "QUOTE")
|
||||||
(should (org-element-property :quotedp (org-element-at-point))))))
|
(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 ()
|
(ert-deftest test-org-element/headline-comment-keyword ()
|
||||||
"Test COMMENT keyword recognition."
|
"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)))))
|
(should-not (org-element-property :commentedp (org-element-at-point)))))
|
||||||
;; Standard position.
|
;; Standard position.
|
||||||
(org-test-with-temp-text "* COMMENT Headline"
|
(org-test-with-temp-text "* COMMENT Headline"
|
||||||
(let ((org-comment-string "COMMENT"))
|
(let ((org-comment-string "COMMENT")
|
||||||
(let ((headline (org-element-at-point)))
|
(headline (org-element-at-point)))
|
||||||
(should (org-element-property :commentedp headline))
|
(should (org-element-property :commentedp headline))
|
||||||
;; Test removal from raw value.
|
(should (equal (org-element-property :raw-value headline) "Headline"))))
|
||||||
(should (equal (org-element-property :raw-value headline) "Headline"))))
|
;; Case sensitivity.
|
||||||
;; Case sensitivity.
|
(org-test-with-temp-text "* COMMENT Headline"
|
||||||
(let ((org-comment-string "Comment"))
|
(let* ((org-comment-string "Comment")
|
||||||
(should-not (org-element-property :commentedp (org-element-at-point)))))
|
(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.
|
;; With another keyword.
|
||||||
(org-test-with-temp-text "* TODO COMMENT Headline"
|
(org-test-with-temp-text "* TODO COMMENT Headline"
|
||||||
(let ((org-comment-string "COMMENT")
|
(let* ((org-comment-string "COMMENT")
|
||||||
(org-todo-keywords '((sequence "TODO" "DONE"))))
|
(org-todo-keywords '((sequence "TODO" "DONE")))
|
||||||
(should (org-element-property :commentedp (org-element-at-point)))))
|
(headline (org-element-at-point)))
|
||||||
|
(should (org-element-property :commentedp headline))
|
||||||
|
(should (equal (org-element-property :raw-value headline) "Headline"))))
|
||||||
;; With the keyword only.
|
;; With the keyword only.
|
||||||
(org-test-with-temp-text "* COMMENT"
|
(org-test-with-temp-text "* COMMENT"
|
||||||
(let ((org-comment-string "COMMENT"))
|
(let* ((org-comment-string "COMMENT")
|
||||||
(should (org-element-property :commentedp (org-element-at-point))))))
|
(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 ()
|
(ert-deftest test-org-element/headline-archive-tag ()
|
||||||
"Test ARCHIVE tag recognition."
|
"Test ARCHIVE tag recognition."
|
||||||
|
|
Loading…
Reference in New Issue