Commit Graph

31 Commits

Author SHA1 Message Date
ad6a3d0f33 refactor: deprecate featurep! for modulep!
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.
2022-08-14 20:43:35 +02:00
1f4b9b73fc fix(org): org-download-delete and [[download:...]] links
org-download-delete doesn't accommodate a non-standard value for
org-download-link-format. Now it does.

Close: #6202
Co-authored-by: zrquan <zrquan@users.noreply.github.com>
2022-06-21 18:46:26 +02:00
051087d716 fix(org): don't error org-download at top level
Org-attach (and thus org-download) can work before the first headline if
the user sets `org-attach-auto-tag` to `nil`. But when inserting files
in this situation, this advice will display an error message due to
using `org-back-to-heading`. So I think it makes more sense to use
`org-back-to-heading-or-point-min`.
2022-02-09 04:54:22 +01:00
ce2cabf07e Autoload org-download-clipboard #3830 2020-08-25 06:07:47 -04:00
47571446b9 Use org-download-dnd instead of inhouse dnd handler
Possibly fixes #3056
2020-05-08 01:27:08 -04:00
8c1525e3d8 Rewrite org-download/attach systems
+ Cut down on unnecessary code & advice
+ Fix 'attach and 'download methods for org-download so that a) their
  links actually work and b) inline previews of their links show up.
+ Allow users to only set org-attach-id-dir (which will be mirrored to
  org-download-image-dir, unless the user has changed it).
+ Prevent a few edge cases where org-attach-id-dir or
  org-download-image-dir were blank.
2020-04-25 01:27:25 -04:00
adbe9041ce Fix inline previews for download:* links 2020-04-25 01:24:48 -04:00
903460cd10 Base org-download links off of org-download-image-dir 2020-04-24 21:22:12 -04:00
211519270a Resolve org download links relative to org-download-image-dir 2020-04-24 20:45:43 -04:00
6159068b4d Rewrite custom org link types
This should fix a few issues with links (like org-download links)
resolving to the incorrect org-directory or org-id-attach-dir (because
it's resolved too early).

I've also simplified and refactored the API to make it easier to grok.
2020-04-24 20:41:56 -04:00
06d5d5e6c0 General refactors, reformatting & comment revision 2020-04-23 23:56:17 -04:00
141a649e04 Revert afca8f14a
Fix #2932
2020-04-18 12:51:00 -04:00
afca8f14a1 Fix image previews for download:* org links 2020-04-15 23:47:14 -04:00
18d7064384 Add default gnome support for org +dragndrop
By default Gnome based distros (like Ubuntu) have `gnome-screenshot`
installed. This change modifies `+dragndrop` to support gnome-screenshot
by default.
2020-03-28 10:15:41 +00:00
7d71584a8d s/org-attach-directory/org-attach-id-dir
The former is deprecated.

Reported by @myshevchuk in 90ec41c
2020-03-27 22:23:20 -04:00
90ec41c994 Merge pull request #2721 from jsravn/fix-org-download-screenshot
Fix inserted filename for org-download-screenshot
2020-03-27 01:58:38 -04:00
0fb1026886 dragndrop: insert #+attr_org: :width if specified 2020-03-23 19:19:55 +01:00
365a481bc5 Fix inserted filename for org-download-screenshot 2020-03-14 16:07:25 +00:00
beb7a40a84 Fix inline previews for "download:%s" org links #2539 2020-02-19 18:21:24 -05:00
b9f823bfa2 Autoload org-download-{yank,screenshot}
Fixes #2429
2020-01-27 17:04:29 -05:00
827225e331 Fix #2429: replace defunct attach: links w/ download:
Forgot that support for attach: links were removed some time ago, but I
still want short org-download links, so I've added 'download:' links.
2020-01-26 02:20:39 -05:00
14cf97e594 lang/org: use org-attach instead of custom system
- Adds more keys under `<localleader> a`
- Reconfigures org-download to use org-attach system
- Make org-id-track-globally = t a global default now (not just for
  org-brain)
- Renamed +org-init-centralized-attachments-h to +org-init-attachments-h
- org-attach-store-link-p = t (stores a link to an attachment when it is
  attached)
- org-attach-use-inheritance = t (inherit attachment properties from
  parent nodes)
2019-12-29 16:31:25 -05:00
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
1694641636 lang/org: minor refactor of contrib submodules 2019-10-20 19:57:28 -04: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
1e318f7148 Fix wrong-type-arg +org-dragndrop-download-dnd error
Whoops! I was treating appendq! like pushnew!
2019-07-22 04:27:01 +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
8147bc1aee 💥 lang/org: conform to new name conventions 2019-07-22 02:30:38 +02:00
468e630110 lang/org: refactor contrib modules
- Fix #1546
- Ensure contrib modules aren't included in byte-compilation/autoload
  generation if their requisite flags aren't enabled
2019-07-09 22:44:51 +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