Browse Source

Merge branch 'maint'

Nicolas Goaziou 5 năm trước cách đây
mục cha
commit
4141355492
4 tập tin đã thay đổi với 67 bổ sung58 xóa
  1. 36 31
      doc/org-manual.org
  2. 0 1
      lisp/org-agenda.el
  3. 5 0
      lisp/org-clock.el
  4. 26 26
      lisp/org.el

+ 36 - 31
doc/org-manual.org

@@ -18508,8 +18508,16 @@ the headline text[fn:146].
 #+vindex: org-indent-indentation-per-level
 #+vindex: org-indent-indentation-per-level
 To make more horizontal space, the headlines are shifted by two
 To make more horizontal space, the headlines are shifted by two
 characters.  Configure ~org-indent-indentation-per-level~ variable for
 characters.  Configure ~org-indent-indentation-per-level~ variable for
-a different number.  Only one star on each headline is visible, the
-rest are masked with the same font color as the background[fn:147].
+a different number.
+
+#+vindex: org-indent-mode-turns-on-hiding-stars
+#+vindex: org-indent-mode-turns-off-org-adapt-indentation
+By default, Org Indent mode turns off ~org-adapt-indentation~ and does
+hide leading stars by locally setting ~org-hide-leading-stars~ to ~t~:
+only one star on each headline is visible, the rest are masked with
+the same font color as the background.  If you want to customize this
+default behavior, see ~org-indent-mode-turns-on-hiding-stars~ and
+~org-indent-mode-turns-off-org-adapt-indentation~.
 
 
 #+vindex: org-startup-indented
 #+vindex: org-startup-indented
 To globally turn on Org Indent mode for all files, customize the
 To globally turn on Org Indent mode for all files, customize the
@@ -18523,7 +18531,7 @@ use =STARTUP= keyword as follows:
 
 
 It is possible to use hard spaces to achieve the indentation instead,
 It is possible to use hard spaces to achieve the indentation instead,
 if the bare ASCII file should have the indented look also outside
 if the bare ASCII file should have the indented look also outside
-Emacs[fn:148].  With Org's support, you have to indent all lines to
+Emacs[fn:147].  With Org's support, you have to indent all lines to
 line up with the outline headers.  You would use these settings:
 line up with the outline headers.  You would use these settings:
 
 
   #+begin_src emacs-lisp
   #+begin_src emacs-lisp
@@ -18764,7 +18772,7 @@ changes.
 
 
   #+vindex: org-startup-indented
   #+vindex: org-startup-indented
   Dynamic virtual indentation is controlled by the variable
   Dynamic virtual indentation is controlled by the variable
-  ~org-startup-indented~[fn:149].
+  ~org-startup-indented~[fn:148].
 
 
   | =indent=   | Start with Org Indent mode turned on.  |
   | =indent=   | Start with Org Indent mode turned on.  |
   | =noindent= | Start with Org Indent mode turned off. |
   | =noindent= | Start with Org Indent mode turned off. |
@@ -19573,7 +19581,7 @@ these variables.
 
 
 #+vindex: org-mobile-directory
 #+vindex: org-mobile-directory
 The mobile application needs access to a file directory on
 The mobile application needs access to a file directory on
-a server[fn:150] to interact with Emacs.  Pass its location through
+a server[fn:149] to interact with Emacs.  Pass its location through
 the ~org-mobile-directory~ variable.  If you can mount that directory
 the ~org-mobile-directory~ variable.  If you can mount that directory
 locally just set the variable to point to that directory:
 locally just set the variable to point to that directory:
 
 
@@ -19594,7 +19602,7 @@ With a public server, consider encrypting the files.  Org also
 requires OpenSSL installed on the local computer.  To turn on
 requires OpenSSL installed on the local computer.  To turn on
 encryption, set the same password in the mobile application and in
 encryption, set the same password in the mobile application and in
 Emacs.  Set the password in the variable
 Emacs.  Set the password in the variable
