1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-21 06:55:35 +00:00
Commit Graph

2120 Commits

Author SHA1 Message Date
Ihor Radchenko
433fbdbc63
org-agenda-write: Remove redundant `set-buffer'
* lisp/org-agenda.el (org-agenda-write): Drop `set-buffer' call at the
end.  It does nothing since the rest of the code is wrapped in
`save-excursion' and the aim of the `set-buffer' is to switch to the
agenda buffer we just saved.  Ignore AGENDA-BUFNAME argument - it is
unused now.  Update the docstring, removing the mention of what
appears to be the now-ignored argument.
(org--batch-store-agenda-views): Update the caller.  Passing current
agenda buffer name is no longer necessary.  We set it before the call
anyway.

Reported-by: Sławomir Grochowski <slawomir.grochowski@gmail.com>
Link: https://orgmode.org/list/87ed7dwygq.fsf@gmail.com
2024-07-28 20:49:25 +02:00
Ihor Radchenko
d3d84ff6b9
Merge branch 'bugfix' 2024-07-25 13:22:41 +02:00
Stefan Kangas
a97ea4f0b5 Backport commit a6cab228d from Emacs
; Fix typos
a6cab228d4d1a82a80eac81b057857a230eef0b5
Stefan Kangas
Thu Jul 18 11:46:50 2024 +0200
2024-07-20 15:24:27 -04:00
Ihor Radchenko
f398724bd5
Merge branch 'bugfix' 2024-07-17 16:11:14 +02:00
Kyle Meyer
f308d33d2f Merge branch 'km/from-emacs-30' into bugfix 2024-07-14 12:21:33 -04:00
Stefan Kangas
e14969f629 Backport commit 6757f8e67 from Emacs
* lisp/ob-core.el:
* lisp/ob-exp.el:
* lisp/ob-lob.el:
* lisp/ob-plantuml.el (org-babel-execute:plantuml):
* lisp/ob-python.el (org-babel-python--command)
(org-babel-python-initiate-session-by-key)
(org-babel-python-initiate-session):
* lisp/ob-scheme.el (org-babel-scheme-make-session-name):
* lisp/ob-tangle.el (org-babel-find-file-noselect-refresh)
(org-babel-interpret-file-mode):
* lisp/ob.el:
* lisp/org-agenda.el (org-agenda-mouse-1-follows-link)
(org-agenda-start-with-archives-mode)
(org-agenda-previous-line):
* lisp/org-clock.el (org-clock-save, org-clock-load):
* lisp/org-element-ast.el (org-element-type-p):
* lisp/org-faces.el (org-cycle-level-faces):
* lisp/org-fold-core.el (org-fold-core--isearch-overlays):
* lisp/org-fold.el (org-fold--extend-changed-region):
* lisp/org-goto.el:
* lisp/org-habit.el (org-habit-show-all-today):
* lisp/org-inlinetask.el (org-inlinetask-in-task-p):
* lisp/org-macs.el (org-current-text-column):
* lisp/org-mobile.el (org-mobile-check-setup):
* lisp/org-mouse.el (org-mouse-bolp):
* lisp/org-refile.el (org-refile):
* lisp/org-src.el (org-src-do-key-sequence-at-code-block):
* lisp/org-table.el (orgtbl-after-send-table-hook)
(orgtbl-self-insert-command, orgtbl-to-orgtbl):
* lisp/org.el (org-read-date-popup-calendar, org-finish-function)
(org-occur-parameters, org-self-insert-command, org-ctrl-c-ctrl-c-hook)
(org-ctrl-c-ctrl-c-final-hook, org-submit-bug-report)
(org--single-lines-list-is-paragraph):
* lisp/ox-icalendar.el (org-icalendar--vtodo):
* lisp/ox-latex.el (org-latex-generate-engraved-preamble):
(org-latex-src--engrave-code):
* lisp/ox-publish.el (org-publish-project-alist):
* lisp/ox.el (org-export-data): Various checkdoc fixes.

