* lisp/org.el (org-time-stamp-formats):
(org-timestamp-formats):
(org-time-stamp-rounding-minutes):
(org-timestamp-rounding-minutes):
(org-time-stamp-custom-formats):
(org-timestamp-custom-formats):
(org-time-stamp):
(org-timestamp):
(org-time-stamp-inactive):
(org-timestamp-inactive):
(org-insert-time-stamp):
(org-insert-timestamp):
(org-toggle-time-stamp-overlays):
(org-toggle-timestamp-overlays):
(org-time-stamp-to-now):
(org-timestamp-to-now):
* lisp/ox.el (org-export-time-stamp-file):
(org-export-timestamp-file): Rename using "timestamp" term, keeping
the old name as alias.
* doc/org-manual.org: Update all the uses, adding #+findex and
#+vindex entries. Keep the alias names for searchability.
Adjust all the callers.
The following "time-stamp" uses are unchanged:
1. `org-time-stamp-format' where obsolete and _different_ function
`org-timestamp-format' still exists.
2. :time-stamp-file property in export INFO plist. Changing this
would be breaking.
3. ORG-NEWS remains unchanged.
* lisp/org-clock.el (org-logind-dbus-session-path): Do not try to use
dbus when `dbus-call-method' errs.
`dbus-call-method' may throw
Debugger entered--Lisp error: (dbus-error "org.freedesktop.login1.NoSessionForPID" "PID 7361 does not belong to any known session")
Do not try to use dbus method in such scenario.
Link: https://builds.sr.ht/~bzg/job/961763
* lisp/org-timer.el (org-logind-dbus-session-path): New variable.
(org-logind-user-idle-seconds): New function.
(org-user-idle-seconds): Use them.
* etc/ORG-NEWS (Add support for ~logind~ idle time in
~org-user-idle-seconds~): Document the new feature.
* lisp/org-clock.el (org-clock-get-clock-string): End the mode line
element in a space, instead of beginning with space, to make it play
well with other mode line strings, which typically end a space. For
reference, see the mode line string of the Display Time mode.
* lisp/org-clock.el (org-clock-x11idle-program-name): Change the
default value to "xprintidle" when its executable is available.
Fallback to previous default otherwise. Update :package-version and
remove :version tags.
* etc/ORG-NEWS (New and changed options):
(~org-clock-x11idle-program-name~ now defaults to =xprintidle=, when available):
Document the change.
Link: https://orgmode.org/list/874jvkn1po.fsf@localhost
* lisp/org-clock.el (org-clock-clocktable-language-setup): Use Rubriek
for "heading". It is more accurate as "Hoofding" refers to newspaper
headline. Add the missing translation for "Clock summary at".
TINYCHANGE
Link: https://orgmode.org/list/4057b0bb88604e0f1ac4d18e11bf60f5@posteo.net
* lisp/org-clock.el (org-x11idle-exists-p): Don't try to
invoke "command x11idle" on MS-Windows and MS-DOS. This fixes a
hang during byte-compilation of Org.
Fix compilation of Org 9.6 on MS-Windows
8b3baadf671b7b3d5058808c4655eca8bd46015e
Eli Zaretskii
Thu Dec 1 14:40:47 2022 +0200
* lisp/org-clock.el (org-clock-report): Clarify :scope when called
from inside a heading or before first heading. Separate :scope
description into a separate paragraph.
Reported-by: Uwe Brauer <oub@mat.ucm.es>
Link: https://orgmode.org/list/87h6z2c8pf.fsf@mat.ucm.es
* lisp/org.el (org-time-stamp-formats):
* lisp/org.el (org-time-stamp-custom-formats): Change the default
values stripping leading "<" and trailing ">". Update the docstring
explaining the format and that leading and trailing brackets are now
ignored. Update the :type specification to more precise.
(org-time-stamp-format): Update the argument list and docstring
allowing to use the function more flexibly to find the time stamp
format for both `org-time-stamp-formats' and
`org-time-stamp-custom-formats'. Rename `long' argument to more
accurate `with-time'. Ignore brackets in the `org-time-stamp-formats'
and `org-time-stamp-custom-formats'. Allow `inactive' argument to be
`no-brackets'
(org-format-timestamp):
(org-read-date-display):
(org-insert-time-stamp):
(org-display-custom-time):
(org-timestamp-translate):
* lisp/org-compat.el (org-timestamp-format): Rename
`org-timestamp-format' to `org-format-timestamp'. The old variant is
too similar with other `org-time-stamp-format' function. Also, use
`org-time-stamp-format' to determine the timestamp format instead of
using `org-time-stamp-formats' directly.
* lisp/ol.el (org-store-link):
* lisp/org-agenda.el (org-agenda-get-timestamps):
(org-agenda-get-progress):
* lisp/org-archive.el (org-archive-subtree):
(org-archive-to-archive-sibling):
* lisp/org-clock.el (org-clock-special-range):
* lisp/org-colview.el (org-colview-construct-allowed-dates):
* lisp/org-element.el (org-element-timestamp-interpreter):
* lisp/org-macro.el (org-macro--find-date):
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/date):
* lisp/ox-odt.el (org-odt--format-timestamp):
(org-odt-template):
* lisp/ox.el (org-export-get-date):
* testing/lisp/test-org.el (test-org/timestamp-format): Use
`org-time-stamp-format' instead of directly examining
`org-time-stamp-custom-formats' and `org-time-stamp-formats'. Use the
new function name `org-format-timestamp'.
* etc/ORG-NEWS (Default values and interpretations of ~org-time-stamp-formats~ and ~org-time-stamp-custom-formats~ are changed):
(~org-timestamp-format~ is renamed to ~org-format-timestamp~):
(Updated argument list in ~org-time-stamp-format~): Document the
user-facing changes.
This commit documents and unifies previously undocumented assumptions
about the values of `org-time-stamp-formats' and
`org-time-stamp-custom-formats'. Instead of fiddling with
leading/trailing brackets in the values, expedite the time format
calculation to `org-time-stamp-format'. The undocumented assumption
about brackets in user option `org-time-stamp-custom-formats' is not
relaxed making the docstring correct.
Reported-by: Uwe Brauer <oub@mat.ucm.es>
Link: https://orgmode.org/list/87k04ppp1t.fsf@localhost
* lisp/org-clock.el (org-clock-update-time-maybe): Update the
containing timestamps inside the clock, not only the clock sum.
Reported-by: Bruce E. Robertson <brucer42@gmail.com>
Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53393
* lisp/org-clock.el (org-x11idle-exists-p): Do not check if load-time
`window-system' is `x'. Instead, rely on the check in
`org-user-idle-seconds'.
Emacs may start as a daemon and hence `window-system' may not yet be
`x' during startup.
Reported-by: Julien Cubizolles <j.cubizolles@free.fr>
Link: https://orgmode.org/list/871qqs6gqs.fsf@free.fr
* lisp/org.el (org-get-title): A new function to collect a document
title from an org-mode buffer, based on a `org-clock-get-file-title'
implementation.
* lisp/org-clock.el (org-clock-get-file-title): Removed.
* lisp/org-clock.el (org-clock-insert-selection-line): Display N/A
when non-printable character selection is requested. Non-printable
characters cannot be entered through `read-char'.
Reported-by: Kevin Brubeck Unhammer <unhammer@fsfe.org>
Link: https://orgmode.org/list/87y2krmzol.fsf@trigram.no
* lisp/org-clock.el (org-resolve-clocks-if-idle): Cancel timer
for `org-resolve-clocks-if-idle' while `org-clock-resolve' waits for
the user to answer the prompt.
After the user answered the prompt to resolve the running clock, the
pending scheduled calls to `org-resolve-clocks-if-idle' (one for each
minute it took the user to answer) were being executed immediately.
But after an old change in Emacs, the user answer does not reset the
idle timer anymore, so each of those calls thought that the user was
still idle and prompted them again, to the user had to answer the same
prompt again N times. This commit fixes that bug.
TINYCHANGE
* lisp/org-clock.el: Only consider proper clock elements when
calculating clock sum. Do not rely on crude regexp.
Reported-by: Gregor Zattler <grfz@gmx.de>
Link: https://orgmode.org/list/87y1yecmgb.fsf@localhost
* lisp/org-clock.el (org-clock-resolve):
Avoid unwanted disappearing of the prompt when clicking somewhere, by
using `read-char-exclusive' instead of `read-char'.
Link: https://orgmode.org/list/87o82yaeie.fsf@gmail.com
TINYCHANGE
Make point-at-eol and point-at-bol obsolete
b7e867b841f47dcff3aeaef9b5608a237386ce70
Stefan Kangas
Tue Aug 23 04:54:57 2022 +0200
[ km: This was independently covered on the main branch with
e73c5b7d0. I'm applying it here too for bookkeeping/traceability
purposes. ]
* lisp/org-clock.el (org-clock-select-task): Remove XEmacs
compat code.
Remove some XEmacs compat code from org-mode
253374f81a13109b73afc8e319ca1fea72f68c72
Stefan Kangas
Sat May 14 15:55:20 2022 +0200
* lisp/ol.el (org-store-link):
* lisp/org-clock.el (org-clock-sum)
(org-clock-update-time-maybe):
* lisp/org-colview.el (org-colview-construct-allowed-dates):
* lisp/org-macro.el (org-macro--vc-modified-time):
* lisp/org-macs.el (org-2ft, org-matcher-time):
* lisp/org-table.el (org-table-eval-formula):
* lisp/org.el (org-read-date, org-display-custom-time)
(org-time-string-to-time, org-timestamp-change):
Don’t assume Emacs 27 encode-time, since standalone Org still
works with Emacs 25 and it’s easier if we minimize differences
from standalone Org. Problem reported by Max Nikulin (Bug#54731).
This reverts much of 2021-12-16T17:40:21Z!eggert@cs.ucla.edu.
Port Org encode-time usage back to Emacs 25
8ef37913d3be5ff518018acb6b0144d6e559b5ba
Paul Eggert
Tue Apr 5 17:52:34 2022 -0700
[ km: See main's 8908a1bda (org-macs.el: Introduce a helper for
`encode-time', 2022-07-17). ]
* lisp/ol.el (org-store-link):
* lisp/org-clock.el (org-clock-sum)
(org-clock-update-time-maybe):
* lisp/org-colview.el (org-colview-construct-allowed-dates):
* lisp/org-macro.el (org-macro--vc-modified-time):
* lisp/org-macs.el (org-2ft, org-matcher-time):
* lisp/org-table.el (org-table-eval-formula):
* lisp/org.el (org-read-date, org-display-custom-time)
(org-time-string-to-time, org-timestamp-change):
Prefer (encode-time L) to (apply #'encode-time L) where either will do.
* lisp/org-clock.el (org-clocktable-steps):
Prefer (encode-time S M ...) to (apply #'encode-time (list S M ...)).
encode-time simplifications
dd0727e1ec1f535b9b06be88173b4d3ccd55abcb
Paul Eggert
Thu Dec 16 11:17:25 2021 -0800
[ km: Note that these changes will be reverted by the port of Emacs's
8ef37913d. ]
Hi,
many years ago a colleague and myself wrote a patch for quarters into
org-mode/clocktable for blocks, today I noticed that :step should allow
'quarter' as an argument too. Here's the tiny patch to allow that.
* doc/org-manual.org (The clock table): Document the new clocktable
option.
* lisp/org-clock.el:
(org-clocktable-steps): Add new 'quarter allowed value.
TINYCHANGE
* lisp/oc-basic.el (org-cite-basic--parse-bibliography): Do not use
obsolete `buffer-file-name' generalized variable. Prefer
`set-visited-file-name'.
* lisp/ol-bibtex.el (org-indent-region): Declare function.
(org-bibtex-import-from-file): Remove unused variable.
* lisp/ol.el (org-link--decode-compound): Use `ash' instead of
obsolete `lsh'.
* lisp/org-macs.el: Do no use obsolete generalized variable
`buffer-string'.
* lisp/org-plot.el (org-plot/redisplay-img-in-buffer):
* lisp/org.el (image-flush):
(org-display-inline-images): Use `image-flush' instead of obsolete
`image-refresh'.
* lisp/ox.el (org-export-to-file): Quote ' in the docstring.
All other changes are changing obsolete `point-at-bol' and
`point-at-eol' to `line-beginning-position' and `line-end-position'.
* lisp/org-clock.el (org-clocktable-defaults): Add default value for
new clock table option `:filetitle'.
(org-clock-get-file-title): Add new function to extract title of org file.
(org-clocktable-write-default): Print org file name in clock table if
`:filetitle' is set to `t'.
* doc/org-manual.org (The clock table): Include new `:filetitle'
option in manual for clock table.
* etc/ORG-NEWS (New =:filetitle= option for clock table): Include new
`:filetitle' option for clock table.
Allow user to show org file title instead of file name in the
clock table. If the file does not have a title defined, the file name
will be shown in the clock table.
TINYCHANGE
* lisp/ol.el (org-store-link):
* lisp/org-agenda.el (org-agenda-get-timestamps)
(org-agenda-get-progress, agenda-bulk-action):
* lisp/org-capture.el (org-capture-fill-template):
* lisp/org-clock.el (org-clock-get-sum-start)
(org-clock-special-range, org-clocktable-shift)
(org-clocktable-steps):
* lisp/org-colview.el (org-colview-construct-allowed-dates):
* lisp/org-datetree.el (org-datetree-find-iso-week-create)
(org-datetree-insert-line):
* lisp/org-element.el (org-element-timestamp-interpreter):
* lisp/org-macro.el (org-macro--vc-modified-time):
* lisp/org-macs.el (org-matcher-time):
* lisp/org.el (org-current-time, org-current-effective-time)
(org-add-planning-info, org-read-date, org-read-date-display)
(org-read-date-analyze, org-eval-in-calendar)
(org-calendar-select, org-display-custom-time)
(org-calendar-select-mouse, org-time-string-to-time)
(org-time-from-absolute, org-at-clock-log-p)
(org-date-from-calendar, org-get-cursor-date)
(org-timestamp-to-time):
* testing/lisp/test-org-clock.el (org-test-clock-create-timestamp):
* lisp/ox-icalendar.el (org-icalendar-convert-timestamp):
Avoid direct calls of `encode-time', use `org-encode-time' instead.
Org supports Emacs-26, but the recommended way to call `encode-time'
changed in Emacs-27. In Emacs-29 DST and TZ elements of the single list
arguments became optional. In Org it is still convenient to call the
function with separate arguments without explicit DST and TZ arguments.
The `org-encode-time' should mitigate attempts to modernize Org code
directly in the Emacs repository.
* lisp/org-clock.el (org-clock-sum)
(org-clock-update-time-maybe):
Prefer org-time-string-to-seconds to doing it by hand.
* lisp/org-macs.el (org-2ft):
Prefer org-time-string-to-seconds to doing it by hand.
* lisp/org-table.el (org-table-eval-formula):
Prefer org-time-string-to-time to doing it by hand.
Max Nikulin:
A larger patch "Improve Org usage of timestamps" was suggested in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54764#10
Only cosmetic changes are selected for this patch.
Org mode supports Emacs 26 or newer:
https://orgmode.org/worg/org-maintenance.html#emacs-compatibility
* lisp/org-compat.el (org-set-transient-map)
(org-font-lock-ensure): Delete compat aliases. Update callers.
(org-define-error): Redefine as obsolete function alias for
`define-error'. Update callers.
(string-suffix-p): Delete compatibility definition.
* lisp/org-fold-core.el (org-fold-core--seq-partition): Delete private
function and update callers to use `seq-partition'.
* lisp/org-macs.el (org-without-partial-completion): Move from here...
* lisp/org-compat.el (org-without-partial-completion): ...to here.
Redefine as obsolete function alias for `progn'.
Emacs now advises using "website" (instead of "homepage") and
consequently to use the "URL" comment header instead of "Homepage".
* README:
* README_ELPA:
* doc/org-guide.org (Creating Footnotes):
* doc/org-manual.org (Creating Footnotes):
* etc/styles/README (URL): Prefer "website" to "homepage".
* lisp/*.el:
* mk/org-fixup.el: Replace the "Homepage" header comment with "URL".