Commit Graph

25055 Commits

Author SHA1 Message Date
Ihor Radchenko cd83606cfd
org-fold: Handle indirect buffer visibility 2022-04-25 19:39:55 +08:00
Ihor Radchenko 77aa9be5ac
Implement overlay- and text-property-based versions of some functions 2022-04-25 19:39:54 +08:00
Ihor Radchenko 67275f4664
Implement link folding
* lisp/ol.el (org-link--link-folding-spec):
(org-link--description-folding-spec): New variables controlling link
folding settings.
(org-link--reveal-maybe): Handle revealing folded links.
(org-link-descriptive-ensure): Implement `org-link-descriptive'
support with org-fold.
(org-toggle-link-display--overlays):
(org-toggle-link-display--text-properties):
(org-toggle-link-display): Provide text-properties and overlays
versions.
* lisp/org-agenda.el (org-agenda-mode): Use org-fold to fold links in
agenda.
* lisp/org.el (org-do-emphasis-faces): Use org-fold.
2022-04-25 19:39:54 +08:00
Ihor Radchenko fa7530c7b4
Rename old function call to use org-fold 2022-04-25 19:39:53 +08:00
Ihor Radchenko d048c153dd
org-string-width: Reimplement to work with new folding
* lisp/org-macs.el (org--string-from-props): Removed since it is no
longer needed.
(org-string-width): Updated to use `window-text-pixel-size'.
2022-04-25 19:39:52 +08:00
Ihor Radchenko bc0caec6eb
org-at-heading-p: Accept optional argument
* lisp/org.el (org-at-heading-p): Use second argument to allow
checking for visible headings.  Note that by default, unlike
`outline-on-heading-p', `org-at-heading-p' returns non-nil for
invisible headings. Passing second argument is just like
`(outline-on-heading-p)'.
(org-indent-line):
* lisp/org-agenda.el (org-agenda-add-entry-to-org-agenda-diary-file):
* lisp/org-colview.el (org-columns--call):
(org-columns-store-format): Update arguments in `org-at-heading-p'
calls.
2022-04-25 19:39:51 +08:00
Ihor Radchenko b7dae51dbb
org-macs: New function org-find-text-property-region 2022-04-25 19:39:51 +08:00
Ihor Radchenko b415111aff
Disable native-comp in agenda
It caused cryptic bugs in the past.
2022-04-25 19:39:50 +08:00
Ihor Radchenko d72ac89c7c
Remove functions from org.el that are now moved elsewhere 2022-04-25 19:39:49 +08:00
Ihor Radchenko ffdc508429
Separate cycling functions from org.el into new library: org-cycle 2022-04-25 19:39:48 +08:00
Ihor Radchenko 91b4c6e6ea
Separate folding functions from org.el into new library: org-fold 2022-04-25 19:39:48 +08:00
Ihor Radchenko 88f86237c5
Add org-fold-core: new folding engine 2022-04-25 19:39:35 +08:00
Kyle Meyer c5395767af Merge branch 'bugfix' 2022-04-24 21:05:03 -04:00
Kyle Meyer d5410433e9 ORG-NEWS: Drop spurious headings added by recent commit
8aff82568 (Revert "org-faces.el: Use fixed-pitch", 2022-04-19) broke
the "New options" section for 9.5 by inserting two headings, both
already covered by 9.5 entries, between the heading and body for the
new org-babel-plantuml-svg-text-to-path option.
2022-04-24 21:03:48 -04:00
Bastien 58eb3e7894 Merge branch 'bugfix' 2022-04-24 11:30:27 +02:00
Bastien 7142392646 etc/ORG-NEWS: Remove outdated entry
This entry is not relevant since commit 8aff82568.
2022-04-24 11:29:53 +02:00
Bastien 1a103afa5e Merge branch 'bugfix' 2022-04-24 11:24:43 +02:00
Bastien 79959c4ee4 etc/ORG-NEWS: Update reference to a mail 2022-04-24 11:23:57 +02:00
Ihor Radchenko 81a2fe4f0b
org-agenda: Use `window-max-chars-per-line' to calculate max text width
* lisp/org-agenda.el (org-agenda-prepare):
(org-todo-list):
(org-agenda-align-tags):
(org-agenda-show-new-time): Calculate the maximum number of chars
fitting into window via `window-max-chars-per-line' instead of
`window-with' or `window-text-with'.  The latter functions can return
larger number when fringes are disabled [1].

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19395

Reported in https://orgmode.org/list/87czhdqi9p.fsf_-_@moondust.localdomain
2022-04-24 14:54:49 +08:00
Ihor Radchenko 96529e933b
org-element-export-snippet-parser: Fix snippets without ending @@
* lisp/org-element.el (org-element-export-snippet-parser): Do not
recognise snippets without closing @@ as empty "@@backend:" snippets.

