Commit graph

101 commits

Author SHA1 Message Date
Henrik Lissner
d84df72364
Dumb indent on TAB when in middle of subtree 2020-01-01 21:19:22 -05:00
Henrik Lissner
07823d00a7
Fix yasnippet expansion in org src blocks
This is hacky, and causes weirdness with org-bullets-mode, but it works.
2020-01-01 21:19:22 -05:00
Henrik Lissner
b9f90b3a1a
lang/org: clear src block results on TAB
When cursor is inside a src block. e.g.

  #+BEGIN_SRC elisp  <-- not here
  (message "hi")     <-- in here
  #+END_SRC          <-- not here
2019-12-30 00:07:19 -05:00
Henrik Lissner
73d975de6c
lang/org: make C-RET create headings instead of error 2019-12-20 02:13:11 -05:00
Henrik Lissner
6cf17b1237
config/default: rebind 'SPC n {c,C,n,S}'
'SPC n c' -> Toggle last org clock
'SPC n C' -> Cancel current org clock
'SPC n n' -> org-capture
'SPC n S' -> Search org-directory headings

Closes #2043
2019-12-06 13:38:57 -05:00
Henrik Lissner
26c8f5c6ef
Bytecompiler bytecompiler, won't you shut up 2019-11-23 01:21:25 -05:00
Henrik Lissner
30f72da02a
Fix No such file org-version.el errors #2010
We generate an org-version.el file, rendering our old org-release hacks
unnecessary. This may cause breakages for uses who do deep clones of
org-plus-contrib; needs testing.
2019-11-19 20:29:22 -05:00
Henrik Lissner
7879a93081
lang/org: preserve TODO keyword on C-RET
Rather than reverting to first TODO keyword.
2019-11-12 15:24:02 -05:00
Henrik Lissner
f70f788df3
lang/org: don't auto-demote headings on C-RET
This can be harder to predict. Instead, use TAB and S-TAB after-the-fact
to adjust heading level.
2019-11-12 15:24:01 -05:00
Henrik Lissner
4703992002
Suppress missing-file org-version errors 2019-11-04 00:37:25 -05:00
Henrik Lissner
0b8e7a27b6
Minor refactoring/reformatting across the board 2019-10-31 14:35:07 -04:00
Henrik Lissner
9b3f21a9bc
Optimize doom/help-search
Yields a ~80% decrease in indexing time.
2019-10-26 02:12:58 -04:00
Henrik Lissner
5f00db871e
lang/org: major refactor & add org-fancy-priorities package
- Fixes an issue where evil bindings weren't working in org-mode
- Significantly slims down on unnecessary keybinds
- Remove +org-init-keybinds-for-evil-h hook and reli more on our new
  evil-org fork, which has upstreamed some of our changes.
- Documents undocumented functions, remove unnused ones, and reorganize
  org's autoload libraries by convention.
