Skip to content

Instantly share code, notes, and snippets.

bdarcus / .emacs
Last active Oct 3, 2022 — forked from DogLooksGood/.emacs
Meow dot emacs
View .emacs
(require 'package)
(setq package-selected-packages
View oref-ocite.el
(defun org-ref-to-org-cite ()
"Attempt to convert org-ref citations to org-cite syntax."
; adapted from,code--4
(let* ((cite-conversions '(("cite" . "//b") ("Cite" . "//bc")
("nocite" . "/n")
("citep" . "") ("citep*" . "//f")
("parencite" . "") ("Parencite" . "//c")
("citeauthor" . "/a/f") ("citeauthor*" . "/a")
("citeyear" . "/na/b")
View latex-cmd-oc-style.el
(require 'oc-biblatex)
(defcustom style-select-latex-commands t
"Whether to use latex commands for style selection."
:group 'style
:type '(boolean))
(defun style-latex-alist (&optional swap)
"Return org-cite-biblatex-styles as alist.
By default, each car is the latex command, and the cdr the
bdarcus / latex-style.el
Last active Apr 20, 2022
experiment with an org-cite style select UI that optionally presents biblatex commands for completion instead
View latex-style.el
;; (org-cite-parse-objects "[cite:@doe]")
(require 'oc-biblatex)
(defcustom style-ui 'csl
"Style select UI; each with a preview."
:type '(choice (const :tag "CSL output" 'csl)
(const :tag "biblatex commands" 'biblatex)
(const :tag "natbib commands" 'natbib)))
View citar-one-file-for-notes.el
(require 'citar)
(defvar bibtex-note-org-property "Key"
"The org-mode property which BibTeX keys are attached to")
(defun get-first-citar-notes-path ()
"Return 'citar-notes-paths' if it is a string, or its car
if it is a list (as 'citar' normally expects)"
(cond ((stringp citar-notes-paths) citar-notes-paths)
((listp citar-notes-paths) (car citar-notes-paths))
bdarcus / csl-recipe.yaml
Last active Dec 6, 2021
possible csl recipe format more distributed style development?
View csl-recipe.yaml
title: The ABC Journal Style
fields: [foo, bar]
repo: foo/style
url: htps://
bdarcus / citar-hydra.el
Last active Sep 11, 2022
how to create a hydra for use with citar, and org-cite "follow processor" that uses it
View citar-hydra.el
(require 'org-element)
(require 'pretty-hydra)
(require 'oc)
(require 'citar)
(require 'citar-org)
(declare-function 'org-cite-register-processor "ext:oc")
;; define some interactive functions for the hydra
bdarcus / academic.el
Created Nov 29, 2021 — forked from rka97/academic.el
Configuration I use in Doom Emacs as part of my academic reading/notetaking workflow
View academic.el
;; The following packages are needed:
;; 1. elfeed and elfeed-score (available from the rss doom module)
;; 2. citar
;; 3. org-ref
;; 4. org-roam and org-roam-bibtex
(defconst robo/bib-libraries (list "~/bib-lib/robo-lib.bib" "~/bib-lib/robo-temp-lib.bib")) ; All of my bib databases.
(defconst robo/main-bib-library (nth 0 robo/bib-libraries)) ; The main db is always the first
(defconst robo/main-pdfs-library-paths `("~/bib-lib/pdfs/" "/home/robo/bib-lib/temp-pdfs/")) ; PDFs directories in a list
View citar-hydra.el
;;; citar-hydra.el --- Description -*- lexical-binding: t; -*-
;;; Code:
(require 'org-element)
(require 'hydra)
(require 'transient)
(require 'citar)
(require 'citar-org)
(defun citar-hydra-key-finder ()
bdarcus /
Created Oct 26, 2021 — forked from gnarf/
git pr - Global .gitconfig aliases for Pull Request Managment


Either copy the aliases from the .gitconfig or run the commands in


Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out