-~org-mobile-use-encryption~[fn:151].  Note that even after the mobile
+~org-mobile-use-encryption~[fn:150].  Note that even after the mobile
 application encrypts the file contents, the file name remains visible
 application encrypts the file contents, the file name remains visible
 on the file systems of the local computer, the server, and the mobile
 on the file systems of the local computer, the server, and the mobile
 device.
 device.
@@ -19610,15 +19618,15 @@ The command ~org-mobile-push~ copies files listed in
 ~org-mobile-files~ into the staging area.  Files include agenda files
 ~org-mobile-files~ into the staging area.  Files include agenda files
 (as listed in ~org-agenda-files~).  Customize ~org-mobile-files~ to
 (as listed in ~org-agenda-files~).  Customize ~org-mobile-files~ to
 add other files.  File names are staged with paths relative to
 add other files.  File names are staged with paths relative to
-~org-directory~, so all files should be inside this directory[fn:152].
+~org-directory~, so all files should be inside this directory[fn:151].
 
 
 Push creates a special Org file =agendas.org= with custom agenda views
 Push creates a special Org file =agendas.org= with custom agenda views
-defined by the user[fn:153].
+defined by the user[fn:152].
 
 
 Finally, Org writes the file =index.org=, containing links to other
 Finally, Org writes the file =index.org=, containing links to other
 files.  The mobile application reads this file first from the server
 files.  The mobile application reads this file first from the server
 to determine what other files to download for agendas.  For faster
 to determine what other files to download for agendas.  For faster
-downloads, it is expected to only read files whose checksums[fn:154]
+downloads, it is expected to only read files whose checksums[fn:153]
 have changed.
 have changed.
 
 
 *** Pulling from the mobile application
 *** Pulling from the mobile application
@@ -19635,7 +19643,7 @@ data in an inbox file format, through the following steps:
 
 
 1.
 1.
    #+vindex: org-mobile-inbox-for-pull
    #+vindex: org-mobile-inbox-for-pull
-   Org moves all entries found in =mobileorg.org=[fn:155] and appends
+   Org moves all entries found in =mobileorg.org=[fn:154] and appends
    them to the file pointed to by the variable
    them to the file pointed to by the variable
    ~org-mobile-inbox-for-pull~.  It should reside neither in the
    ~org-mobile-inbox-for-pull~.  It should reside neither in the
    staging area nor on the server.  Each captured entry and each
    staging area nor on the server.  Each captured entry and each
@@ -19926,9 +19934,9 @@ of these strategies:
 #+cindex: @LaTeX{}, and Orgtbl mode
 #+cindex: @LaTeX{}, and Orgtbl mode
 
 
 To wrap a source table in LaTeX, use the =comment= environment
 To wrap a source table in LaTeX, use the =comment= environment
-provided by =comment.sty=[fn:156].  To activate it, put
+provided by =comment.sty=[fn:155].  To activate it, put
 ~\usepackage{comment}~ in the document header.  Orgtbl mode inserts
 ~\usepackage{comment}~ in the document header.  Orgtbl mode inserts
-a radio table skeleton[fn:157] with the command {{{kbd(M-x
+a radio table skeleton[fn:156] with the command {{{kbd(M-x
 orgtbl-insert-radio-table)}}}, which prompts for a table name.  For
 orgtbl-insert-radio-table)}}}, which prompts for a table name.  For
 example, if =salesfigures= is the name, the template inserts:
 example, if =salesfigures= is the name, the template inserts:
 
 
@@ -19947,7 +19955,7 @@ The line =#+ORGTBL: SEND= tells Orgtbl mode to use the function
 ~orgtbl-to-latex~ to convert the table to LaTeX format, then insert
 ~orgtbl-to-latex~ to convert the table to LaTeX format, then insert
 the table at the target (receive) location named =salesfigures=.  Now
 the table at the target (receive) location named =salesfigures=.  Now
 the table is ready for data entry.  It can even use spreadsheet
 the table is ready for data entry.  It can even use spreadsheet