Example:
@@html:fo aksjdaksjd ajs d

askdjas aksj daj sao@@

Reported in
https://github.com/lucasvreis/org-parser/blob/master/SPEC.org#export-snippets
2022-04-24 13:00:12 +08:00
Ihor Radchenko 67efaa739a
CONTRIBUTE: Link WORG page when explaining commit message format
* CONTRIBUTE (Main contribution rules): Link relevant WORG contribute
page section with extra conventions for our commit message guidelines.

See https://orgmode.org/list/87r16896gh.fsf@red-bean.com
2022-04-23 16:04:55 +08:00
Ihor Radchenko adccb81d54
ob-gnuplot.el: Honour `default-directory'
* lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Do not force
Gnuplot working dir to be `buffer-file-name'.  Trust more configurable
`default-directory'.
2022-04-21 20:00:22 +08:00
Ihor Radchenko 6ea247d79a
org-at-timestamp-p: Fix compatibility with Emacs 26
* lisp/org.el (org-at-timestamp-p): Do not use variables in regexp rx
form.  They are not yet supported in Emacs 26.  Expand them at runtime
instead.
2022-04-21 17:34:06 +08:00
Bastien 81289bddee lisp/ox-latex.el: Add Daniel Fleischer as the maintainer 2022-04-20 08:32:46 +02:00
Bastien bee31004bc Merge branch 'bugfix' 2022-04-19 11:27:03 +02:00
Bastien 69c588947d lisp/org.el: Bump version to 9.5.3 2022-04-19 11:24:07 +02:00
Bastien 8aff825682 Revert "org-faces.el: Use fixed-pitch"
This reverts commit 667cb6f1ae.
2022-04-19 11:23:35 +02:00
Ihor Radchenko bebf0bd42d
Merge branch 'bugfix' 2022-04-18 22:58:10 +08:00
Ihor Radchenko 1f617727f1
org-at-timestamp-p: Fix invalid regexp groups for 'agenda scope
* lisp/org.el (org-at-timestamp-p): Make sure that match groups follow
the docstring in `agenda' scope.  Update docstring explaining return
values for sexp timestamps.

Reported in https://orgmode.org/list/CAKJdtO8bqdbW5N6pRFNQRATjm2daEBDCpJj0njwcd4fmhSJSKQ@mail.gmail.com
2022-04-18 22:54:28 +08:00
Kyle Meyer 0ea476ad75 Merge branch 'bugfix' 2022-04-17 15:27:33 -04:00
Kyle Meyer 682ccdfffe org.el: Silence byte-compiler under 'make single' 2022-04-17 15:22:27 -04:00
Ihor Radchenko 685d78f63c
Merge branch 'bugfix' 2022-04-16 18:05:16 +08:00
Ihor Radchenko fa5c832e9b
org-cite-basic--key-completion-table: Reuse bibliography for speed
* lisp/oc-basic.el (org-cite-basic--key-completion-table): Supply the
pre-calculated bibliography entries when getting entry fields.  This
avoids excessive file change checks inside
`org-cite-basic--parse-bibliography'.
2022-04-16 18:04:02 +08:00
Ihor Radchenko 7ddc5b57c0
oc-basic: Speed up cached bibliography retrival
* lisp/oc-basic.el (org-cite-basic--file-id-cache): New variable
storing hash of bibliography file contents.
(org-cite-basic--parse-bibliography): Skip buffer hash calculation
when bibliography file is unchanged on disk.  Calculating buffer hash
on every call is slow when bibliography file is large.

* lisp/org-compat.el:
(org-file-has-changed-p--hash-table, org-file-has-changed-p): Define
`file-has-changed-p' from Emacs 29 if necessary.

See https://list.orgmode.org/LO2P265MB1758E12E04832DC712F5A8E9DC149@LO2P265MB1758.GBRP265.PROD.OUTLOOK.COM/T/#t
2022-04-16 18:04:02 +08:00
Cody Harris a0755ebccf
doc/org-manual.org: Fix a typo in the manual
Also automatically fix up a few lines of indentation that had mixed
tabs and spaces.

TINYCHANGE
2022-04-15 17:09:04 +08:00
Bastien f6813dbea9 lisp/org.el: Don't use lexical scope for diary related evals
* lisp/org.el (org-diary-sexp-entry): Don't use lexical scope for eval
sexps.