Checkdoc fixes in Org Mode
6757f8e67d3bdfe338810fc26408a62e7839afe7
Stefan Kangas
Sun Jul 7 17:46:25 2024 +0200
2024-07-14 12:20:46 -04:00
Ihor Radchenko
bcb88fcac8
Merge branch 'bugfix' 2024-07-07 08:26:23 +02:00
Ihor Radchenko
db46706bec
org-agenda-category-icon-alist: Improve docstirng
* lisp/org-agenda.el (org-agenda-category-icon-alist): Refer to
`org-agenda-prefix-format' in the docstring, as it is what controls
whether the icons are rendered at all.
2024-07-07 08:25:33 +02:00
Ihor Radchenko
dc2f270ac4
org-agenda: Fix multi-day ranges with non-nil `org-agenda-default-appointment-duration'
* lisp/org-agenda.el (org-agenda-get-blocks): Force
`org-agenda-default-appointment-duration' to be nil for time blocks -
they already have begin/end time, even if during different days.
* testing/examples/agenda-file2.org (five):
* testing/lisp/test-org-agenda.el (test-org-agenda/time-grid): New
test.

Reported-by: hrdl <git@hrdl.eu>
Link: https://orgmode.org/list/ZldNYYtvvQp0dILB@t490.localdomain
2024-06-09 14:25:58 +02:00
Ihor Radchenko
654a68dc51
org-agenda-format-item: Refactor, adding readable variable names
* lisp/org-agenda.el (org-agenda-format-item): Rename internal
variables to clarify their meaning.
2024-06-05 13:51:43 +02:00
Ihor Radchenko
9f6dbd8d2e
org-agenda-get-blocks: Refactor, adding readable variable names
* lisp/org-agenda.el (org-agenda-get-blocks): Add comments.  Rename
internal variables to clarify their meaning.
2024-06-04 14:53:26 +02:00
Kyle Meyer
377addb5b2 Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
Tim Landscheidt
d12f8b8624 Backport commit 6d1c1fca0 from Emacs
* lisp/ob-calc.el: (org-babel-execute:calc):
* lisp/org-agenda.el (org-agenda-use-sticky-p):
Replace (with-current-buffer (get-buffer ...) ...) with
(with-current-buffer ...).

; Simplify (with-current-buffer (get-buffer ...) ...)
6d1c1fca0aa7c5a1ff0254af3f89a34d5309ea0d
Tim Landscheidt
Thu Mar 14 12:40:26 2024 +0200
2024-05-28 22:58:43 -04:00
Stefan Kangas
7564dfd968 Backport commit 0f3be9596 from Emacs
; Prefer finder keyword "text" to deprecated keyword "wp"
0f3be9596fb3cf2f5e8f10fe2b3ef59546de98bb
Stefan Kangas
Sat Dec 30 18:14:40 2023 +0100
2024-05-28 22:58:43 -04:00
Kyle Meyer
464d668ead Clean up spacing to pass Emacs's pre-commit check
Avoid trailing spaces and spaces before tabs.
2024-05-27 21:18:59 -04:00
Ihor Radchenko
41c2e7af10
Add missing :package-version keywords to new and changed `defcustom'
* lisp/ob-comint.el (org-babel-comint-fallback-regexp-threshold):
* lisp/ob-exp.el (org-babel-exp-code-template):
(org-babel-exp-inline-code-template):
* lisp/org-agenda.el (org-agenda-skip-scheduled-if-deadline-is-shown):
(org-agenda-sorting-strategy):
* lisp/org-attach.el (org-attach-store-link-p):
* lisp/org-capture.el (org-capture-templates):
* lisp/org-fold-core.el (org-fold-core-style):
* lisp/org-footnote.el (org-footnote-auto-label):
* lisp/org.el (org-latex-to-mathml-convert-command):
(org-latex-to-html-convert-command):
(org-latex-default-packages-alist):
(org-display-remote-inline-images):
* lisp/ox-beamer.el (org-beamer-environments-extra):
* lisp/ox-latex.el (org-latex-known-warnings):
2024-05-21 13:15:12 +02:00
Ihor Radchenko
102f0a24c9
Do no assume that todo keywords are full words
* lisp/org-agenda.el (org-agenda):
(org-agenda-list-stuck-projects):
* lisp/org-clock.el (org-clock-in):
(org-clock-out):
* lisp/org.el (org-show-todo-tree): Do not enforce that word boundary
always matches after todo keyword \>.  Instead use a more accurate
match - space or eol.  Also, regexp-quote the todo keywords when
searching them.

