Commit graph

244 commits

Author SHA1 Message Date
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
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
Henrik Lissner
c92937f890 fix(org): invisible inline images in org-tree-slide-mode
Our method of hiding meta lines (like '#+attr_org: ...') was too
effective; it ended up hiding the following image as well!

Fix #5524
2021-09-27 13:37:41 +02:00
Henrik Lissner
5f1a26290c fix(org): restore frame layout when disabling org-tree-slide-mode 2021-09-27 13:35:11 +02:00
Henrik Lissner
130c6e90d5 fix(org): doom-module links opening private modules
A doom-module: link should only refer to built-in modules, not
user-provided ones in $DOOMDIR/modules.
2021-08-01 23:37:36 -04:00
Henrik Lissner
11007f3997 feat(org): add kbd & doom-{module,package}} links
I make extensive use of these in our new in-repo Org documentation.
2021-07-31 19:40:58 -04:00
Henrik Lissner
83171ac554 feat(org): add #+STARTUP inlinegifs playgifs
- #+STARTUP: inlinegifs = play inline gif previews when point is on
  them.
- #+STARTUP: playgifs = play all gifs in the visible buffer (super,
  super slow; use at your own risk).
- Add +org-startup-with-animated-gifs for changing the global
  default (nil). Can be set to 'at-point (inlinegifs) or t (playgifs)
2021-07-31 04:35:49 -04:00
Henrik Lissner
cd87cc0cc8 refactor: remove redundant org code
org-collect-keywords does the job here. No need to reinvent the wheel.
2021-07-28 12:42:22 -04:00
Henrik Lissner
ce905b9246 Expand latex snippets in org-mode fragments on TAB 2021-07-25 15:41:29 -04:00
Wetlize
c6e4ffb929 Improve display of custom templates in the minibuffer 2021-07-25 02:49:40 +03:00
Wetlize
5ef733b488 lang/org: Add +roam2 flag for org-roam v2 2021-07-25 01:42:09 +03:00
Henrik Lissner
60b595321e Lazy-load yasnippet harder for faster first-file load time
+ Rather than waiting for the first "interactive" major mode to be
  visited to activate yas-minor-mode, we wait until the first time the
  user invokes a snippet command to activate yas-global-mode.
+ yas-reload-all is one of the bottlenecks when loading a file for the
  first time. Deferring it further should help with this.