-features[fn:158]:
+features[fn:157]:
 
 
 #+begin_example
 #+begin_example
 % BEGIN RECEIVE ORGTBL salesfigures
 % BEGIN RECEIVE ORGTBL salesfigures
@@ -20163,7 +20171,7 @@ Dynamic blocks, like any other block, can be narrowed with
 #+vindex: org-agenda-skip-function
 #+vindex: org-agenda-skip-function
 #+vindex: org-agenda-skip-function-global
 #+vindex: org-agenda-skip-function-global
 Org provides a special hook to further limit items in agenda views:
 Org provides a special hook to further limit items in agenda views:
-~agenda~, ~agenda*~[fn:159], ~todo~, ~alltodo~, ~tags~, ~tags-todo~,
+~agenda~, ~agenda*~[fn:158], ~todo~, ~alltodo~, ~tags~, ~tags-todo~,
 ~tags-tree~.  Specify a custom function that tests inclusion of every
 ~tags-tree~.  Specify a custom function that tests inclusion of every
 matched item in the view.  This function can also skip as much as is
 matched item in the view.  This function can also skip as much as is
 needed.
 needed.
@@ -20206,7 +20214,7 @@ meaningful string suitable for the agenda view.
 #+vindex: org-agenda-skip-function
 #+vindex: org-agenda-skip-function
 Search for entries with a limit set on levels for the custom search.
 Search for entries with a limit set on levels for the custom search.
 This is a general approach to creating custom searches in Org.  To
 This is a general approach to creating custom searches in Org.  To
-include all levels, use =LEVEL>0=[fn:160].  Then to selectively pick
+include all levels, use =LEVEL>0=[fn:159].  Then to selectively pick
 the matched entries, use ~org-agenda-skip-function~, which also
 the matched entries, use ~org-agenda-skip-function~, which also
 accepts Lisp forms, such as ~org-agenda-skip-entry-if~ and
 accepts Lisp forms, such as ~org-agenda-skip-entry-if~ and
 ~org-agenda-skip-subtree-if~.  For example:
 ~org-agenda-skip-subtree-if~.  For example:
@@ -21637,45 +21645,42 @@ indenting and wrapping long lines of headlines or text.  This minor
 mode also handles Visual Line mode and directly applied settings
 mode also handles Visual Line mode and directly applied settings
 through ~word-wrap~.
 through ~word-wrap~.
 
 
-[fn:147] Note that turning on Org Indent mode sets
-~org-hide-leading-stars~ to ~t~ and ~org-adapt-indentation~ to ~nil~.
-
-[fn:148] This works, but requires extra effort.  Org Indent mode is
+[fn:147] This works, but requires extra effort.  Org Indent mode is
 more convenient for most applications.
 more convenient for most applications.
 
 
-[fn:149] Note that Org Indent mode also sets the ~wrap-prefix~
+[fn:148] Note that Org Indent mode also sets the ~wrap-prefix~
 property, such that Visual Line mode (or purely setting ~word-wrap~)
 property, such that Visual Line mode (or purely setting ~word-wrap~)
 wraps long lines, including headlines, correctly indented.
 wraps long lines, including headlines, correctly indented.
 
 