Reported-by: Kepa <gnu.cognition199@slmails.com>
Link: https://orgmode.org/list/171620796695.7.14337986338068154257.334928503@slmails.com
2024-05-21 11:40:36 +02:00
Ihor Radchenko
bc51dfcb74
org-agenda-kill: Fix deleting wrong entry when Org buffer is narrowed
* lisp/org-agenda.el (org-agenda-kill): Use `org-with-point-at' to
jump to origin Org buffer from agenda.  It automatically widens the
buffer.
(org-remove-subtree-entries-from-agenda): Temporarily lift narrowing
when calculating the list of headings to clean up from the agenda.

Link: https://old.reddit.com/r/emacs/comments/1cog1fb/agenda_kills_wrong_item_in_orgmode_when_buffer_is/
2024-05-11 19:32:50 +03:00
Ihor Radchenko
db5478108c
org-agenda-tree-to-indirect-buffer: Obey `org-indirect-buffer-display'
* lisp/org-macs.el (org-display-buffer-in-window): New helper function
to display buffer in specific window (when it is live).
* lisp/org.el (org-tree-to-indirect-buffer): By default, reuse the
window previously used for an existing indirect buffer, if it is in
the same frame.
* lisp/org-agenda.el (org-agenda-do-tree-to-indirect-buffer): Remove.
(org-agenda-tree-to-indirect-buffer): Merge with
`org-agenda-do-tree-to-indirect-buffer' and remove special handling of
the existing indirect buffer window that overrides
`org-indirect-buffer-display'.
(org-agenda-do-context-action): Force `org-indirect-buffer-display' to
be 'other-window when displaying subtree at point in
org-agenda-follow-mode.

This patch reverts 35d6d9f50, implementing an alternative fix for
stabilizing indirect buffer window selection.  Unlike the existing
fix, it utilizes display buffer action and does not cause clashes with
custom `org-indirect-buffer-display'.

Reported-by: JV <misc@jeffvalk.com>
Link: https://orgmode.org/list/1a4c7a04-8536-40c7-899e-ba433a1252fd@jeffvalk.com
2024-05-11 16:19:52 +03:00
Ihor Radchenko
4131926984
org: New Org-wide custom option `org-sort-function'
* lisp/org-macs.el (org-sort-function): New customization defining how
Org mode should sort headlines, table lines, agenda lines, etc.
(org-string<):
(org-string<=):
(org-string>=):
(org-string>): Use the new customization.
(org-string<>): Add docstring.
(org-sort-function-fallback): New helper function to help users on
MacOS where `string-collate-lessp' is not reliable.
* lisp/oc-basic.el (org-cite-basic--field-less-p):
* lisp/org-agenda.el (org-cmp-category):
(org-cmp-alpha):
* lisp/org-list.el (org-sort-list):
* lisp/org-mouse.el (org-mouse-list-options-menu):
* lisp/org-table.el (org-table-sort-lines):
* lisp/org.el (org-tags-sort-function):
(org-sort-entries):
* lisp/ox-publish.el (org-publish-sitemap): Honor the new
customization.
* lisp/org-mouse.el (org-mouse-tag-menu):
(org-mouse-popup-global-menu):
* lisp/org-agenda.el (org-cmp-tag): Honor `org-tags-sort-function' and
falling back to `org-string<' if note set.
* etc/ORG-NEWS (New option controlling how Org mode sorts things
~org-sort-function~): Announce the change.

