Commit graph

70 commits

Author SHA1 Message Date
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
36d186d1cd Fix #4665: don't close annotation window on ESC 2021-07-08 21:42:13 -04:00
Henrik Lissner
38bc1ab81a Bump :tools pdf
vedang/pdf-tools@d262cf9 -> vedang/pdf-tools@5f77dae

Fixes #4989: remove local hacks for retina support in favor of upstream
fixes.
2021-07-06 02:32:26 -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
Samuel Jackson
bb677cf7a5 Prevent extra variable from being passed in macro.
In the PDF module, there is a macro that is used to prevent the
file-too-big prompt for PDFs since they're always too big. However, this
macro has an extra variable listed that then gets passed on to the
wrapped function and causes an error if the function doesn't support the
extra variable.

This fix simply checks if the extra value is present or not and only
calls the wrapped function with it if is actually present. After all,
the variable will still be nil even if nil isn't passed.
2021-07-04 14:59:29 -07:00
Henrik Lissner
f604ce6d01 Minor refactors & reformatting 2021-05-25 10:35:21 -04:00
Henrik Lissner
daa50557a4 tools/pdf: leave it to user to build epdfinfo
Trying to do this automatically is buggy to the point of insanity. It's
not reliable enough to use as a :post-build target for the pdf-tools
package.

Better to fail gracefully, let the user know what they must do, and let
them do it at their own discretion.
2021-05-25 00:11:58 -04:00
Henrik Lissner
eb9b7b0bbc tools/pdf: build epdfinfo when pdf-tools is built
This fixes a number of UX issues with pdf-tools trying to eagerly build
epdfinfo at the least appropriate times, e.g. when org-mode processes
org-pdf-tools links.

Mentioned in #5086
2021-05-24 13:34:24 -04:00
Henrik Lissner
ea9753a5f2 Fix #4989: pdf scaling on retina displays 2021-05-09 20:51:15 -04:00
Henrik Lissner
437f122969 tools/pdf: suppress "file is large" prompts for pdfs 2021-04-15 14:19:18 -04:00
Henrik Lissner
ba0ddb71ee Reload pdfs when pdf-view-midnight-colors changes
Co-authored-by: tecosaur <tec@tecosaur.com>
2021-03-22 21:11:22 -04:00
Henrik Lissner
a5af17b6aa
Fix #4397: call pdf-tools-install-noverify
So pdf-tools has a chance to set up its hooks.
2020-12-09 17:17:22 -05:00
Henrik Lissner
f11979ed76
tools/pdf: only prompt to build epdfinfo once
Fixes regression mentioned in #1788
2020-12-05 15:16:52 -05:00
Henrik Lissner
7038c2e800
Fix #3244: rewrite how pdf-tools builds epdfinfo 2020-11-30 23:35:03 -05:00
Henrik Lissner
0f3226558f
tools/pdf: add saveplace-pdf-view package 2020-11-27 22:20:51 -05:00
Henrik Lissner
ee6b7c0e81
tools/pdf: minor reformatting 2020-11-25 12:29:53 -05:00
Henrik Lissner
8914b7b8ab
Fix #4299: refactor retina support for pdfs 2020-11-25 12:29:31 -05:00
Henrik Lissner
3a38fc633c
Change doom-{interactive,debug}-mode suffix to -p
Because these are not really modes.

Also makes `doom-debug-mode` an actual (global) minor mode.
2020-05-25 03:43:40 -04:00
Henrik Lissner
ea18c83c0a
General refactors & reformatting across the board 2020-05-15 01:44:53 -04:00
Henrik Lissner
92174200aa
Prevent pdf page being persisted too many times 2020-05-14 00:07:26 -04:00
Henrik Lissner
272d8867af
Rename file to store last pdf page
Creating a new convention for Doom modules: values stored with the
`doom-store` library should be kept in a file named after the package
that uses it.
2020-05-11 22:12:12 -04:00
Henrik Lissner
84dce5d4ea
Persist current page number for PDFs 2020-05-11 03:00:08 -04:00
Henrik Lissner
d12752324a
Introduce letf! convenience macro
A more succinct cl-letf, which allows for local functions and macros.
2020-04-29 23:48:21 -04:00
Henrik Lissner
4431eac0ab
Fix void-function: pdf-tools-install-noverify
For folks who try `M-x pdf-tools-install` at startup instead of simply
loading a pdf file.
2020-04-23 13:04:03 -04:00
Henrik Lissner
e0f8fbee22
Fix #2939: pdf-tools config not triggered on pdf-view-mode
Because pdf-view can load without pulling in pdf-tools.

