Commit graph

573 commits

Author SHA1 Message Date
Henrik Lissner
c93790bb5c fix(org): omit -i switch from org-babel-python-command
The -i switch for python or ipython can cause python org src blocks to
hang indefinitely when executed.

Ref: hlissner/doom-emacs@c0d988fe0d
Ref: #5569
2021-11-28 22:08:07 +01:00
Henrik Lissner
45ee0ecf21 refactor(biblio): reformat module
- Defer citar-org, since citar autoloads it.
- Add introducing PR to #+SINCE and use new calver scheme.
- Move <localleader> @ keybind to :lang org

Ref: #5810
2021-11-22 15:45:00 +01:00
Henrik Lissner
7034378968 nit: s/#+BEGIN_SRC/#+begin_src, s/elisp/emacs-lisp/
From now on Doom will enforce two conventions for its org files for
consistency's sake:

- Lower-case meta-lines in org files, like #+begin_src, #+name, or
  #+end_quote (only exception are the top-level ones, like #+TITLE and
  #+STARTUP).
- Use 'emacs-lisp' as the lang specifier for elisp blocks rather than
  'elisp'. Emacs doesn't natively recognize the latter.

This will be reflected in our rewritten docs/*.org and module
README.org's.
2021-10-18 12:09:42 +02:00
Ethan Leba
0ca2e791f7 feat(org): add binding for org-clone-subtree-with-time-shift 2021-10-03 20:40:55 +02:00
Henrik Lissner
c0d988fe0d fix(org): recognize python-shell-interpreter-args
Also does not tamber with org-babel-python-command if the user has
changed it.

Fix #5569
2021-10-03 20:40:00 +02:00
Henrik Lissner
3179c2a744 tweak(org): org-clock-history-length = 20
The default value of 5 is too conservative. 20 seems more reasonable,
without being overwhelming.
2021-09-28 22:42:29 +02:00
Henrik Lissner
ed43b8e36f tweak(org): org-startup-folded = nil
'nil' behaves the same as 'showeverything' in every other way, except it
respects visibility options (like 'hideblocks').
2021-09-25 23:54:44 +02:00
Henrik Lissner
d210b983d4 tweak(org): unset org-list-demote-modify-bullet
Imposing different list bullets per-level was a poor and jarring
default.
2021-09-25 00:55:19 +02:00
Henrik Lissner
206063f27d tweak(org): org-imenu-depth = 6
Headings beyond 6 are excessive in almost any org document, and only
muddy (and slow down) imenu search results, so I'm reducing it to the
number of available HTML headings.
2021-09-25 00:54:13 +02:00
David Lukes
a03d30047c tweak(org): map f to org-footnote-action 2021-09-14 19:25:57 +02:00
Henrik Lissner
bf8495b412 fix(org): epdfinfo error when storing/exporting links
Here's the problem:

1. Org's link system unconditionally calls *all* link :store handlers
   when you call `org-store-link`, and all :export handlers when you
   export an Org file.
2. The org-pdftools package works by defining a custom pdf: link with
   custom :store and :export handlers.
3. Those handlers do not perform error handling before using pdftool's
   API.
4. pdf-tools fails loudly and ungracefully with a
   "pdf-info-epdfinfo-program is not executable" error when its API is
   used and epdfinfo isn't installed.

TL;DR org-pdftools effectively breaks storing/exporting in org-mode
until pdf-tools-install is executed to install epdfinfo. This is awful
UX, so let's suppress the error.
2021-08-22 01:41:26 -04:00
Robert Irelan
ff356e9c37
fix(org): error trying to kill dead agenda buffers
It may happen that org-agenda-new-buffers contains a killed buffer.
2021-08-06 03:18:47 -04:00
Henrik Lissner
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -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
858a0e44a3 feat(org): open help:* links with helpful-*
Rather than describe-*
2021-07-31 04:35:49 -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
823fb275a0 feat(org): expand parents for showNlevels option
#+STARTUP: showNlevels

This tells org to expand N levels at startup, but it only partially
unfolds headings, so show2levels gets you:

  * A [...]
  ** X [...]
  ** Y [...]
  ** Z [...]

Instead of (what I think is expected):

  * A
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
  eiusmod tempor incididunt ut labore et dolore magna aliqua.

  ** X [...]
  ** Y [...]
  ** Z [...]

Perhaps this should be upstreamed?
2021-07-28 15:02:14 -04:00
Henrik Lissner
7b274c7dbe feat(org): add native :async support
ob-comint (included with org) added native :async support. It only works
for python currently, but unlike ob-async supports :session for :async
python blocks. In fact, it *requires* :session, so we still fall back to
ob-async in its absence, failing that, it ultimately falls back to
synchronous execution.
2021-07-28 15:00:38 -04:00
Henrik Lissner
c48c01ebab feat(org): set org-num-face & org-num-skip-tags
+ Perhaps a dedicated face would be better, but org-special-keyword will
  do for now.
+ Don't number trees tagged :noexport: or :nonum:.
2021-07-28 14:06:35 -04:00
Henrik Lissner
4ac5332a1d
Merge pull request #5271 from Wetlize/add-roam2
lang/org: Add `+roam2` flag for org-roam v2
2021-07-25 04:13:03 -04:00
Itai Y. Efrat
24eaa1317c completion/selectrum -> completion/vertico, part 2
- Rename module from `:completion selectrum` to `:completion vertico`
- Rename all files involved
- Do *not* yet rename all the functions, as that messes up git's rename
  detection.
2021-07-25 02:51:15 +03:00
Itai Y. Efrat
26a310d04c selectrum: improve ivy parity
- add `completion-at-point` as analogue to `cousnel-company`
- fix emacs-bindings `counsel-company` binding to respect helm and selectrum
- add org jump commands `consult-org-heading` and `consult-org-agenda` bindings
- add `consult-history` as `counsel-minibuffer-history` analogue
- add support for `doom/help-search`
- update TODO.org
2021-07-25 02:50:31 +03:00
Wetlize
5ef733b488 lang/org: Add +roam2 flag for org-roam v2 2021-07-25 01:42:09 +03:00
Henrik Lissner
2855351b2c lang/org: fix TAB override in GUI emacs
Not sure if this was a recent change (28.0.50+), but a new conditional
keybind in outline-mode-cycle-map was overriding TAB in insert mode in
org-mode (in GUI Emacs).
2021-07-23 22:10:43 -04:00
Henrik Lissner
044a1a5f2b Drop Emacs 26.x support
Emacs 27.x has been the stable version of Emacs for nearly a year, and
introduces a litany of bugfixes, performance, and quality-of-life
improvements that significantly reduce Doom's maintenance burden (like
XDG support, early-init.el, image manipulation without imagemagick, a
native JSON library, harfbuzz support, pdumper, and others).

With so many big changes on Doom's horizon, I like having one less (big)
thing to worry about.

Also reverts bb677cf7a (#5232) as it is no longer needed.
2021-07-06 02:31:52 -04:00
Henrik Lissner
26aeb72e63 org-clock-out-remove-zero-time-clocks = t
Reverts 334c309; the original issue was reportedly fixed upstream at
some point.
2021-06-04 14:08:42 -04:00
Henrik Lissner
4dceae1826 lang/org: hl dead links in warning + org-link faces 2021-06-01 21:24:32 -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
bd94ef8f84 Optimize reading org-agenda buffers in the bg
Less init work when opening org-agenda buffers = faster org-agenda.
2021-05-16 21:18:26 -04:00
Hynggyu Jang
1e1838d29b fix #4901: suppress strange behavior of org agenda commands
With current hacks involving `org-agenda-files`, one cannot use org agenda
commands like clock in or change the entry's state to done, etc.

Specifically, the mangled behavior observed at #4901. This commit fixes those
problems around `org-agenda` buffer specific commands.

For more details, please refer to https://github.com/hlissner/doom-emacs/issues/4759#issuecomment-822100632.
2021-04-24 10:53:29 +09:00
Henrik Lissner
f621ff8047 lang/org: fix org-ditaa jar paths
Now also includes contrib/scripts in org-mode's build directory.
2021-04-21 21:45:04 -04:00
Henrik Lissner
c339bb0929 Fix #4563: ob-c.elc failed to provide feature ob-c
Due to case shenanigans, ob-C.el's feature name is ob-C, not ob-c,
preventing folks from using 'c' (lowercase) as a language name for org
babel blocks.
2021-04-17 00:09:50 -04:00
Henrik Lissner
0683861f3f Make doom-first-*-hooks trigger less aggressively
This fixes a class of issues where doom-first-file-hook would fire even
for files not opened interactively (e.g. via org-agenda reading agenda
files or helpful scraping definitions from source files).

In instances like these, hooks like find-file-hook or pre-command-hook
are set to nil to speed up this process and reduce noise, but many
packages add to these hooks when they are loaded; these are lost when
their lexical values fall out of scope, leading to odd errors (like the
one in #4759).

Fixes #4759 (again)
First brought up in hlissner/doom-emacs@9f08db8
2021-04-14 23:43:45 -04:00
Henrik Lissner
83e0451cba Fix org-capture popup rules for partials & non-org files
When a capture target didn't have an *.org file extension OR its buffer
was displayed before it was renamed to CAPTURE-* (e.g. while a capture
template prompts for input) the popup handler fails to capture the new
window, displaying it in other-window, rather than a popup.
2021-03-27 18:27:02 -04:00
Henrik Lissner
9f08db8e33 Fix #4759: suppressed doom-first-file-hook side-effects
An optimization that minimizes how much work is done when grabbing org
agenda files in the background prevented side-effects in
doom-first-file-hook. This had the indirect effect of preventing
save-place-mode from adding its hook to find-file-hook IF org-agenda was
the first thing you ran at startup.
2021-03-10 20:33:37 -05:00
Henrik Lissner
377608c54b Fix #4651: don't trigger formatters on org tangle 2021-03-10 13:03:29 -05:00
Henrik Lissner
7c38eee96c Fix #4727: wrong-type-arg error on async org export
Because org-export-async-init-file will have a different value in the
temp buffer created for the temp file.
2021-03-10 13:03:29 -05:00
Henrik Lissner
5069d95b42 Fix #4745: defining as dynamic an already lexical var
If a dynamic variable is first defined in the same scope where it is
lexically bound, you get this error.
2021-03-07 13:04:24 -05:00
Henrik Lissner
08de1856fa Fix #4733: aggressive saving of org capture buffers 2021-03-06 00:53:18 -05:00
Henrik Lissner
2ab8800bb4 Fix #4726: void-variable org-babel-async-language-blacklist
Supposed to be ob-async-no-async-languages-alist
2021-03-03 15:26:25 -05:00
Henrik Lissner
19563de316 Restore fallback warning removed by ce1105b46
Shoulds till warn when the language isn't blacklisted.
2021-03-02 12:07:45 -05:00
Henrik Lissner
ce1105b463 lang/org: suppress :async+:session warnings for blacklisted langs
If they're blacklisted, they may have their own :async implementation,
like jupyter does. The warning isn't useful or true for them.
2021-03-02 12:05:36 -05:00
Thomas Moulia
ee26c02e1c
Add org-agenda-priority keybindings to org config (#4521)
* Add org-agenda-priority keybindings to org config

Summary: This diff adds evil-esque keybindings for the org-agenda-priority
functions. These functions allow the org subtree priority to be set from
the agenda view.

* Correct org priority keybinds

These keys were meant to be on <localleader> p, but were mistakenly
bound on <localleader> s p.

Also mirrors these keybinds to org-agenda-mode-map.

* Use non-agenda org-priority commands

Also make casing in which-key labels more consistent.

Co-authored-by: Henrik Lissner <accounts@v0.io>
2021-03-01 23:04:41 -05:00
Henrik Lissner
49c3c84d7f lang/org: disable ob-async on export or :session
Refactors advice to disable ob-async when exporting org documents or
when the :session parameter is present (ob-async does not support it).
Execution is degraded to synchronous execution and a warning logged.
2021-03-01 22:27:17 -05:00
Henrik Lissner
2ebc4be111 lang/org: reformat keybinds 2021-03-01 22:27:17 -05:00
Henrik Lissner
9c67bf0044 lang/org: revert org-footnote-auto-label to default
'plain is no longer an accepted value.
2021-02-27 10:31:49 -05:00
HyunggyuJang
5d8cbb9541
evil-org-mode-map's CSright conflict with Cright
I understand that what you tried to accomplish via CSright was; however, it doesn't make any difference from Cright, and so for other navigation keys -- h,j,k,l.
I fixed this discrepancy.
2021-02-27 12:07:31 +09:00
Henrik Lissner
f26161410c lang/org: add TODO keywords & fontification
+ Adds LOOP and IDEA to primary todo keywords.
+ Adds OKAY, YES, and NO sequence.
+ Specially fontifies NO and KILL with special "cancelled" face to
  indicate an aborted/rejected task.
+ Specially fontifies PROJ to set it apart.
2021-02-26 21:33:00 -05:00
Henrik Lissner
ed86f99655 lang/org: open org links to remote paths in emacs 2021-02-26 21:33:00 -05:00
Henrik Lissner
e1683dc763
Merge pull request #4403 from gagbo/fix/bepo-exhaustive-remaps
Fix/bepo exhaustive remaps
2021-02-25 14:21:57 -05:00