- Adds org-fancy-priorities for more elegant (and subtle) priority
  display than ugly [#A] tags.
2019-10-25 20:25:20 -04:00
Henrik Lissner
e10cd8cf2e
Insult byte-compiler's mom
Yeah, that shut him up.
2019-09-20 23:10:53 -04:00
Henrik Lissner
f816149589
lang/org: update +org/remove-link
To reflects changes made upstream, in org.
2019-09-07 19:57:58 -04:00
Henrik Lissner
9ab49be564
Fix "fatal: no names found" errors on 'doom rebuild'
Some packages that depend on org (like elfeed) will load the built-in
org early in the rebuild/package install process, which causes org to
define org-release and org-git-version, sometimes overwriting our stubs
for it. Without our hack, org call 'git describe' in the org repo in an
attempt to determine the installed version, which won't work in a sparse
clone. To ensure future definitions never overwrite ours, we advise them
as well.

Also moves magit-version hack to its autoload file, for consistency with
org's hacks.
2019-08-07 16:31:45 -04:00
Henrik Lissner
09d67f86d9
lang/org: move org-release hack back to config.el
We don't need it available *that* early.
2019-07-29 15:05:26 +02:00
Henrik Lissner
ead0b1ce15
lang/org: correct paths in comment headers 2019-07-27 17:06:55 +02:00
Henrik Lissner
302ec4e97a
lang/org: fix and autoload org-release hack
- Lazy load all the things.
- Now org-release return a sane version string, which should address
  packages using it to version check org.
2019-07-23 18:36:18 +02:00
Henrik Lissner
8147bc1aee
💥 lang/org: conform to new name conventions 2019-07-22 02:30:38 +02:00
Henrik Lissner
e81cdc0523
lang/org: prioritize checkboxes lower in dwim command
Otherwise, checkboxes take priority over links, clocks or tables.
2019-07-13 02:24:11 +02:00
Henrik Lissner
11bfb17894
lang/org: major refactor
The motivation for this change was to rethink lang/org's flags. Many of
its former flags represented non-features. Therefore, its flags have
been reduced to five: +dragndrop, +ipython, +pandoc, +gnuplot and
+present. Everything else is included as org-load-hooks and treated as
reasonable defaults.

Other changes:
- Fixes #1502: don't autopair certain pairs when in a math region
- Fixes #1483: broken localleader in org-agenda
- Adds gnuplot support #1108
- Doom's org submodules have been moved into lang/org/contrib/, because
  I expect there will be *many* more to come, and I don't want to
  pollute the moudle's root.
2019-06-28 17:28:28 +02:00
Henrik Lissner
9a02bd8ac8
Minor refactors across the board
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00
Henrik Lissner
4ecf6c9414
Add SCHEDULED support to +org/dwim-at-point 2019-06-26 14:31:06 +02:00
Henrik Lissner
518e53deab
lang/org: fix snippet expansion on visual region
Fixes two issues:

1. Evil users would be left in visual mode after expanding a snippet on
   a region, making it awkward to insert text. It now switches to insert
   state.
2. While yasnippet reindent the snippet's contents post-expansion, org's
   mode-specific indentation (see `org-src-tab-acts-natively`) can throw
   errors for arbitrary reasons. We don't need smart indentation when
   expanding snippets, so we turn it off only in this case.
2019-06-10 09:38:55 +02:00
Henrik Lissner
653161fe2e
lang/org: refactor org config load order
- No longer use org-load-hook; it was unnecessary and there were corner
  cases where org would get loaded before hooks were added to it.
- Update comments
- Remove config that was redundant with org's defaults (wrt org-file-apps)
- Perform persp-mode check before using persp-mode API in
  +org|exclude-agenda-buffers-from-workspace advice.
- Update outdated smartparens config and move it out of
  org-mode-hook (only needs to be run once, not everytime org-mode is
  enabled)
- Autoload mode hooks
2019-04-10 18:47:21 -04:00
Henrik Lissner
6084b774b8
lang/org: refactor and add keybinds for org tables
This update focuses on improving the key UX of org tables.

- Adds new table localleader keys under `SPC m s'
- Adds new localleader keybinds
  - New `s` prefix for table commands
  - New `f`/`F` keybinds for footnotes
  - New `'` keybind for `org-edit-special`
  - New `r` keybind for `org-refile`
- Bind localleader keys for both evil and non-evil users
- Refactors org table API
- For evil users:
  - Adds `zi` to toggle inline images
  - Finalize insert-mode keybind scheme for evil users (ala excel/gdocs)
    - C-{h,j,k,l} = move cursor between cells
    - C-M-{h,j,k,l} = insert cells in direction
    - C-M-S-{h,j,k,l} = swap cells in direction
2019-04-04 18:52:25 -04:00
Henrik Lissner
8a57d9b5fd
lang/org: RET on TOC will now refresh the TOC 2019-03-02 02:04:11 -05:00
Henrik Lissner
024f383a08
lang/org: add full link at point display to eldoc 2019-02-24 13:47:53 -05:00
Henrik Lissner
b4b85569b4
lang/org: expand snippet on TAB in visual mode 2019-02-19 19:05:49 -05:00
Henrik Lissner
069c196330
Appease byte-compiler senpai
Please notice me
2019-01-08 20:54:03 -05:00
Henrik Lissner
81cccbcc51
lang/org: only update parent statistics cookies
This would formerly update _all_ statistics cookies in the org document,
which can be terribly slow in large documents. This restricts that to
just the parent headlines of the subtree the cursor is in.
2018-10-30 16:20:25 -04:00
Henrik Lissner
e0f7ba19cd
lang/org: use correct todo on RET
Improves on baa6f640. This fixes RET cycling between different keyword
sets.
2018-10-19 15:44:25 -04:00
Henrik Lissner
99b7b7f740
lang/org: add inline base64/http(s) image support
Adds inline image preview support for http/https links, as well as
base64 encode image support with the img protocol. e.g.

Examples:
[[http://domain.com/some/image.png]]
[[https://raw.githubusercontent.com/hlissner/doom-emacs/screenshots/company.png]]
[[img:iVBORw0KGgoAAAANSUhEUgAAACUAAAAuCAAAAACKMo8cAA...]]
2018-10-17 16:31:23 -04:00
Henrik Lissner
baa6f64025
lang/org: use correct todo keyword on M-RET
Previously, new TODO headers created with M-RET or M-S-RET (bound to
+org/insert-item) would use the first TODO keyword in org-todo-keywords
in the new header. This wouldn't necessarily match the previous header.
e.g.

* [ ] Item 1
* TODO |

This fix ensures new headers will preserve the correct header, even if
the previous one is in a DONE state.

* [ ] Item 1
* [ ] |
2018-10-17 01:24:26 -04:00
Henrik Lissner
15991b5639 Refactor quiet! to be less destructive
It's possible for the debugger to be invoked from inside code wrapped in
a (quiet! ...) call. The debugger pauses Emacs in a broken state where
the functions locally rebound by quiet! (e.g. message, load-file,
write-region, etc) are never returned to their original definitions.

This attempts to reduce that probabilityby changing how quiet! silences
code. Rather than silencing them completely, they will be logged
to *Messages* but not displayed in the echo area.

Also, quiet! is now used less, where it isn't strictly needed (or where
inhibit-message is sufficient).
2018-09-28 21:13:27 -04:00
Henrik Lissner
7d3ffdff06
Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
Henrik Lissner
5663778e36
Make TAB respect org-cycle-separator-lines #800
outline-toggle-children and org-cycle-hide-drawers didn't respect
org-cycle-separator-lines.
2018-08-13 21:47:55 +02:00
Henrik Lissner
c935f3e4da
lang/org: fix backtab not outdenting items/headers 2018-07-30 04:06:00 +02:00
Henrik Lissner
ebd3b0223e
Fix followed org links not recentering correctly
Links like `file:test.cpp::45` would open file.cpp, but end up somewhere
else than line 45. Same with links like `file:test.cpp::int main()`.
2018-07-24 20:01:42 +02:00
Henrik Lissner
e7b252f442
TAB should respect org-cycle-open-archived-trees
And shouldn't cycle visibility of archived trees by default.
2018-07-12 20:39:39 +02:00
Henrik Lissner
4941e327f4
General refactor for readability
+ Removes redundant/unhelpful comments
+ Renames functions, hooks and variables to be self-documenting
+ Use add-to-list to ensure idempotency (and is more performant)
2018-07-09 15:33:31 +02:00
Henrik Lissner
c9ffa063e7
Fix +org/insert-item in nested plain lists
Would prepend new list items in the middle of plain lists, rather than
before them.
2018-07-04 14:19:22 +02:00
Henrik Lissner
38414a636f
Fix evil-org's o/O in nested plain lists
Thanks by @fuxialexander
2018-07-04 13:16:11 +02:00
Henrik Lissner
84c17b0413
Add docstring to +org-pretty-mode 2018-06-04 21:17:49 +02:00
Henrik Lissner
23bd9d3efa
Add FILE support to +org-get-property & optimize
Can now be used to grab properties from remote org files. Also only
reads the first 2048 bytes of the document by default, for performance
reasons.
2018-06-04 21:17:49 +02:00
Henrik Lissner
f7a6089956
Restore vim zr, zR, zm, & zM folding in org-mode
For evil users.
2018-06-04 21:17:49 +02:00
Henrik Lissner
f9be8887fb
lang/org: minor refactor/reformatting
Also reduce internal use of map! (toward eventual switch to general)
2018-06-03 12:22:39 +02:00
Henrik Lissner
5948a52a38
Fix jumpy cursor in org tables when using evil-replace 2018-05-30 18:15:58 +02:00
Henrik Lissner
49f16f681c
lang/org: realign/recalculate tables on exit evil replace mode 2018-05-30 01:45:35 +02:00