This change aims to standardize the way Org mode performs sorting of
user data.  In particular, it addresses issues with oddities of string
collation rules on MacOS and tricky language environments like
Turkish.

Link: https://orgmode.org/list/87jzleptcs.fsf@localhost
2024-05-11 12:34:30 +03:00
Ihor Radchenko
c8bd2092b1
org-agenda-mode: Honor hidden link descriptions
* lisp/org-agenda.el (org-agenda-mode): Hide 'org-link invisibility
spec, as in Org mode.

Reported-by: Bastien <bzg@gnu.org>
Link: https://orgmode.org/list/87seyww65g.fsf@gnu.org
2024-05-05 20:27:13 +03:00
Ihor Radchenko
5da0eb6ea7
org-element-timestamp-parser: Allow time in diary sexp timestamps
* lisp/org-agenda.el (org-agenda-get-timestamps):
* lisp/org-element.el (org-element--timestamp-regexp): Adjust
timestamp regexp.
(org-element-timestamp-parser): Support the new syntax for diary sexp
timestamps.  The diary sexp is now stored in :diary-sexp property and
the time/time range is stored as usual.
(org-element-timestamp-interpreter): Interpret diary timestamp
according to its building blocks rather than raw value.
* testing/lisp/test-org-agenda.el (test-org-agenda/diary-timestamp):
New test checking for agenda support of times in diary timestamps.
*
testing/lisp/test-org-element.el (test-org-element/timestamp-interpreter):
Add parser tests.
* doc/org-manual.org (Timestamps): Add an example of the new syntax to
the manual.
* etc/ORG-NEWS (Diary type timestamps now support optional
time/timerange): Document the Org syntax addition.

