Setup org-protocol-capture-html
This commit is contained in:
parent
0856ae827f
commit
2999379607
|
@ -7,6 +7,8 @@
|
|||
# For graph generation
|
||||
graphviz
|
||||
sqlite
|
||||
# For latex editing
|
||||
texlive.combined.scheme-medium
|
||||
];
|
||||
|
||||
# Utilize home-manager
|
||||
|
@ -17,8 +19,33 @@
|
|||
programs.doom-emacs = {
|
||||
enable = true;
|
||||
doomPrivateDir = ../doom.d;
|
||||
emacsPackagesOverlay = self: super: {
|
||||
org-protocol-capture-html = self.trivialBuild {
|
||||
pname = "org-protocol-capture-html";
|
||||
ename = "org-protocol-capture-html";
|
||||
version = "0.0.0";
|
||||
buildInputs = [ self.s ];
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "alphapapa";
|
||||
repo = "org-protocol-capture-html";
|
||||
rev = "3359ce9a2f3b48df26329adaee0c4710b1024250";
|
||||
hash = "sha256-ueEHJCS+aHYCnd4Lm3NKgqg+m921nl5XijE9ZnSRQXI=";
|
||||
};
|
||||
};
|
||||
};
|
||||
emacsPackage = pkgs.emacsPgtkNativeComp;
|
||||
};
|
||||
# Configure org protocol handler
|
||||
home.packages = (with pkgs; [
|
||||
(makeDesktopItem {
|
||||
name = "org-protocol";
|
||||
exec = "emacsclient %u";
|
||||
comment = "Org protocol";
|
||||
desktopName = "org-protocol";
|
||||
type = "Application";
|
||||
mimeTypes = [ "x-scheme-handler/org-protocol" ];
|
||||
})
|
||||
]);
|
||||
# Startup service
|
||||
services.emacs = {
|
||||
enable = pkgs.stdenv.isLinux;
|
||||
|
|
|
@ -144,11 +144,10 @@
|
|||
(setq org-hide-emphasis-markers t
|
||||
org-pretty-entities t)
|
||||
|
||||
(font-lock-add-keywords 'org-mode
|
||||
'(("^ *\\([-]\\) "
|
||||
0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "")))
|
||||
("^ *\\([+]\\) "
|
||||
0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "")))))
|
||||
(use-package! org-superstar
|
||||
:hook (org-mode . org-superstar-mode)
|
||||
:config
|
||||
(setq org-superstart-special-todo-items t))
|
||||
|
||||
(defvar nm/org-agenda-files-timer nil
|
||||
"Timer for automatically updating the org-agenda files")
|
||||
|
@ -251,6 +250,15 @@ work if it thinks it needs to."
|
|||
'(("d" "default" entry "* %<%I:%M %p>: %?"
|
||||
:if-new (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n")))))
|
||||
|
||||
(use-package! org-protocol-capture-html)
|
||||
|
||||
(after! org
|
||||
(push
|
||||
'("w" "Web site" entry
|
||||
(file "")
|
||||
"* %a :website:\n\n%U %?\n\n%:initial")
|
||||
org-capture-templates))
|
||||
|
||||
(use-package! magit-todos
|
||||
:hook (magit-mode . magit-todos-mode))
|
||||
|
||||
|
|
|
@ -218,14 +218,13 @@ Setup some basic cosmetic improvements
|
|||
org-pretty-entities t)
|
||||
#+end_src
|
||||
|
||||
Setup font lock for normal (non-heading) list items, to make things a bit more pleasnt to look at
|
||||
Setup org-superstar-mode, to make lists and bullets pretty
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(font-lock-add-keywords 'org-mode
|
||||
'(("^ *\\([-]\\) "
|
||||
0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "")))
|
||||
("^ *\\([+]\\) "
|
||||
0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "")))))
|
||||
(use-package! org-superstar
|
||||
:hook (org-mode . org-superstar-mode)
|
||||
:config
|
||||
(setq org-superstart-special-todo-items t))
|
||||
#+end_src
|
||||
|
||||
Automatically add all files in the org dir to the agenda. This performs some filtering of the files returned from ~directory-files~ to exclude some things that would confuse org-agenda.
|
||||
|
@ -352,6 +351,21 @@ Here we:
|
|||
'(("d" "default" entry "* %<%I:%M %p>: %?"
|
||||
:if-new (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n")))))
|
||||
#+end_src
|
||||
** org-protocol-capture-html
|
||||
[[https://github.com/alphapapa/org-protocol-capture-html][Capture webpages]] really nice like
|
||||
#+begin_src emacs-lisp
|
||||
(use-package! org-protocol-capture-html)
|
||||
#+end_src
|
||||
** Capture Templates
|
||||
The default template for org-protocol-capture-html
|
||||
#+begin_src emacs-lisp
|
||||
(after! org
|
||||
(push
|
||||
'("w" "Web site" entry
|
||||
(file "")
|
||||
"* %a :website:\n\n%U %?\n\n%:initial")
|
||||
org-capture-templates))
|
||||
#+end_src
|
||||
* General Modes
|
||||
** Magit
|
||||
Further configuration for magit
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
(latex +fold) ; writing papers in Emacs has never been so fun
|
||||
markdown ; writing docs for people to ignore
|
||||
nix ; I hereby declare "nix geht mehr!"
|
||||
(org +pandoc +present +pretty +roam2 +pomodoro) ; organize your plain life in plain text
|
||||
(org +pandoc +present +roam2 +pomodoro) ; organize your plain life in plain text
|
||||
raku ; the artist formerly known as perl6
|
||||
rest ; Emacs as a REST client
|
||||
(rust +lsp)
|
||||
|
|
|
@ -60,3 +60,5 @@
|
|||
(package! deadgrep)
|
||||
(package! multi-vterm)
|
||||
(package! grip-mode)
|
||||
(package! org-protocol-capture-html)
|
||||
(package! org-superstar)
|
||||
|
|
Loading…
Reference in New Issue