forked from mirrors/org-mode
Merge branch 'maint' into emacs-sync
This commit is contained in:
commit
2540608fba
|
@ -186,7 +186,8 @@ variables and values specified in props"
|
|||
(header-props
|
||||
(mapcar (lambda (props)
|
||||
(mapcar (lambda (pair)
|
||||
(cons (car pair) (org-babel-read (cdr pair))))
|
||||
(let ((inhibit-lisp-eval (string= (car pair) "ITEM")))
|
||||
(cons (car pair) (org-babel-read (cdr pair) inhibit-lisp-eval))))
|
||||
props))
|
||||
header-props))
|
||||
;; collect all property names
|
||||
|
|
10
doc/org.texi
10
doc/org.texi
|
@ -8664,9 +8664,13 @@ ranges can be specified with two timestamps, like
|
|||
@c
|
||||
@w{@samp{<2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15>}}.
|
||||
|
||||
In the headline of the entry itself, a time(range) may also appear as
|
||||
plain text (like @samp{12:45} or a @samp{8:30-1pm}). If the agenda
|
||||
integrates the Emacs diary (@pxref{Weekly/daily agenda}), time
|
||||
@vindex org-agenda-search-headline-for-time
|
||||
In the headline of the entry itself, a time(range) may also appear as plain
|
||||
text (like @samp{12:45} or a @samp{8:30-1pm})@footnote{You can, however,
|
||||
disable this by setting @code{org-agenda-search-headline-for-time} variable
|
||||
to a @code{nil} value.}.
|
||||
|
||||
If the agenda integrates the Emacs diary (@pxref{Weekly/daily agenda}), time
|
||||
specifications in diary entries are recognized as well.
|
||||
|
||||
For agenda display, Org mode extracts the time and displays it in a
|
||||
|
|
|
@ -4487,9 +4487,9 @@ is active."
|
|||
(setq files (org-agenda-files nil 'ifmode))
|
||||
;; Add `org-agenda-text-search-extra-files' unless there is some
|
||||
;; restriction.
|
||||
(unless (get 'org-agenda-files 'org-restrict)
|
||||
(when (eq (car org-agenda-text-search-extra-files) 'agenda-archives)
|
||||
(pop org-agenda-text-search-extra-files)
|
||||
(when (eq (car org-agenda-text-search-extra-files) 'agenda-archives)
|
||||
(pop org-agenda-text-search-extra-files)
|
||||
(unless (get 'org-agenda-files 'org-restrict)
|
||||
(setq files (org-add-archive-files files))))
|
||||
;; Uniquify files. However, let `org-check-agenda-file' handle
|
||||
;; non-existent ones.
|
||||
|
@ -4751,11 +4751,11 @@ The prefix arg TODO-ONLY limits the search to TODO entries."
|
|||
(format "*Org Agenda(%s:%s)*"
|
||||
(or org-keys (or (and todo-only "M") "m")) match)
|
||||
(format "*Org Agenda(%s)*" (or (and todo-only "M") "m")))))
|
||||
(setq matcher (org-make-tags-matcher match))
|
||||
;; Prepare agendas (and `org-tag-alist-for-agenda') before
|
||||
;; expanding tags within `org-make-tags-matcher'
|
||||
(org-agenda-prepare (concat "TAGS " match))
|
||||
(setq matcher (org-make-tags-matcher match)
|
||||
match (car matcher)
|
||||
(setq match (car matcher)
|
||||
matcher (cdr matcher))
|
||||
(org-compile-prefix-format 'tags)
|
||||
(org-set-sorting-strategy 'tags)
|
||||
|
@ -6004,10 +6004,7 @@ specification like [h]h:mm."
|
|||
org-deadline-warning-days))
|
||||
;; Set pre-warning to deadline.
|
||||
(t 0))))
|
||||
(wdays (if suppress-prewarning
|
||||
(let ((org-deadline-warning-days suppress-prewarning))
|
||||
(org-get-wdays s))
|
||||
(org-get-wdays s))))
|
||||
(wdays (or suppress-prewarning (org-get-wdays s))))
|
||||
(cond
|
||||
;; Only display deadlines at their base date, at future
|
||||
;; repeat occurrences or in today agenda.
|
||||
|
|
|
@ -319,7 +319,8 @@ the ATTACH_DIR property) their own attachment directory."
|
|||
(defun org-attach-annex-get-maybe (path)
|
||||
"Call git annex get PATH (via shell) if using git annex.
|
||||
Signals an error if the file content is not available and it was not retrieved."
|
||||
(let ((path-relative (file-relative-name path)))
|
||||
(let* ((default-directory (expand-file-name org-attach-directory))
|
||||
(path-relative (file-relative-name path)))
|
||||
(when (and (org-attach-use-annex)
|
||||
(not
|
||||
(string-equal
|
||||
|
|
|
@ -93,11 +93,12 @@ Otherwise point is not moved. Return point."
|
|||
(defun org-eww-copy-for-org-mode ()
|
||||
"Copy current buffer content or active region with `org-mode' style links.
|
||||
This will encode `link-title' and `link-location' with
|
||||
`org-make-link-string', and insert the transformed test into the kill ring,
|
||||
so that it can be yanked into an Org mode buffer with links working correctly.
|
||||
`org-make-link-string' and insert the transformed text into the
|
||||
kill ring, so that it can be yanked into an Org mode buffer with
|
||||
links working correctly.
|
||||
|
||||
Further lines starting with a star get quoted with a comma to keep
|
||||
the structure of the Org file."
|
||||
Further lines starting with a star get quoted with a comma to
|
||||
keep the structure of the Org file."
|
||||
(interactive)
|
||||
(let* ((regionp (org-region-active-p))
|
||||
(transform-start (point-min))
|
||||
|
|
64
lisp/org.el
64
lisp/org.el
|
@ -7,7 +7,7 @@
|
|||
;; Maintainer: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: https://orgmode.org
|
||||
;; Version: 9.1.11
|
||||
;; Version: 9.1.12
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -4903,17 +4903,39 @@ Support for group tags is controlled by the option
|
|||
(message "Groups tags support has been turned %s"
|
||||
(if org-group-tags "on" "off")))
|
||||
|
||||
(defun org-tag-add-to-alist (alist1 alist2)
|
||||
"Append ALIST1 elements to ALIST2 if they are not there yet."
|
||||
(defun org--tag-add-to-alist (alist1 alist2)
|
||||
"Merge tags from ALIST1 into ALIST2.
|
||||
|
||||
Duplicates tags outside a group are removed. Keywords and order
|
||||
are preserved.
|
||||
|
||||
The function assumes ALIST1 and ALIST2 are proper tag alists.
|
||||
See `org-tag-alist' for their structure."
|
||||
(cond
|
||||
((null alist2) alist1)
|
||||
((null alist1) alist2)
|
||||
(t (let ((alist2-cars (mapcar (lambda (x) (car-safe x)) alist2))
|
||||
to-add)
|
||||
(dolist (i alist1)
|
||||
(unless (member (car-safe i) alist2-cars)
|
||||
(push i to-add)))
|
||||
(append to-add alist2)))))
|
||||
(t
|
||||
(let ((to-add nil)
|
||||
(group-flag nil))
|
||||
(dolist (tag-pair alist1)
|
||||
(pcase tag-pair
|
||||
(`(,(or :startgrouptag :startgroup))
|
||||
(setq group-flag t)
|
||||
(push tag-pair to-add))
|
||||
(`(,(or :endgrouptag :endgroup))
|
||||
(setq group-flag nil)
|
||||
(push tag-pair to-add))
|
||||
(`(,(or :grouptags :newline))
|
||||
(push tag-pair to-add))
|
||||
(`(,tag . ,_)
|
||||
;; Remove duplicates from ALIST1, unless they are in
|
||||
;; a group. Indeed, it makes sense to have a tag appear in
|
||||
;; multiple groups.
|
||||
(when (or group-flag (not (assoc tag alist2)))
|
||||
(push tag-pair to-add)))
|
||||
(_ (error "Invalid association in tag alist: %S" tag-pair))))
|
||||
;; Preserve order of ALIST1.
|
||||
(append (nreverse to-add) alist2)))))
|
||||
|
||||
(defun org-set-regexps-and-options (&optional tags-only)
|
||||
"Precompute regular expressions used in the current buffer.
|
||||
|
@ -4943,7 +4965,7 @@ related expressions."
|
|||
(mapcar #'org-add-prop-inherited
|
||||
(cdr (assq 'filetags alist))))
|
||||
(setq org-current-tag-alist
|
||||
(org-tag-add-to-alist
|
||||
(org--tag-add-to-alist
|
||||
org-tag-persistent-alist
|
||||
(let ((tags (cdr (assq 'tags alist))))
|
||||
(if tags (org-tag-string-to-alist tags)
|
||||
|
@ -10517,7 +10539,7 @@ Raise an error when there is nothing to follow. "
|
|||
(with-temp-buffer
|
||||
(let ((org-inhibit-startup (not reference-buffer)))
|
||||
(org-mode)
|
||||
(insert s)
|
||||
(insert (org-link-escape s))
|
||||
(goto-char (point-min))
|
||||
(when reference-buffer
|
||||
(setq org-link-abbrev-alist-local
|
||||
|
@ -14340,7 +14362,7 @@ instead of the agenda files."
|
|||
(mapcar
|
||||
(lambda (file)
|
||||
(set-buffer (find-file-noselect file))
|
||||
(org-tag-add-to-alist
|
||||
(org--tag-add-to-alist
|
||||
(org-get-buffer-tags)
|
||||
(mapcar (lambda (x)
|
||||
(and (stringp (car-safe x))
|
||||
|
@ -14372,7 +14394,7 @@ See also `org-scan-tags'."
|
|||
;; Get a new match request, with completion against the global
|
||||
;; tags table and the local tags in current buffer.
|
||||
(let ((org-last-tags-completion-table
|
||||
(org-tag-add-to-alist
|
||||
(org--tag-add-to-alist
|
||||
(org-get-buffer-tags)
|
||||
(org-global-tags-completion-table))))
|
||||
(setq match
|
||||
|
@ -14891,7 +14913,7 @@ When JUST-ALIGN is non-nil, only align tags."
|
|||
(let* ((table
|
||||
(setq
|
||||
org-last-tags-completion-table
|
||||
(org-tag-add-to-alist
|
||||
(org--tag-add-to-alist
|
||||
(and
|
||||
org-complete-tags-always-offer-all-agenda-tags
|
||||
(org-global-tags-completion-table
|
||||
|
@ -14976,7 +14998,7 @@ This works in the agenda, and also in an Org buffer."
|
|||
(list (region-beginning) (region-end)
|
||||
(let ((org-last-tags-completion-table
|
||||
(if (derived-mode-p 'org-mode)
|
||||
(org-tag-add-to-alist
|
||||
(org--tag-add-to-alist
|
||||
(org-get-buffer-tags)
|
||||
(org-global-tags-completion-table))
|
||||
(org-global-tags-completion-table))))
|
||||
|
@ -15068,10 +15090,12 @@ TODO keywords, should these have keys assigned to them.
|
|||
If the keys are nil, a-z are automatically assigned.
|
||||
Returns the new tags string, or nil to not change the current settings."
|
||||
(let* ((fulltable (append table todo-table))
|
||||
(maxlen (apply 'max (mapcar
|
||||
(lambda (x)
|
||||
(if (stringp (car x)) (string-width (car x)) 0))
|
||||
fulltable)))
|
||||
(maxlen (if (null fulltable) 0
|
||||
(apply #'max
|
||||
(mapcar (lambda (x)
|
||||
(if (stringp (car x)) (string-width (car x))
|
||||
0))
|
||||
fulltable))))
|
||||
(buf (current-buffer))
|
||||
(expert (eq org-fast-tag-selection-single-key 'expert))
|
||||
(buffer-tags nil)
|
||||
|
@ -18565,7 +18589,7 @@ When a buffer is unmodified, it is just killed. When modified, it is saved
|
|||
(setq org-todo-keyword-alist-for-agenda
|
||||
(append org-todo-keyword-alist-for-agenda org-todo-key-alist))
|
||||
(setq org-tag-alist-for-agenda
|
||||
(org-tag-add-to-alist
|
||||
(org--tag-add-to-alist
|
||||
org-tag-alist-for-agenda
|
||||
org-current-tag-alist))
|
||||
;; Merge current file's tag groups into global
|
||||
|
|
Loading…
Reference in New Issue