Commit Graph

259 Commits

Author SHA1 Message Date
e10cd8cf2e Insult byte-compiler's mom
Yeah, that shut him up.
2019-09-20 23:10:53 -04:00
06328840c3 lang/org: split compound condition into two :when's 2019-09-15 19:23:06 -04:00
c3997730dd lang/org: rebind zn to org-tree-to-indirect-buffer
To match global behavior of zn (narrow in indirect buffer).
2019-09-13 00:28:08 -04:00
d3b1ef72c2 Use org-startup-indented instead of mode hook 2019-09-12 14:04:38 -07:00
1c05773c39 General, minor refactors & comment revision 2019-09-11 23:41:08 -04:00
6f6e30c428 ui/popup: refactor org hacks
This removes a few popup advice functions that are no longer necessary
and changes how we handle org agenda windows (they're now displayed in
the current window, rather than a popup -- see org-agenda-window-setup
to change this).

Other issues addressed:

+ Fixes 'Attempt to delete main window of frame' errors when using
  org-todo from popups (particularly in daemon Emacs).
+ Removed the custom 'popup-window options for org-agenda-window-setup
  and org-src-window-setup, and change them to 'current-window and
  'other-window, respectively.
2019-09-10 14:54:13 -04:00
a3a73bd316 Handle non-string/symbol langs in babel lazy loader
Possibly addresses #1745
2019-09-08 20:55:21 -04:00
1031adb6af lang/org: remove redundant variables
Many of these settings are redundant with their defaults.
2019-09-05 13:12:44 -04:00
05ab672ef9 Merge pull request #1732 from UndeadKernel/feature_sp-org
lang/org: smarter smartparens in org src blocks
2019-09-02 00:46:44 -04:00
521ff7ac1a lang/org: smarter smartparens in org src blocks
While point is in a babel src block, do not autoexpand emphasis markers.
2019-08-29 15:43:53 +02:00
7727920629 Rewrite doom/reload 2019-08-28 15:19:58 -04:00
16b1456192 lang/org: fix new filepath defaults
...if org is loaded before the module.
2019-08-28 12:40:59 -04:00
08dd489a93 lang/org: correct/expand keybinding comments 2019-08-27 00:13:04 -04:00
823aa91aa2 lang/org: update org-modules
Modules have had their org- prefic renamed to ol-.
2019-08-15 21:14:21 -04:00
504a590ad6 Add org-mode keybindings
Add bindings for adding attachments and setting properties
in org-mode.
2019-08-15 02:37:30 +02:00
30d5eff10a lang/org: optimize smartparens rule for headings 2019-08-07 17:03:16 -04:00
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
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
00a4701b16 lang/org: org-export-with-smart-quotes = t 2019-07-29 03:18:38 +02:00
09d13fd60d Use add-hook! for inline hook defuns 2019-07-27 02:46:49 +02:00
a3e262c7ac 💥 Refactor add-hook! macro & change arg order
This update may potentially break your usage of add-hook! if you pass
the :local or :append properties to it. This is how they used to work:

  (add-hook! :append 'some-mode-hook #'do-something)

Thsoe properties must now follow the hooks, e.g.

  (add-hook! 'some-mode-hook :append #'do-something)

Other changes:
- Various add-hook calls have been renamed to add-hook! because I
  incorrectly assumed `defun` always returned its definition's symbol,
  when in fact, its return value is "undefined" (so sayeth the
  documentation). This should fix #1597.
- This update adds the ability to add multiple functions to hooks
  without a list:

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

- The indentation logic has been changed so that consecutive function
  symbols at indented at the same level as the first argument, but forms
  are indent like a defun.

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

    (add-hook! 'some-mode-hook
      (message "Hello"))
2019-07-26 20:17:29 +02:00
3b9838ed41 lang/org: prevent circular refs in nconc'ed list 2019-07-23 18:05:28 +02:00
dc9766ca37 lang/org: move org version hack to init.el
So that it's visible to external org tools, like org-tangle or the
literate module.
2019-07-23 17:51:35 +02:00
82ae3a73f3 def-advice!->defadvice! & conform to new advice conventions
This commit does two things:

- Renames def-advice! to defadvice!, in the spirit of naming convenience
  macros after the function/macro they enhance or replace.
- Correct the names of advice functions to indicate visibility and
  intent. A public advice function like doom-set-jump-a is meant to be
  used elsewhere. A private one like +dired--cleanup-header-line-a
  shouldn't -- it likely won't work anywhere but the function(s) it was
  made to advise.
2019-07-23 17:24:56 +02:00
76cacb5bfe 💥 Rename def-package! -> use-package!
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.

Also changes def-package-hook! -> use-package-hook!