This syntax modification is fixing an omission in org-element.el.  In
the past, org-agenda had explicit support for diary timestamps with
time/timerange, but that support was ad-hoc.  Now, after org-agenda
switched to use parser, we must modify Org syntax to fix the feature
regression.
2024-05-03 13:42:06 +03:00
Ihor Radchenko
a2e5685e49
Do not use org-fold to hide link parts
* lisp/ol.el (org-link--link-folding-spec):
(org-link--description-folding-spec):
(org-link-descriptive-ensure): Remove.
(org-toggle-link-display): Rely upon font-lock to update link display.
* lisp/org-agenda.el (org-agenda-mode): Remove no-longer-necessary
org-fold initializer.
* lisp/org-fold.el (org-fold-initialize): Remove link-related fold
types.
(org-fold-show-set-visibility):
* lisp/org-src.el (org-src-font-lock-fontify-block):
* lisp/org.el (org-do-emphasis-faces):
(org-unfontify-region): Remove special handling of link folds.
* lisp/org.el (org-mode): Remove folding setup for links.
(org-activate-links--text-properties): Remove.
(org-activate-links): Honor `org-link-descriptive' dynamically.

This change reflects de-facto situation where we cannot use folding
system to hide links reliably.  Even though we promise in Org 9.6 that
hidden parts of the link can be searched, the way it can be
implemented is not reliable and is working around upstream mechanisms.
Upstream changes are necessary to properly support isearch in text
hidden using text properties; workarounds attempted in org-fold-core
do not cut it because too many built-in Emacs libraries and also
third-party libraries rely upon internal implementation details of
isearch (due to limitations of its API).
2024-05-02 12:29:27 +03:00
Ihor Radchenko
dba92f72d3
Merge branch 'bugfix' 2024-04-22 16:44:27 +03:00
Ihor Radchenko
0db82ee8f8
org-agenda-manipulate-query: Fix repeated canceled calls
* lisp/org-agenda.el (org-agenda-manipulate-query): When called
multiple times, discarding edits, prevent accumulating trailing + + +
- +{} in the query string.

Reported-by: Carlos Pita <carlosjosepita2@gmail.com>
Link: https://orgmode.org/list/87r1be97xd.fsf@localhost
2024-04-22 16:42:08 +03:00
Ihor Radchenko
78e9dd0c42
Fix when user customization makes Org dialogues pop up in new frames
* lisp/ol.el (org-insert-link):
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
* lisp/org-attach.el (org-attach):
* lisp/org-clock.el (org-clock-select-task):
* lisp/org-goto.el (org-goto-location):
* lisp/org-macs.el (org-mks):
* lisp/org-table.el (org-table-fedit-finish):
* lisp/org.el (org-offer-links-in-entry):
* lisp/ox.el (org-export-dispatch): Arrange the dialogue window to be
killed when it is displayed in a new frame.
`save-window-configuration' is not enough in such scenarios.  Use
`quit-window' instead.
* lisp/org-table.el (org-table-edit-formulas): Prohibit popping up
table editor in a new frame.  This is because the major mode for
formula editing makes assumptions about where the editor window is
located and does not work reliably in a separate frame.

Reported-by: Björn Bidar <bjorn.bidar@thaodan.de>
Link: https://orgmode.org/list/87jzlcoxuq.fsf@
2024-04-10 15:42:52 +03:00
Ihor Radchenko
be80f4319f
fixup! Honor `display-buffer-alist' when creating dialogues
Fix Emacs <29 compatibility.
2024-04-07 16:02:35 +03:00
Ihor Radchenko
18fbb9985f
Honor `display-buffer-alist' when creating dialogues
* lisp/org-macs.el (org-display-buffer-split): New function to display
just the new buffer and current buffer visible in the frame.  To be
used as `display-buffer' ACTION parameter.
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
(org-agenda-fit-window-to-buffer):
(org-agenda-prepare-window):
(org-agenda-switch-to):
* lisp/org-capture.el (org-capture-place-template):
* lisp/org-goto.el (org-goto-location):
* lisp/org-src.el (org-src-switch-to-buffer):
* lisp/org.el (org-tree-to-indirect-buffer):
(org-fast-todo-selection):
(org-add-log-note):
(org-fast-tag-selection):
(org-submit-bug-report):
* lisp/ox.el (org-export--dispatch-ui): Get rid of calling
`delete-other-windows' manually.  Instead, make use of
`org-display-buffer-slip' + `pop-to-buffer'/`display-buffer'.  This
way, user overrides in `display-buffer-alist' are honored.
* lisp/org-plot.el (org-plot/gnuplot):
* lisp/org.el (org-offer-links-in-entry): When `delete-other-windows'
cannot be avoided, make it ignore errors in the frames where
displaying a lone window is forbidden.
2024-04-07 13:34:13 +03:00
Ihor Radchenko
5fa0f0c6fe
Support completion boundaries when completing olp, tags, and agenda filter
* lisp/org-agenda.el (org-agenda-filter-completion-function):
* lisp/org-refile.el (org-olpath-completing-read):
* lisp/org-tags.el (org-tags-completion-function): Add support for
orderless/flex completion styles that require boundaries operation.
2024-03-22 13:50:45 +03:00
Ihor Radchenko
1b99cccbe9
Merge branch 'bugfix' 2024-03-21 15:56:36 +03:00
Ihor Radchenko
5dbf930c2d
org-agenda-clock-cancel: Unmark clocking tasks in the agenda buffer
* lisp/org-agenda.el (org-agenda-clock-cancel): When canceling clock,
remove clocking overlays from current agenda buffer.
2024-03-21 15:55:21 +03:00
Anand Deopurkar
8ac99c33f0
org-agenda.el: Fix org-agenda-write to avoid duplicates
* lisp/org-agenda.el (org-agenda-write): Make sure headlines are not
duplicated when writing to an `org' file, even if they are repeated in
the agenda view.