This commit partially reverts 6d73cd34a.

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
2022-04-07 14:51:26 +02:00
Karl Fogel d80aa2776c
lisp/org-macs.el: Fix spelling of `org-truly-invisible-p'
* lisp/org-macs.el (org-truly-invisible-p): Fix spelling of name.
* lisp/org-compat.el (org-truely-invisible-p): Add compatibility
  alias for the old name.
2022-04-07 12:43:36 +08:00
TEC cbe3f2d697
org-src: add toml and desktop lang aliases
* lisp/org-src.el (org-src-lang-modes): It is reasonable to assume that
src blocks with the "toml" and "desktop" lang should use
`conf-toml-mode' and `conf-desktop-mode', respectively.
2022-04-03 01:01:04 +08:00
Stefan Monnier 6d73cd34a0 Replace all uses of the old `defadvice` with the new `advice-add`
* lisp/org.el (org-run-like-in-org-mode): Strength reduce `eval`
to `cl-progv`.
(org--check-org-structure-template-alist): Strength reduce `eval`
to `symbol-value`.
(org-map-entries, org-eval-in-calendar, org-diary-sexp-entry):
Make sure we use the new lexically scoped dialect.
(org--math-always-on): New function, extracted from advice.
(org-cdlatex-mode): Use it with `advice-add`.
(org-self-insert-command): Simplify `and`+`listp` into `consp`.
(org-submit-bug-report):
Make sure we use the new lexically scoped dialect.

* lisp/org-protocol.el (org-protocol-convert-query-to-plist):
Use `cl-mapcan`.
(org--protocol-detect-protocol-server): New function, extracted
from advice.
(server-visit-files): Use it with `advice-add`.

* lisp/org-mouse.el (org--mouse-dnd-insert-text): New function, extracted
from advice.
(dnd-insert-text): Use it with `advice-add`.
(org--mouse-dnd-open-file): New function, extracted from advice.
(dnd-open-file): Use it with `advice-add`.
(org--mouse-open-at-point): New function, extracted from advice.
(org-mode-hook): Advise `org-open-at-point` with `advice-add`.

* lisp/org-ctags.el (org--ctags-load-tag-list): New function, extracted
from advice.
(visit-tags-table): Use it with `advice-add`.
(org--ctags-set-org-mark-before-finding-tag): New function, extracted
from advice.
(xref-find-definitions): Use it with `advice-add`.

* lisp/org-compat.el (org-bookmark-jump-unhide): Accept (unused) args.
(save-place-find-file-hook): Use `advice-add`.
(org--ecb-show-context): New function, extracted from advice.
(ecb-method-clicked): Use it with `advice-add`.
(org-mark-jump-unhide): Accept (unused) args.
(pop-to-mark-command, exchange-point-and-mark, pop-global-mark):
Use `advice-add`.

Along the way, remove some redundant `:group` args
(redundant because they specify the same group as would be used by
default anyway) and make a few other simplifications.
Also don't bother putting `advice-add` within an eval-after-load
since the advice machinery already takes care of handling it.
2022-04-01 07:50:01 +02:00
Bastien d7cae14953 Merge branch 'bugfix' 2022-03-31 17:47:54 +02:00
Bastien 64ee5c2c47 lisp/org-table.el: Fix bug in `org-table-row-get-visible-string'
* lisp/org-table.el (org-table-row-get-visible-string): Don't use
`backward-char' in a function called in a post-command hook.
2022-03-31 17:31:50 +02:00
Bastien 971eb6885e Merge branch 'bugfix' 2022-03-28 14:35:53 +02:00
Bastien 1354e872a7 lisp/ox-html.el: Fix `org-html-style-default'
* lisp/ox-html.el (org-html-style-default): Remove faulty .org-svg css
class specifications.

Reported-by: Yuchen Guo <Guoyuc@students.uni-marburg.de>
2022-03-28 14:34:11 +02:00
Bastien db53a3bad9 Merge branch 'bugfix' 2022-03-28 14:30:39 +02:00
Bastien c70ca5e24e doc/org-manual.org: Fix typo
* doc/org-manual.org (Repeated tasks): Fix typo.

Reported-by: Johnson <j3soon@gapp.nthu.edu.tw>
2022-03-28 14:29:33 +02:00
Bastien 1bdacbe729 Merge branch 'bugfix' 2022-03-28 14:26:44 +02:00
Nick Dokos 7caae6c088 Fix typo in doc string
* lisp/org-agenda.el (org-todo-list): Fix typo in doc string.
2022-03-28 14:26:26 +02:00
Bastien e1fc3b4bc8 README: Use plain-text URLs
This fixes URLs display when reading README from M-x list-package RET.
2022-03-28 12:03:03 +02:00
Bastien b944fecdfc doc/org-manual.org: Minor rewording
* doc/org-manual.org (Summary): Minor rewording.

Relying on http://atomized.org/blog/2018/09/19/what-even-is-org-mode/
as a source of inspiration.
2022-03-28 12:01:53 +02:00
Ihor Radchenko 6304afcaa4
Merge branch 'bugfix' 2022-03-26 15:20:22 +08:00