The old macros are now marked obsolete and will be removed when straight
integration is merged.
2019-07-23 12:50:45 +02:00
879ab3b2f3 Replace incorrect usage of doom-dir with doom-path 2019-07-22 04:20:52 +02:00
0890851e81 lang/org: set org-link-abbrev-alist non-destructively
So prior values aren't overwritten (and shadow these defaults), and also
because, due to the hook order, the attach: link was overwritten by this
setq.
2019-07-22 03:17:00 +02:00
a124c1b993 lang/org: org-enforce-todo-dependencies = t 2019-07-22 02:37:47 +02:00
74f7c58ef1 lang/org: org-highlight-sparse-tree-matches = nil
Helps sparse tree + org-indent-mode cooperate.
2019-07-22 02:37:46 +02:00
ecb43f1a2b lang/org: hide blocked tasks in agenda view 2019-07-22 02:37:46 +02:00
060ede0e2e General, minor reformatting across the board
And an offering of blood to our great lord Byte Compiler-sama.
2019-07-22 02:37:45 +02:00
b90dede1ab 💥 Replace package.el/quelpa with straight #374
There are a few kinks to iron out, but for the most part it's done. Doom
Emacs, powered by straight. Goodbye gnutls and elpa/quelpa issues.

This update doesn't come with rollback or lockfile support yet, but I
will eventually include one with Doom, and packages will be (by default,
anyway) updated in sync with Doom.

Relevant threads: #1577 #1566 #1473
2019-07-22 02:30:40 +02:00
8147bc1aee 💥 lang/org: conform to new name conventions 2019-07-22 02:30:38 +02:00
149b2617b0 💥 revise hook/var fns naming convention (2/2)
This is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:

1. Replace the bar | to indicate a hook function with a -h suffix, e.g.

     doom|init-ui -> doom-init-ui-h
     doom|run-local-var-hooks -> doom-run-local-var-hooks-h

2. And add a -fn suffix for functions meant to be set on variables,
   e.g.

     (setq magit-display-buffer-function #'+magit-display-buffer-fn)

See ccf327f8 for the reasoning behind these changes.
2019-07-22 02:30:38 +02:00
51d3b1b424 💥 revise advice naming convention (1/2)
This is first of three big naming convention updates that have been a
long time coming. With 2.1 on the horizon, all the breaking updates will
batched together in preparation for the long haul.

In this commit, we do away with the asterix to communicate that a
function is an advice function, and we replace it with the '-a' suffix.
e.g.

  doom*shut-up -> doom-shut-up-a
  doom*recenter -> doom-recenter-a
  +evil*static-reindent -> +evil--static-reindent-a

The rationale behind this change is:

1. Elisp's own formatting/indenting tools would occasionally struggle
   with | and * (particularly pp and cl-prettyprint). They have no
   problem with / and :, fortunately.
2. External syntax highlighters (like pygmentize, discord markdown or
   github markdown) struggle with it, sometimes refusing to highlight
   code beyond these symbols.
3. * and | are less expressive than - and -- in communicating the
   intended visibility, versatility and stability of a function.
4. It complicated the regexps we must use to search for them.
5. They were arbitrary and over-complicated to begin with, decided
   on haphazardly way back when Doom was simply "my private config".

Anyhow, like how predicate functions have the -p suffix, we'll adopt the
-a suffix for advice functions, -h for hook functions and -fn for
variable functions.

Other noteable changes:
- Replaces advice-{add,remove}! macro with new def-advice!
  macro. The old pair weren't as useful. The new def-advice! saves on a
  lot of space.
- Removed "stage" assertions to make sure you were using the right
  macros in the right place. Turned out to not be necessary, we'll
  employ better checks later.
2019-07-22 02:27:45 +02:00
c0530202a5 lang/org: restore attach entry in org-link-abbrev-alist 2019-07-20 11:40:03 +02:00
de85f67b7c lang/org: remove redundant attach: link abbreviation 2019-07-14 05:35:51 +02:00
157cb5287e lang/org: enable latex export backend by default #1560
ox.el doesn't eager-load these packages anyway.
2019-07-12 15:42:26 +02:00
eb7d4bf0e8 lang/org: lazyload babel src highlighters packages
E.g. ob-*.el, if any
2019-07-10 19:30:56 +02:00
92dd66f736 lang/org: refactor & reformat
To ensure that users' after! blocks have precendence over org packages
in sub-modules.
2019-07-08 22:08:59 +02:00
e645185907 Set org-crypt vars sooner
In :init rather than :config, so users' (after! org-crypt ...) blocks
take precedence.
2019-07-08 21:17:04 +02:00
d2991930ae lang/org: minor refactor
- Set file variables sooner
- Change org-tags-exclude-from-inheritance additively, rather than
  destructively
2019-07-08 11:58:58 +02:00
fbf58aac8c lang/org: add +org|init-export to org-load-hook #1535 2019-07-03 16:37:48 +02:00
768ed10dc3 lang/org (babel): sys.print -> console.log
Update ob-js's wrapper for js babel blocks. sys.print was deprecated and
removed in later versions of node.
2019-06-30 02:27:37 +02:00
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
67b6c44939 Enable show-trailing-whitespace globally
The variable is buffer-local and must be set with setq-default instead.

Also adds doom|{enable,disable}-show-trailing-whitespace hooks.
2019-05-17 01:58:08 -04:00
d057d45ef2 lang/org: remove link markup in eldoc breadcrumbs 2019-05-15 16:42:45 -04:00
77905d9815 fix command to set tags 2019-05-13 10:40:43 +02:00
c4a9de5361 lang/org: add new toggle keybinds to localleader
Also sorts existing keybinds.
2019-05-12 01:46:29 -04:00
ea50d0628f adding keybindings for set tags 2019-05-10 15:03:29 +02:00