Commit Graph

25 Commits

Author SHA1 Message Date
Henrik Lissner
1f8bf7accb merge: rewrite-docs
I've omitted docs/*.org from this merge, as there is still work left to
do there, but I am pushing the module docs early so folks can benefit
from the new docs sooner.
2022-08-03 03:27:50 +02:00
Henrik Lissner
54d8c49d8b refactor(file-templates): suppress in indirect buffers
Change how we detect and suppress file template expansion in org-capture
buffers (which are indirect clones). Since 99.99% of the time, an
indirect clone means we're doing something special in that buffer, it
seemed sensible to always suppress file templates in them. Hopefully
this will be more robust than the former advice.
2022-03-21 03:57:02 +01:00
Ian Kerins
893b4171b7 tweak(file-templates): remove default JSON template
As described at https://www.json.org/json-en.html, JSON has multiple
top-level forms (at least objects and arrays, and potentially all values
as well, depending on who you ask). Of these, I would not say array is a
good default. I frequently find myself deleting this default, generally
to use an object instead.

Because there is no consistent winner, and because the template is so
trivial, it seems best to simply delete it: the cost of the template not
matching the user's intent outweighs any benefit it stands to deliver
when it does match the user's intent.
2022-03-19 16:14:53 +01:00
Henrik Lissner
0aad1399cc refactor(file-templates): doom readme templates
Including readme template for categories.
2021-11-21 20:04:28 +01: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
da54fa98ce Fix #4271: prevent file-templates in org-capture 2020-11-14 12:57:29 -05:00
Henrik Lissner
8da2472bb4 Inhibit file templates in org-journal-mode 2020-06-04 20:13:29 -04:00
Henrik Lissner
8bf902d5f4 General refactors & reformatting across the board 2020-06-04 20:13:28 -04:00
Tyler Ware
3a4c83ec3b Fix file template :when logic to apply to modes
When a file template rule is evaluated against a particular buffer it is
supposed to call the :when function if it is defined. Currently, the
function is ignored if the PRED of the template rule is a mode. This
fixes this issue.
2020-02-26 10:45:14 -07:00
Henrik Lissner
037bcf3c12 Fix #2568: change when file-templates are expanded 2020-02-20 17:24:16 -05:00
Mark Martinez
7b40e80a8f Fix +file-template-p to use :when keyword 2020-02-13 23:32:27 -06:00
Henrik Lissner
d0b50da2c4 Add elisp package file-template 2020-01-20 19:31:36 -05:00
Henrik Lissner
0c9f1b1a9c Minor refactors & comment revision 2020-01-11 17:27:04 -05:00
Henrik Lissner
fd00870ae8 Fix #1401 2019-10-31 20:51:20 -04:00
Henrik Lissner
3f759dde23 Optimize file-template find-file hook function 2019-10-25 20:25:20 -04:00
Henrik Lissner
8f1de7c998 Fix #1694: wrong-type-arg stringp errors on some files 2019-08-21 21:17:42 -04:00
Henrik Lissner
fb619bdb0f Only trigger file-templates for non-existent files #1682
Possibly addresses #1401 too
2019-08-19 14:18:17 -04:00
Henrik Lissner
c795a988e6 Conform many modules to new conventions 2019-07-23 12:30:47 +02:00
Henrik Lissner
0625bf87d6 Add a nxml-mode file template 2019-07-18 03:41:47 +02:00
Henrik Lissner
c2fe951062 Add direnv-envrc-mode file template 2019-07-10 02:27:13 +02:00
Henrik Lissner
5662b2c4b3 Add shell.nix file-template 2019-07-08 14:36:38 +02:00
Henrik Lissner
c3d48e286b Add nix-mode file template 2019-06-27 21:35:53 +02:00
Henrik Lissner
c0bffd4268 editor/file-templates: general refactor 2019-06-18 00:29:05 +02:00
Henrik Lissner
21cf1c2da6 editor/file-templates: fix #1401
org-capture, when used on a target that doesn't exist, will invisibly
expand a file template, leaving a hang yasnippet active. After
org-capture initializes, the yasnippet will attempt to operate on
overlays that don't exist, throwing overlayp errors.
2019-06-18 00:21:26 +02:00
Henrik Lissner
77e4cc4d58 💥 Remove :feature category
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:

- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces

More potential changes in the future:

- A new :term category for terminal emulation modules (eshell, term and
  vterm).
- A new :os category for modules dedicated to os-specific functionality.
  The :tools macos module would fit here, but so would modules for nixos
  and arch.
- A new :services category for web-service integration, like wakatime,
  twitter, elfeed, gist and pastebin services.
2019-04-24 18:16:04 -04:00