Commit graph

277 commits

Author SHA1 Message Date
Henrik Lissner
f0ad161643
fix(org): list checkbox toggle on RET
A subtle change in the way org-toggle-checkbox handles its prefix
argument changed how RET (+org/dwim-at-point) handled list
checkboxes (incorrectlying swapping [ ] with [-], but not back, unless
the cursor was directly on top of the checkbox).
2024-02-17 07:13:39 -05:00
Henrik Lissner
659f7bfc71
refactor!: deprecate IS-* OS constants
BREAKING CHANGE: This deprecates the IS-(MAC|WINDOWS|LINUX|BSD) family
of global constants in favor of a native `featurep` check:

  IS-MAC      ->  (featurep :system 'macos)
  IS-WINDOWS  ->  (featurep :system 'windows)
  IS-LINUX    ->  (featurep :system 'linux)
  IS-BSD      ->  (featurep :system 'bsd)

The constants will stick around until the v3 release so folks can still
use it -- and there are still some modules that use it, but I'll phase
those uses out gradually.

Fix: #7479
2024-02-04 17:54:29 -05:00
Tim Ruffing
f4e02a2d39 fix(org): don't call org-reveal in dead buffer
This fixes a bug introduced in bb3431a (#7509). This shows up for
example in `org-capture`, which uses multiple org buffers and the
initial one (with name `*Capture*`) will be dead already by the time the
timer runs.

Amend: #7509
2023-11-29 11:30:20 -05:00
Leo Okawa Ericson
31b2ad22fb
fix(org): call org-reveal in correct buffer
Sometimes, `org-reveal` is called in the wrong buffer which throws an
error.  For example, `org-link-open-from-string` creates an temporary
org-mode buffer that gets killed very quickly which means that
`org-reveal` gets called in a different buffer.  I have also had issues
with org-reveal getting called in the org-roam buffer, which is why this
commit also saves the buffer it was called in.

Co-authored-by: Leo Okawa Ericson <git@relevant-information.com>
2023-11-23 21:21:08 -05:00
Liam Hupfer
2279a42c50 fix(org): address fancy links regressions
- several all-the-icons references were missed, and some code points are
  different in nerd-fonts. the variable icon became a folder, the
  package icon became a scissors, and the file-icons font icon is not
  available
- make face link type face passthrough work
- remove extraneous rear-nonsticky and height properties that nerd-icons
  already sets
- generally improve consistency across link types
  - material design icons, underlines, and font lock faces for symbols,
    shadow if unbound
  - octicons for packages, modules, and executables, blue links if
    installed, shadow if not. color coded icon based on status
  - refactor and remove extraneous code
2023-09-20 20:23:26 +02:00
Liam Hupfer
c3342a8011 nit(org): make activate function suffixes consistent 2023-09-20 20:23:26 +02:00
Liam Hupfer
54c67acf2a nit(org): use consistent link follow function names
Looks like the doom-module one was partially renamed to follow naming
conventions, and that didn’t propagate to the corresponding doom-package
function.
2023-09-20 20:23:26 +02:00
Ellis Kenyő
9787022b83
refactor!: replace all-the-icons with nerd-icons
BREAKING CHANGE: This commit replaces all-the-icons with nerd-fonts. Any
all-the-icons-* function calls or variable references in your private
config will break and should be replaced with their nerd-icons-*
equivalent. That said, Doom will continue to install all-the-icons for
a while, so feel free to load it if you don't want to fully commit to
the change yet.

This change is happening because nerd-icon has wider support for GUI and
TUI Emacs; has a larger, more consistent selection of symbols; plus unicode
coverage.

Fix: #7368
Close: #6675
Close: #7364
2023-09-14 01:03:55 +02:00
Henrik Lissner
af5add0e9e
merge: pull request #7389 from hpfr/misc 2023-09-06 14:28:57 +02:00
StrawberryTea
3cafa0223e
fix(org): check org-fold-outline in invisible property
Fix: #7206
2023-09-06 14:27:35 +02:00
Liam Hupfer
9c2d50d97e nit: fix docstrings 2023-09-02 11:46:07 -05:00
Takaaki ISHIKAWA
d1141b14c1 fix(org): org-flag -> org-fold, add spec argument
This implements the fixes described on takaxp/org-tree-slide#54

`org-flag-region` was deprecated on org 9.6, superseded by
`org-fold-region`, which takes different `spec` argument.

Fix: takaxp/org-tree-slide#54
Ref: 5f817f21fc/lisp/org-compat.el (L463)
2023-03-17 00:26:21 -04:00
TEC
733f857199 feat(org): new "cmd" link type 2023-02-21 18:35:15 -05:00
TEC
825458e039 refactor(org): use new :help-echo for kbd link 2023-02-21 18:35:15 -05:00
TEC
14bf870025 fix(org): support module link names with A-Z0-9
We also guard against calling doom-module-locate-path unless the
category is non-nil.
2023-02-21 18:35:15 -05:00
TEC
c1361c0ede feat(org): add some :help-echo for some links
Also use the :help-echo for eldoc.
2023-02-21 18:35:15 -05:00
TEC
181540c8b7 feat(org): introduce doom-executable link type 2023-02-21 18:35:15 -05:00
TEC
c26d64c9b9 feat(org): fancy docs links with activation fns 2023-02-21 18:35:15 -05:00
declantsien
b5e9f58db6
fix(org): check WAYLAND_DISPLAY for bin/org-capture
Check WAYLAND_DISPLAY for +org-capture-frame-parameters.
PGTK emacsclient also uses this logic.

Ref: masm11/emacs#13
2022-10-28 19:13:32 +02:00
TEC
7e50f239c4 fix(org): improve parsing of flag-only module link 2022-10-05 01:01:19 +02:00
TEC
24f98d49ec tweak(org): have doom links use path for info 2022-10-05 01:01:19 +02:00
AlessandroW
d156e58577
fix(org): respect org-insert-heading-hook in +org--insert-item
Doom replaces `org-insert-heading`, but its replacement does not respect
`org-insert-heading-hook`. This commit fixes that, enabling folks to
customize their insert-heading behavior, e.g.  adding a time stamp:

  (defun my/org-set-creation-date-heading-property ()
    (save-excursion
      (org-back-to-heading)
      (org-set-property "CREATED" (format-time-string "[%Y-%m-%d %T]"))))
  (add-hook 'org-insert-heading-hook #'my/org-set-creation-date-heading-property)

Ref: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org.el#n6187
Ref: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org.el#n1615
2022-09-16 13:14:36 +02:00
Henrik Lissner
ab9896c526
refactor(org): move doom-docs link defs to :lang org
Where they will be further generalized, later.

This also prevents an issue where org was loaded while the profile init
files are generated, which caused a warning about org-loaddefs which
introduces a noticable delay.
2022-09-16 13:06:17 +02:00
Henrik Lissner
ad6a3d0f33
refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
efim
02bb28dc82
fix(org): respect org-table-automatic-realign
Co-authored-by: efim <efim.nefedov@nordigy.ru>
2022-08-12 21:03:39 +02:00
Henrik Lissner
057e6c531c
refactor: replace doom-enlist with ensure-list
doom-enlist is now a deprecated alias for ensure-list, which is built
into Emacs 28.1+ and is its drop-in replacement. We've already
backported it for 27.x users in doom-lib (in 4bf4978).

Ref: 4bf49785fd
2022-08-07 19:43:13 +02:00
Henrik Lissner
1f8bf7accb
merge: rewrite-docs
I've omitted docs/*.org from this merge, as there is still work left to
do there, but I am pushing the module docs early so folks can benefit
from the new docs sooner.
2022-08-03 03:27:50 +02:00
Henrik Lissner
a570ffe16c
fix(org): end-of-file error while parsing +present
Ref: db3ca52ed6 (commitcomment-76886620)
2022-06-24 12:25:44 +02:00
Brian Christian
db3ca52ed6 fix(org): wrong arg type when leaving present mode
When leaving org-tree-slide-mode, the window fringes are reset
fringe-mode has multiple possible types, including cons cell,
which cannot be passed directly to set-window-fringes
2022-06-21 18:31:59 +02:00
Henrik Lissner
cb03d3258d
refactor!(lib): remove {doplist!,plist-delete!,doom-plist-delete}
BREAKING CHANGE: With 26.x support dropped, I've dropped:

- doom-plist-delete: use map-delete instead
- plist-delete!: use cl-callf + map-delete instead
- doplist: use (cl-loop for X on PLIST by #'cddr ...) instead

These were removed as part of an ongoing effort to eliminate
redundancies with built-in packages and reduce Doom's overall footprint.
2022-06-17 18:21:22 +02:00
Henrik Lissner
8a27eb99be
perf(org): optimize org-roam node listings
org-roam-get-keyword performs some file IO to read file keywords from
all nodes. This can be slow with long node lists. With
org-roam/org-roam#1963, file title is baked into the schema, so we don't
need to do this work anymore.

Ref: org-roam/org-roam#1963
Fix: #6382
2022-05-09 15:43:32 +02:00
Valentin Herrmann
2d108e14a2
fix(org): multiple fixes for +org--insert-item
There are multiple problems with the previous version of
`+org--insert-item', e.g. the labels of ordered lists were not updated
and it also made a difference if the point is before or after the
bullet.

This commit fixes this behavior, but uses a horrible hack. For the edge
case of an empty item, it inserts a no-break space momentarily, so that
`org-insert-item' does the right thing.
2022-03-30 20:06:40 +02:00
Mora Unie Youer
18f74d277f
feat(org): keybinds for removing #+RESULTS blocks
Added new keybinds for easy removal of RESULTS blocks in org-mode.

SPC m k - delete RESULTS block under cursor
SPC m K - delete all RESULTS blocks under cursor
SPC u SPC m K - delete all RESULTS blocks in buffer
2022-03-19 16:19:54 +01:00
Henrik Lissner
4c3be5e379 refactor(org): org-roam-node-doom-subdirs
Didn't need to be so convoluted.
2022-02-11 02:02:34 +01:00
Henrik Lissner
9217bb81f4 fix(org): org-babel-do-in-edit-buffer deleting popups
Fix: #6061
2022-02-10 21:28:55 +01:00
Henrik Lissner
9672dbcb5e refactor(org): name anonymous keybind on RET
Makes it easier to advise, swap, or reference.
2022-02-10 21:07:20 +01:00
Henrik Lissner
8e691e810f refactor!(org): backlinks buffer management
BREAKING CHANGE: The +org-roam-open-buffer-on-find-file variable was
renamed to +org-roam-auto-backlinks-buffer *and* is now disabled by
default. When this is non-nil, it will open the *org-roam* backlinks
side window when roam files are visible, and close it when they aren't.

This change also makes this behavior a little more robust, but is
understandably not everybody's (read: most people's) cup of tea, so it
is now opt-in.
2022-02-10 21:07:20 +01:00
Henrik Lissner
7304a8de8f tweak(org): separate roam tags from types
- No longer hard-code fontification of tags and types in roam
  completion.
- Prefix types with @ and tags with # -- makes them easier to search for
  in completion -- and swap types and hierarchy columns. I.e.

  before: TYPE   TITLE   [TAG [TAG...]]
  after:  TITLE   @TYPE   [#TAG [#TAG...]]
- Exclude unwanted (i.e. meta) tags from public display, like ATTACH,
  ARCHIVE, or anything in org-num-skip-tags.
2022-02-10 21:07:20 +01:00
Henrik Lissner
11cc896e8f tweak(org): use org-eldoc-breadcrumb-separator for roam note hierarchy
More consistent and configurable.
2022-02-10 21:07:20 +01:00
Henrik Lissner
3c2c23f705 feat(org): use roam:X link description if X is empty
Saves on some typing if you want to link to zettels that don't exist
yet.
2022-02-10 21:07:20 +01:00
Valentin Herrmann
26040c6fc1 fix(org): parity for headlines & items in +org--insert-item 2022-02-09 20:00:37 +01:00
Siddharth Shekar
4cc82bb32a docs(org): update docstring for +org/dwim-at-point 2022-02-09 15:58:10 +01:00
Siddharth Shekar
008b080b45 fix(org): toggle image when point before first heading 2022-02-09 15:58:10 +01:00
Henrik Lissner
67a9573f0d fix(org): tab not invoking cdlatex-tab in headings
In org-mode, if one writes a math expression in a section (i.e. heading)
while using cdlatex, pressing tab indents the section instead of
performing a cdlatex-tab.

This fix takes care of this issue to have the wanted behavior: if in
math environment and hit tab while in section, execute cdlatex-tab.

Close: #5926
Co-authored-by: roiholtzman <roiholtzman@users.noreply.github.com>
2022-01-03 16:51:51 +01:00
Henrik Lissner
798df6bc9e feat(org): follow citations on +org/dwim-at-point
As discussed in #5290, pressing RET on citations (or citation
references) will now follow them.

Ref: #5290
2021-11-25 01:22:58 +01:00
Henrik Lissner
2f39d3fced fix(cli): "Unknown terminal type" error on bin/org-capture
Fix: #5438
2021-11-24 22:03:21 +01:00
Henrik Lissner
7bc0033d0a docs: add doom-docs-mode & doom-docs-org-mode
These two modes exist to provide a nicer reading experience while
viewing Doom's org documentation from within Emacs; they hide
meta-lines, comments, markup, and more.

They also enable our docs to use IDs for links and keep our ID db
separate from any user ID dbs.
2021-11-21 20:04:28 +01:00
Henrik Lissner
0aad1399cc refactor(file-templates): doom readme templates
Including readme template for categories.
2021-11-21 20:04:28 +01:00
Manjinder Singh
e303be6951 fix(org): show outline path on refile to current file
Before this change, the +org/refile-to-current-file command would
display a flat list of tail headings in the current file, without
context, which can result in duplicates and can make it difficult to
tell where you're refiling a heading to.

This changes each heading to be a full path.
2021-11-19 23:44:28 +01:00
Henrik Lissner
5a8af71b0b refactor(org): remove unused overlay cleanup code
No longer used since c92937f89.

Ref c92937f890
Ref #5524
2021-09-27 21:57:11 +02:00