This fixes a bug introduced in bb3431a (#7509). This shows up for
example in `org-capture`, which uses multiple org buffers and the
initial one (with name `*Capture*`) will be dead already by the time the
timer runs.
Amend: #7509
Sometimes, `org-reveal` is called in the wrong buffer which throws an
error. For example, `org-link-open-from-string` creates an temporary
org-mode buffer that gets killed very quickly which means that
`org-reveal` gets called in a different buffer. I have also had issues
with org-reveal getting called in the org-roam buffer, which is why this
commit also saves the buffer it was called in.
Co-authored-by: Leo Okawa Ericson <git@relevant-information.com>
Doom replaces `org-insert-heading`, but its replacement does not respect
`org-insert-heading-hook`. This commit fixes that, enabling folks to
customize their insert-heading behavior, e.g. adding a time stamp:
(defun my/org-set-creation-date-heading-property ()
(save-excursion
(org-back-to-heading)
(org-set-property "CREATED" (format-time-string "[%Y-%m-%d %T]"))))
(add-hook 'org-insert-heading-hook #'my/org-set-creation-date-heading-property)
Ref: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org.el#n6187
Ref: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org.el#n1615
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.
featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
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.
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>
+ 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
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.
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.
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.
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).
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
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.
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.
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
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.
'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
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.