Commit Graph

208 Commits

Author SHA1 Message Date
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
f02d28543b Remove reference to org-bullets
Package was replaced in 5c4f3c62a
2020-04-15 18:21:50 -04:00
3ce752a227 Generalize +org-capture-frame-p
Plus minor refactor of +org-capture/open-frame.
2020-04-14 15:42:24 -04:00
169fe6a7f4 lang/org: revise docstrings 2020-04-14 15:37:00 -04:00
41606f5369 Only realign tables in +org-realign-table-maybe-h
Don't recalculate formulas.
2020-04-13 15:23:16 -04:00
da427a1b95 Fix #2880: RET on links in other elements 2020-04-11 14:43:58 -04:00
ec671002d6 Fix void-variable +org-present--overlays
Accidentally removed some time ago.
2020-03-26 17:34:32 -04:00
cdaa55b4db Rename org-capture frame to doom-capture
To reduce likelihood of conflicts.
2020-03-01 01:39:14 -05:00
dbd0a84805 Don't use counsel-org-capture for +org-capture/open-frame 2020-02-26 17:34:59 -05:00
c62c3bc4cd Fix #2544: revert 5ecf206681 2020-02-20 20:30:43 -05:00
ca18034e32 Fix drag'n'drop in non-org-mode buffers 2020-02-17 04:58:57 -05:00
047ea8dab5 Update & fix org-tree-slide-mode integration 2020-02-02 16:02:28 -05:00
827225e331 Fix #2429: replace defunct attach: links w/ download:
Forgot that support for attach: links were removed some time ago, but I
still want short org-download links, so I've added 'download:' links.
2020-01-26 02:20:39 -05:00
8332daccee make +org--insert-item respect emacs-mode
No change of behaviour in non-emacs modes, but in emacs-mode stays there
   instead of switching to insert-mode.
2020-01-25 19:38:33 +02:00
558e906b2b Add 'SPC m r f' for refiling to specific org file 2020-01-09 15:59:58 -05:00
90096239af fix: use org-capture-projects-file 2020-01-07 16:06:51 -06:00
a9763fe76b Fix vestigial reference to +org-attach/uri 2020-01-02 16:22:52 -05:00
d84df72364 Dumb indent on TAB when in middle of subtree 2020-01-01 21:19:22 -05:00