For example, a headline may appear multiple times in the agenda
view (for example, if it has multiple time stamps).  But
org-agenda-write should write it only once to the output `org' file.

TINYCHANGE
2024-03-03 16:44:54 +03:00
Tim Ruffing
356072c1d6
org-agenda: Make sure skipping warning/delay days never increases their number
* lisp/org-agenda.el (org-agenda-get-deadlines, org-agenda-get-scheduled):
Use minimum of warning/delay days specified in timestamp cookie and the
limit specified by `org-agenda-skip-deadline-prewarning-if-scheduled' or
`org-agenda-skip-scheduled-delay-if-deadline`, respectively.
* testing/lisp/test-org-agenda.el (test-org-agenda/skip-deadline-prewarning-if-scheduled):
New test.

Link: https://orgmode.org/list/59e48dfe744dc9409ff47183255bc64e92d26d88.camel@timruffing.de

TINYCHANGE
2024-02-27 15:40:18 +03:00
Ihor Radchenko
fef873b1cf
org-agenda-get-restriction-and-command: Do not leave window around
* lisp/org-agenda.el (org-agenda-get-restriction-and-command): When
agenda selection is aborted or completed by any means, quit agenda
command selection window.

Reported-by: Björn Bidar <bjorn.bidar@thaodan.de>
Link: https://list.orgmode.org/orgmode/87il2ai916.fsf@/
2024-02-27 12:18:34 +03:00
Ihor Radchenko
19db45f2cc
org-agenda-filter-by-category: Fix using truncated category as a filter
* lisp/org-agenda.el (org-agenda-format-item): Do not store truncated
category in 'org-category property when `org-agenda-prefix-format'
causes truncation.  This leads to agenda filters assuming truncated
version of the category as the true value, which is incorrect.

Reported-by: John Mathena <jmmathena@gmail.com>
Link: https://orgmode.org/list/CADywB5Lonxw-t1H7cvK+Au3oWq=EsB=Bthj13pt03MRP-Fn-4w@mail.gmail.com
2024-02-24 12:33:27 +03:00
Ihor Radchenko
62956196d0
org-agenda: Fix entries with timestamps without day name
* lisp/org-agenda.el (org-agenda-get-timestamps):
(org-agenda-get-progress): When matching specific date in timestamp,
do not demand that timestamp to contain day name.

Reported-by: Stephen J. Eglen <sje30@cam.ac.uk>
Link: https://orgmode.org/list/874jejrij6.fsf@localhost
2024-02-08 16:01:29 +01:00
Ihor Radchenko
b26745b985
org-agenda: Fix meaning of 'repeated-after-deadline value of `org-agenda-skip-scheduled-if-deadline-is-shown'
* lisp/org-agenda.el (org-agenda-skip-scheduled-if-deadline-is-shown):
Move 'repeated-after-deadline value into a new custom option.
(org-agenda-skip-scheduled-repeats-after-deadline): Create a new
custom option to make agenda hide scheduled entries repeated past
deadline.
* lisp/org-agenda.el (org-agenda-get-scheduled): Use the new custom
option.  Do not demand deadline to be actually shown when deciding
whether to skip scheduled repeats past deadline.  This fixes a bug
when repeats continue to be displayed if past deadline is not
displayed within agenda span.
* doc/org-manual.org (Repeated tasks): Adjust manual entry, mentioning
the new custom option.
* etc/ORG-NEWS (~repeated-after-deadline~ value of
~org-agenda-skip-scheduled-repeats-after-deadline~ is moved to a new
customization): Announce the change.
*
testing/lisp/test-org-agenda.el (test-org-agenda/skip-scheduled-repeats-after-deadline):
Add new test.

