1
0
Fork 0

refactor(emacs): remove ocamlconfig.el and pdfconfig.el

Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
Lucas Sta Maria 2024-11-03 18:57:42 -05:00
parent 515953242d
commit 54f5683b3b
No known key found for this signature in database
GPG key ID: F07FB16A826E3B47
4 changed files with 33 additions and 46 deletions

View file

@ -4,6 +4,28 @@
;; development experience and productivity.
;;; Code:
(defun pdf-download-and-view (&optional url filename)
"Download and view the PDF given by its URL as FILENAME."
(interactive)
(let* ((url (or url
(read-string "Download URL: ")))
(default-filename (or filename
(car (last (split-string url "/" t)))))
(filename (or filename
(read-string (format "Filename (%s): " default-filename)
nil
nil
default-filename)))
(file-path (concat "/tmp/" filename))
(download-buffer (url-retrieve-synchronously url)))
(set-buffer download-buffer)
(goto-char (point-min))
(re-search-forward "^$" nil 'move)
(forward-char)
(delete-region (point-min) (point))
(write-file file-path)
(find-file (expand-file-name file-path))))
(use-package projectile :straight t
:custom
(projectile-completion-system 'auto)
@ -31,7 +53,12 @@
(use-package pdf-tools
:straight
'(pdf-tools :type git :host github
:repo "vedang/pdf-tools"))
:repo "vedang/pdf-tools")
:custom
(doc-view-resolution 300)
(pdf-view-continuous t)
:init
(pdf-tools-install))
(use-package olivetti :straight t
:hook (org-mode . olivetti-mode))