Closes #2954
2020-04-22 15:50:17 -04:00
Henrik Lissner
82e45e756d
Don't disable cua-mode in pdf-view-mode
This mode is global. We can't pretend it's buffer local.
2020-03-25 22:44:25 -04:00
How Si Wei
8c6efb71cb Fix pdf-outline error 2020-01-12 15:38:03 +08:00
Henrik Lissner
6f31d774b9
Show the pdf compilation window while its building
Even if its output isn't entirely visible (because it redraws once a
second), this is better feedback that something is going on.
2019-12-28 21:28:07 -05:00
Henrik Lissner
9664f68c5f
tools/pdf: minor refactor & reformat 2019-12-17 18:10:25 -05:00
Henrik Lissner
ac17c468d2
tools/pdf: revise comments 2019-09-27 12:05:48 -04:00
Henrik Lissner
62711489df
tools/pdf: run pdf-tools-install-noverify after init 2019-09-26 15:04:25 -04:00
Henrik Lissner
a940f56fb4
tools/pdf: fix 1826
Error occurs if pdf-annot is never loaded before kill-buffer hook runs.
2019-09-26 14:26:47 -04:00
Henrik Lissner
ece174d9ed
tools/pdf: document pdf-tools-install hackery 2019-09-26 14:26:47 -04:00
Henrik Lissner
fccafff291
tools/pdf: install epdfinfo on load #1788
Reverses 4f7bf8b
2019-09-20 01:19:40 -04:00
Henrik Lissner
d5ecfd3429
Move pdf-tools popup rules to tools/pdf 2019-09-19 18:55:44 -04:00
Henrik Lissner
a0826447f5
tools/pdf: refactor retina support advice #1667 2019-09-19 18:39:09 -04:00
Henrik Lissner
4f7bf8b976
tools/pdf: don't install pdf-tools on load
Now that pdf-tools-install compiles epdfinfo asynchronously, pdf files
are loaded before it is finished, yielding errors while pdf-view-mode
initializes. There is currently no effective workaround;
pdf-tools-install must be executed manually.
2019-09-15 16:16:46 -04:00
Alexander Fu Xi
6c4d8cd408 tools/pdf: display retina images on Emacs NS-port #1667
* Advice pdf-tools to display retina image on Mac
* Apply to other functions
* hotfix
* remove redundant advice
2019-08-27 00:36:20 -04:00
Henrik Lissner
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
Henrik Lissner
38d06446ba
tools/pdf: conform to new conventions 2019-07-23 00:00:08 +02:00
Siddharth Shekar
aa64cf9426 Replace kill-this-buffer with kill-current-buffer
As per the documentation for kill-this-buffer, it should only be invoked
from the menu and behaves unpredictably when invoked programmatically.
2019-05-30 18:54:58 -07:00
Henrik Lissner
7c9e96da87
General module refactor 2019-03-02 02:04:11 -05:00
Henrik Lissner
8832737671
Adopt seagle0128/doom-modeline for :ui modeline
And remove obsolete :ui doom-modeline module.

Relevant to: #136, #921
2019-03-02 01:34:14 -05:00
Henrik Lissner
36a97b28aa
Fix flickering PDFs in pdf-view-mode #1107 2019-01-22 19:29:13 -05:00
Sean Farley
6f0d01a29e pdf: remove doom-leader-key from define-key!
This is no longer needed now that doom uses general.el.
2019-01-07 14:01:19 -08:00
UndeadKernel
4036f3dad1 pdf-tools: fixes for the new modeline module
Sneak in a comment that addresses some TODOs.
2019-01-02 15:16:05 +01:00
UndeadKernel
239c183b70 tools/pdf: recognize modeline and doom-modeline 2018-09-26 12:55:22 +02:00
Henrik Lissner
20cf412c96
tools/pdf: revert fd7f498
Causes an issue where cursor invisibility persists through a workspace
session restore.

Relevant to #892
2018-09-21 10:47:26 -04:00
Henrik Lissner
fd7f498858
tools/pdf: hide cursor in pdf-view-mode #892 2018-09-19 19:27:46 -04:00
Henrik Lissner
df233eb1a9
lang/pdf: fix compatibility with +new modeline 2018-07-29 17:41:58 +02:00