Reported-by: Morgan Smith <Morgan.J.Smith@outlook.com>
Link: https://orgmode.org/list/874jft6vpj.fsf@localhost
2024-02-07 13:21:34 +01:00
Andrew Hyatt
f490c1548a
org-agenda: New customization `org-agenda-start-with-archives-mode'
* lisp/org-agenda.el: Add `org-agenda-start-with-archives-mode'.
(org-agenda-mode): Set value of `org-agenda-archive-mode' according to
value of new variable `org-agenda-start-with-archives-mode'.

* doc/org-manual.org: Note new variable in the documentation of
`org-agenda-archives-mode'.

* etc/ORG-NEWS: Note change to add
`org-agenda-start-with-archives-mode'.
2024-01-29 17:56:42 +01:00
Ihor Radchenko
78dc58508d
Obsolete org-switch-to-buffer-other-window and org-no-popups
* lisp/org-compat.el (org-switch-to-buffer-other-window):
(org-no-popups): Move from org-macs.el and mark obsolete.
* lisp/ob-lilypond.el (org-babel-lilypond-execute-tangled-ly):
(org-babel-lilypond-mark-error-line):
* lisp/ol.el (org-insert-link):
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
(org-agenda-prepare-window):
(org-agenda-goto):
(org-agenda-open-link):
(org-agenda-clock-goto):
(org-agenda-diary-entry-in-org-file):
(org-agenda-add-entry-to-org-agenda-diary-file):
(org-agenda-show-the-flagging-note):
* lisp/org-attach.el (org-attach):
* lisp/org-capture.el (org-capture-place-template):
(org-capture-fill-template):
* lisp/org-clock.el (org-clock-select-task):
* lisp/org-macs.el (org-mks):
* lisp/org-src.el (org-src-switch-to-buffer):
* lisp/org-table.el (org-table-edit-field):
(org-table-edit-formulas):
(org-table-show-reference):
* lisp/org.el (org-fast-todo-selection):
(org-add-log-note):
(org-fast-tag-selection):
* lisp/ox.el (org-export-stack-view):
(org-export--dispatch-ui): Use `switch-to-buffer-other-window'.
* etc/ORG-NEWS (Org mode no longer disallows configuring
~display-buffer-alist~ to open Org popups in other frame): Document
the breaking change.

Reported-by: Jan Seeger
Link: https://orgmode.org/list/87pmr3mfq3.fsf@localhost
2024-01-24 15:00:26 +01:00
Ihor Radchenko
a19a72f7d3
org-agenda: Fix grid lines when `org-agenda-default-appointment-duration' is non-nil
* lisp/org-agenda.el (org-agenda-add-time-grid-maybe): Let-bind
`org-agenda-default-appointment-duration' to nil when formatting the
grid lines.  Otherwise, `org-agenda-format-item' logic fails to
produce the expected result.
* testing/lisp/test-org-agenda.el (test-org-agenda/time-grid): Add new
test set covering the bug and several simpler cases.
* testing/examples/agenda-file2.org (two): New test file example.

Reported-by: Detlef Steuer <steuer@hsu-hh.de>
Link: https://orgmode.org/list/87edv5fv1w.fsf@localhost
2024-01-17 15:40:24 +01:00
Ihor Radchenko
6592c766d2
org-agenda-bulk-mark: Fix mark not being visible when column view is active
* lisp/org-agenda.el (org-agenda-bulk-mark): Use 'before-string in the
mark overlay to make sure that higher-priority Org agenda columns
overlay is not making the mark completely invisible.