+ yas-global-mode reaches more major modes than our former list of
  hooks (fixes #5140).

Closes #5140
2021-06-05 13:12:00 -04:00
Henrik Lissner
805810b95f lang/org: tab = cycle folds if in emacs state
Tab should only be changed for evil users in insert mode, since they
have fold cycling functionality available in normal mode and vanilla
users do not.
2021-05-31 14:22:54 -04:00
Henrik Lissner
a4d2e873ab Bump :ui doom
hlissner/emacs-doom-themes@4199e74 -> hlissner/emacs-doom-themes@4d24728
hlissner/emacs-solaire-mode@9d143db -> hlissner/emacs-solaire-mode@186f97d

Rewrite solaire-mode usage to adapt to upstream changes. This will yield
a new class of edge cases, but I'll tackle those as I encounter them.

Closes #5063
2021-05-21 23:13:14 -04:00
Henrik Lissner
a80f13f626 Prevent extra window after +org/export-to-clipboard
org-export-to-buffer opens a preview window. This command doesn't need
that, so we inhibit it.

Closes #4911
2021-05-01 02:28:44 -04:00
Henrik Lissner
1d155d0c2f lang/org: reveal ancestors of point after saveplace
When opening an org file and the point is placed in a folded region (by
saveplace), it reveals the current subtree. Instead, it will reveal the
current subtree *and* its ancestors (and their siblings), which is more
intuitive.
2021-04-21 21:45:04 -04:00
Henrik Lissner
1b4b077385 Refactor ox-clip advice to omit before/after props 2021-03-22 21:11:22 -04:00
Henrik Lissner
4bab5a948a Omit after/before-string overlay props w/ ox-clip
Otherwise you get fringe characters inserted into the htmlized output.
Like !'s for every flycheck error.
2021-03-22 01:24:26 -04:00
Henrik Lissner
aafed6d8a0 lang/org: call push-button on buttons in org-mode 2021-03-22 01:24:26 -04:00
Henrik Lissner
d5019f0b57 Add docstring to +org/refile* commands 2021-03-02 23:48:54 -05:00
Rick Lupton
468f308114
Fix +org/refile-to-other-window in indirect buffer (#4721)
* Fix +org/refile-to-other-window in indirect buffer

* Extend fix to other refile commands

Co-authored-by: Henrik Lissner <accounts@v0.io>
2021-03-02 23:48:42 -05:00
Henrik Lissner
d149c59d2e
Add emacs mode checks to insert mode checks
This is to accommodate users who default to emacs mode, rather than
insert mode. The two are also very alike, so many of these checks should
apply to both (almost) equally.
2020-12-11 17:38:09 -05:00
Henrik Lissner
68b1594553
Fix #4220: void-function org-clocking-p
On first invocation of +org/toggle-last-clock, before org-clock has
loaded.
2020-11-06 02:29:37 -05:00
Henrik Lissner
91ab02951d
Minor refactors across the board 2020-08-20 03:43:50 -04:00
Henrik Lissner
14d9786360
Respect org-hierarchical-todo-statistics 2020-08-14 00:40:32 -04:00
Henrik Lissner
f686e01f4b
lang/org: fix eval handler
1. Wasn't restricting boundaries to the inside of the src block.
2. Was using a match when no match data was set (whoops).
2020-08-07 22:41:39 -04:00
Henrik Lissner
3b13105e0e
lang/org: add jupyter support to eval handler 2020-08-07 20:15:15 -04:00
Henrik Lissner
5a80db875c
lang/org: add lookup handlers for src blocks
- Fixes: `set-lookup-handlers!` couldn't define :definition or
  :references handlers in text-mode derivatives.
- Adds: support for evaluating code in jupyter blocks (#2477).
2020-08-06 00:23:09 -04:00
Henrik Lissner
8ae0e79918
lang/org: add eval handler
With this, gr and gR will now work in babel blocks to execute a subset
of the block (or the whole thing, if you'd like). Results are displayed
in a popup buffer (or overlay if :tools (eval +overlay) is enabled).
2020-08-05 18:26:07 -04:00
Henrik Lissner
863eb82efd
S-RET -> insert literal newline
A convention on many text editors and applications is to make RET
auto-indent new lines. That has already been done. Another convention is
for S-RET to insert an unindented line; this commit adds this convention
to Doom.

Relevant to #3694
2020-08-05 18:26:06 -04:00
Henrik Lissner
d81ef69525
Fix #3693: don't unfold archive trees on file-open
Also refactors +org-make-last-point-visible-h to be more realistic about
when it should and shouldn't expand the hidden region at point. Since
org-agenda-inhibit-startup is now non-nil by default it makes no sense
to test it (and it was a poor choice to begin with).

Plus, instead of using outline's API, better to use org's, even if
they're aliases or wrappers. Less of a maintenance burden.
2020-08-05 15:00:34 -04:00
Henrik Lissner
0e73297707
lang/org: fix edge case in +org--insert-item 2020-07-27 03:07:04 -04:00
Henrik Lissner
b2e11f9a72
Revise docstrings for org hooks 2020-07-26 16:17:04 -04:00
Henrik Lissner
12e414be89
Rename +org/toggle-clock -> +org/toggle-last-clock
And rewrite it to ask for confirmation before clocking in on the item at
point. Without this, it's much harder to see what exactly it's doing.
2020-07-26 15:55:11 -04:00
Henrik Lissner
076cee4e89
Revise +org--insert-item
Which powers +org/insert-item-below and +org/insert-item-above.
2020-07-26 15:44:42 -04:00