Commit Graph

225 Commits

Author SHA1 Message Date
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
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
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
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
ce905b9246 Expand latex snippets in org-mode fragments on TAB 2021-07-25 15:41:29 -04:00
c6e4ffb929 Improve display of custom templates in the minibuffer 2021-07-25 02:49:40 +03:00
5ef733b488 lang/org: Add +roam2 flag for org-roam v2 2021-07-25 01:42:09 +03:00
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
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
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
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
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
1b4b077385 Refactor ox-clip advice to omit before/after props 2021-03-22 21:11:22 -04:00
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
aafed6d8a0 lang/org: call push-button on buttons in org-mode 2021-03-22 01:24:26 -04:00
d5019f0b57 Add docstring to +org/refile* commands 2021-03-02 23:48:54 -05:00
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
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
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
91ab02951d Minor refactors across the board 2020-08-20 03:43:50 -04:00
14d9786360 Respect org-hierarchical-todo-statistics 2020-08-14 00:40:32 -04:00
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
3b13105e0e lang/org: add jupyter support to eval handler 2020-08-07 20:15:15 -04:00
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
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
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
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
0e73297707 lang/org: fix edge case in +org--insert-item 2020-07-27 03:07:04 -04:00
b2e11f9a72 Revise docstrings for org hooks 2020-07-26 16:17:04 -04:00
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
076cee4e89 Revise +org--insert-item
Which powers +org/insert-item-below and +org/insert-item-above.
2020-07-26 15:44:42 -04:00
afcf56a610 Redesign dwim RET on org headings
In an effort to make +org/dwim-at-point more useful and intuitive.

- Fix latex preview toggling in subtree
- Toggle inline images more selectively
- Clean up after itself (delete overlays)
- Update +org/dwim-at-point docstring
- Always update todo statistics, cookies, checkbox counts and ToC.
2020-07-24 19:27:50 -04:00
25b240b9b0 Respect org-display-remote-inline-images
Don't download inline previews of URLs if
org-display-remote-inline-images is set to 'skip (its default).
2020-06-28 01:09:54 -04:00
af91af01fa Merge pull request #3213 from wedens/org-capture-frame-refile
Prevent doom-capture frame from closing when refiling
2020-06-04 19:50:12 -04:00
27544d21cb bin/org-capture: fix 'Display :0 can’t be opened' error 2020-06-01 14:46:13 -04:00
8e34998433 Fix #3254: RET not invoking org-goto-ret in org-goto buffer 2020-05-31 22:25:55 -04:00
66c4317fa2 prevent doom-capture frame from closing when refiling 2020-05-24 23:29:35 +07:00
88903551c0 lang/org: Support option in custom org links 2020-05-22 22:40:28 +08:00
ea18c83c0a General refactors & reformatting across the board 2020-05-15 01:44:53 -04:00
a10c157d87 Fix zr, zm, zR & zM vimmish folding in org-mode
Fixes the following keybinds for evil users:

z r        open next level of headings buffer-wide
z m        close next level of headings buffer-wide
z R        open all folded headings
z M        close all folded headings
[N] z R    open all headings at level N and above
[N] z M    close all headings at level N and below
2020-05-13 19:31:09 -04:00
31e4bfb2d4 Don't unfold to 2nd level in org-mode by default
This is too opinionated to be a default, and has thus been replaced with
"unfold subtree around point when opening an org file", in case
saveplace has restored the point to a folded region.
2020-05-11 03:00:08 -04:00
47571446b9 Use org-download-dnd instead of inhouse dnd handler
Possibly fixes #3056
2020-05-08 01:27:08 -04:00
d12752324a Introduce letf! convenience macro
A more succinct cl-letf, which allows for local functions and macros.
2020-04-29 23:48:21 -04:00
2d1a2ed8b3 Fix basic links not returning correct paths
A silly typo by a silly goose.
2020-04-25 01:55:54 -04:00
8c1525e3d8 Rewrite org-download/attach systems
+ Cut down on unnecessary code & advice
+ Fix 'attach and 'download methods for org-download so that a) their
  links actually work and b) inline previews of their links show up.
+ Allow users to only set org-attach-id-dir (which will be mirrored to
  org-download-image-dir, unless the user has changed it).
+ Prevent a few edge cases where org-attach-id-dir or
  org-download-image-dir were blank.
2020-04-25 01:27:25 -04:00
adbe9041ce Fix inline previews for download:* links 2020-04-25 01:24:48 -04:00
6159068b4d Rewrite custom org link types
This should fix a few issues with links (like org-download links)
resolving to the incorrect org-directory or org-id-attach-dir (because
it's resolved too early).

I've also simplified and refactored the API to make it easier to grok.
2020-04-24 20:41:56 -04:00
141a649e04 Revert afca8f14a
Fix #2932
2020-04-18 12:51:00 -04:00
7662de55d8 Fix yasnippet breaking org-superstar
Because yasnippet has a delete first and ask never policy for cleaning
up overlays in the buffer.
2020-04-17 02:41:10 -04:00
afca8f14a1 Fix image previews for download:* org links 2020-04-15 23:47:14 -04:00