Link: https://old.reddit.com/r/orgmode/comments/13jbjep/is_it_possible_to_show_a_selection_mark_in/
2024-01-11 14:12:32 +01:00
Ihor Radchenko
f22be2878f
org-agenda: Fix hard-coded day lengths when calculating timestamp regexp
* lisp/org-agenda.el (org-agenda-get-timestamps):
(org-agenda-get-progress): Do not assume that all the timestamps have
length of exactly 12 (English).  Use options argument for
`org-time-stamp-format' instead to drop brackets from the timestamp.
2024-01-10 16:07:11 +01:00
Ihor Radchenko
d0a917ab23
org-agenda-get-progress: Fix detecting time when todo keyword contains ]
* lisp/org-agenda.el (org-agenda-get-progress): Improve accuracy
matching time inside state note.

The old code failed to match time in
- State "[X]"        from "[ ]"        [2022-10-25 Tue 10:00]

Link: https://old.reddit.com/r/orgmode/comments/ycshlg/orgagendalogmode_does_not_display_time_for/
2024-01-10 16:07:06 +01:00
Kyle Meyer
72a2db86d9 Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
Po Lu
9f1d6dfd73 Backport commit 8e1c56ae4 from Emacs
; Add 2024 to copyright years
8e1c56ae46754dd7baedff49a464f078f0e9912d
Po Lu
Tue Jan 2 09:47:10 2024 +0800
2024-01-06 15:48:23 -05:00
Ihor Radchenko
fa198cbbe4
org-agenda-search-headline-for-time: Ignore all the timestamps in headings
* lisp/org-agenda.el (org-agenda-format-item): When
`org-agenda-search-headline-for-time' is non-nil, exclude timestamps
in headings from searching the time.
(org-agenda-search-headline-for-time): Remove warning about timestamps
in headings from the docstring.
* etc/ORG-NEWS (~org-agenda-search-headline-for-time~ now ignores all
the timestamp in headings): Announce the change.

Reported-by: rameiko87@posteo.net
Link: https://orgmode.org/list/dc5c0aa3748f5d7ad8b79bea674266e7@posteo.net
2024-01-06 13:29:43 +01:00
Nafiz Islam
a27a1b87b5
lisp/org-agenda.el (org-todo-list): Rename variables and format
* lisp/org/org-agenda.el
(org-todo-list): Use `org-today' directly for `calendar-gregorian-from-absolute'.
(org-todo-list): Replace `date' with `today' (`date' is no longer used).
(org-todo-list): Replace `kwds' with `todo-keywords'.
(org-todo-list): Replace `rtn' with `todo-entries'.
(org-todo-list): Replace `rtnall' with `all-todo-entries'.
(org-todo-list): Replace some `and' with `when' and `cond'.
(org-todo-list): Some whitespace changes.

TINYCHANGE
2024-01-04 16:00:07 +01:00
Morgan Smith
11e16e5f9e
lisp/org-agenda.el: Check agenda type earlier
lisp/org-agenda.el (org-agenda-goto-date): Check agenda type earlier.
Also remove redundant error.

When this function is run on a todo agenda the user is given the
undescriptive error "(wrong-type-argument listp "todo")" because we
attempt to parse the 'org-last-args text-property prematurely.  With
this change users will get the much better error "Not allowed in
'todo'-type agenda buffer or component".
2023-12-24 12:11:16 +01:00
Ihor Radchenko
7505055f58
org-agenda-to-appt: Do not hard-code not-done todo keywords
* lisp/org-agenda.el (org-agenda-to-appt): Use org-todo-regexp and
org-not-done-regexp to determine whether an even is already done.

Reported-by: Raffael Stocker <r.stocker@mnet-mail.de>
Link: https://orgmode.org/list/yplmsf4ac6va.fsf@mnet-mail.de
2023-12-12 12:55:11 +01:00
Ihor Radchenko
a1fa521975
org-agenda-format-item: Do not call `org-get-outline-path' in non-Org buffer
* lisp/org-agenda.el (org-agenda-format-item): Avoid invoking Org
parser when we are not actually in Org buffer.  Add commentary
explaining when it can happen.

Reported-by: Will O'Brien <will.08rien@gmail.com>
Link: https://orgmode.org/list/m2leawo9zo.fsf@hazy.com
2023-11-17 15:04:28 +02:00