-[fn:150] For a server to host files, consider using a WebDAV server,
+[fn:149] For a server to host files, consider using a WebDAV server,
 such as [[https://nextcloud.com][Nextcloud]].  Additional help is at this [[https://orgmode.org/worg/org-faq.html#mobileorg_webdav][FAQ entry]].
 such as [[https://nextcloud.com][Nextcloud]].  Additional help is at this [[https://orgmode.org/worg/org-faq.html#mobileorg_webdav][FAQ entry]].
 
 
-[fn:151] If Emacs is configured for safe storing of passwords, then
+[fn:150] If Emacs is configured for safe storing of passwords, then
 configure the variable ~org-mobile-encryption-password~; please read
 configure the variable ~org-mobile-encryption-password~; please read
 the docstring of that variable.
 the docstring of that variable.
 
 
-[fn:152] Symbolic links in ~org-directory~ need to have the same name
+[fn:151] Symbolic links in ~org-directory~ need to have the same name
 as their targets.
 as their targets.
 
 
-[fn:153] While creating the agendas, Org mode forces =ID= properties
+[fn:152] While creating the agendas, Org mode forces =ID= properties
 on all referenced entries, so that these entries can be uniquely
 on all referenced entries, so that these entries can be uniquely
 identified if Org Mobile flags them for further action.  To avoid
 identified if Org Mobile flags them for further action.  To avoid
 setting properties configure the variable
 setting properties configure the variable
 ~org-mobile-force-id-on-agenda-items~ to ~nil~.  Org mode then relies
 ~org-mobile-force-id-on-agenda-items~ to ~nil~.  Org mode then relies
 on outline paths, assuming they are unique.
 on outline paths, assuming they are unique.
 
 
-[fn:154] Checksums are stored automatically in the file
+[fn:153] Checksums are stored automatically in the file
 =checksums.dat=.
 =checksums.dat=.
 
 
-[fn:155] The file will be empty after this operation.
+[fn:154] The file will be empty after this operation.
 
 
-[fn:156] https://www.ctan.org/pkg/comment
+[fn:155] https://www.ctan.org/pkg/comment
 
 
-[fn:157] By default this works only for LaTeX, HTML, and Texinfo.
+[fn:156] By default this works only for LaTeX, HTML, and Texinfo.
 Configure the variable ~orgtbl-radio-table-templates~ to install
 Configure the variable ~orgtbl-radio-table-templates~ to install
 templates for other modes.
 templates for other modes.
 
 
-[fn:158] If the =TBLFM= keyword contains an odd number of dollar
+[fn:157] If the =TBLFM= keyword contains an odd number of dollar
 characters, this may cause problems with Font Lock in LaTeX mode.  As
 characters, this may cause problems with Font Lock in LaTeX mode.  As
 shown in the example you can fix this by adding an extra line inside
 shown in the example you can fix this by adding an extra line inside
 the =comment= environment that is used to balance the dollar
 the =comment= environment that is used to balance the dollar
@@ -21683,9 +21688,9 @@ expressions.  If you are using AUCTeX with the font-latex library,
 a much better solution is to add the =comment= environment to the
 a much better solution is to add the =comment= environment to the
 variable ~LaTeX-verbatim-environments~.
 variable ~LaTeX-verbatim-environments~.
 
 
-[fn:159] The ~agenda*~ view is the same as ~agenda~ except that it
+[fn:158] The ~agenda*~ view is the same as ~agenda~ except that it
 only considers /appointments/, i.e., scheduled and deadline items that
 only considers /appointments/, i.e., scheduled and deadline items that
 have a time specification =[h]h:mm= in their time-stamps.
 have a time specification =[h]h:mm= in their time-stamps.
 
 
-[fn:160] Note that, for ~org-odd-levels-only~, a level number
+[fn:159] Note that, for ~org-odd-levels-only~, a level number
 corresponds to order in the hierarchy, not to the number of stars.
 corresponds to order in the hierarchy, not to the number of stars.

+ 0 - 1
lisp/org-agenda.el

@@ -2199,7 +2199,6 @@ The following commands are available:
   (interactive)
   (interactive)
   (let ((agenda-local-vars-to-keep
   (let ((agenda-local-vars-to-keep
 	 '(text-scale-mode-amount
 	 '(text-scale-mode-amount
-	   text-scale-mode
 	   text-scale-mode-lighter
 	   text-scale-mode-lighter
 	   face-remapping-alist))
 	   face-remapping-alist))
 	(save (buffer-local-variables)))
 	(save (buffer-local-variables)))

+ 5 - 0
lisp/org-clock.el

@@ -823,6 +823,11 @@ use libnotify if available, or fall back on a message."
 	((executable-find "notify-send")
 	((executable-find "notify-send")
 	 (start-process "emacs-timer-notification" nil
 	 (start-process "emacs-timer-notification" nil
 			"notify-send" notification))
 			"notify-send" notification))
+	((string-equal system-type "windows-nt")
+	 (w32-notification-close (w32-notification-notify
+				  :title "Org mode message"
+				  :body notification
+				  :urgency 'low)))
 	;; Maybe the handler will send a message, so only use message as
 	;; Maybe the handler will send a message, so only use message as
 	;; a fall back option
 	;; a fall back option
 	(t (message "%s" notification))))
 	(t (message "%s" notification))))

+ 26 - 26
lisp/org.el

@@ -7900,7 +7900,7 @@ with the original repeater."
 	   (nmin 1)
 	   (nmin 1)
 	   (nmax n)
 	   (nmax n)
 	   (n-no-remove -1)
 	   (n-no-remove -1)
-	   (idprop (org-entry-get nil "ID")))
+	   (idprop (org-entry-get beg "ID")))
       (when (and doshift
       (when (and doshift
 		 (string-match-p "<[^<>\n]+ [.+]?\\+[0-9]+[hdwmy][^<>\n]*>"
 		 (string-match-p "<[^<>\n]+ [.+]?\\+[0-9]+[hdwmy][^<>\n]*>"
 				 template))
 				 template))
@@ -8730,31 +8730,31 @@ a link."
        ;; a link, a footnote reference.
        ;; a link, a footnote reference.
        ((memq type '(headline inlinetask))
        ((memq type '(headline inlinetask))
 	(org-match-line org-complex-heading-regexp)
 	(org-match-line org-complex-heading-regexp)
-	(if (and (match-beginning 5)
-		 (>= (point) (match-beginning 5))
-		 (< (point) (match-end 5)))
-	    ;; On tags.
-	    (org-tags-view
-	     arg
-	     (save-excursion
-	       (let* ((beg (match-beginning 5))
-		      (end (match-end 5))
-		      (beg-tag (or (search-backward ":" beg 'at-limit) (point)))
-		      (end-tag (search-forward ":" end nil 2)))
-		 (buffer-substring (1+ beg-tag) (1- end-tag)))))
-	  ;; Not on tags.
-	  (pcase (org-offer-links-in-entry (current-buffer) (point) arg)
-	    (`(nil . ,_)
-	     (require 'org-attach)
-	     (message "Opening attachment-dir")
-	     (if (equal arg '(4))
-		 (org-attach-reveal-in-emacs)
-	       (org-attach-reveal)))
-	    (`(,links . ,links-end)
-	     (dolist (link (if (stringp links) (list links) links))
-	       (search-forward link nil links-end)
-	       (goto-char (match-beginning 0))
-	       (org-open-at-point arg))))))
+	(let ((tags-beg (match-beginning 5))
+	      (tags-end (match-end 5))
+	      (tags-str (match-string 5)))
+	  (if (and tags-beg (>= (point) tags-beg) (< (point) tags-end))
+	      ;; On tags.
+	      (org-tags-view
+	       arg
+	       (save-excursion
+		 (let* ((beg-tag (or (search-backward ":" tags-beg 'at-limit) (point)))
+			(end-tag (search-forward ":" tags-end nil 2)))
+		   (buffer-substring (1+ beg-tag) (1- end-tag)))))
+	    ;; Not on tags.
+	    (pcase (org-offer-links-in-entry (current-buffer) (point) arg)
+	      (`(nil . ,_)
+	       (require 'org-attach)
+	       (when (org-attach-dir)
+		 (message "Opening attachment")
+		 (if (equal arg '(4))
+		     (org-attach-reveal-in-emacs)
+		   (org-attach-reveal))))
+	      (`(,links . ,links-end)
+	       (dolist (link (if (stringp links) (list links) links))
+		 (search-forward link nil links-end)
+		 (goto-char (match-beginning 0))
+		 (org-open-at-point arg)))))))
        ;; On a footnote reference or at definition's label.
        ;; On a footnote reference or at definition's label.
        ((or (eq type 'footnote-reference)
        ((or (eq type 'footnote-reference)
 	    (and (eq type 'footnote-definition)
 	    (and (eq type 'footnote-definition)