profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/bdarcus/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

bdarcus/bibtex-actions 72

A package to quickly find and act on bibtex entries using default Emacs completion; especially selectrum/vertico with embark.

andras-simonyi/citeproc-el 32

A CSL 1.01 Citation Processor for Emacs.

bdarcus/citeproc-py-DEAD 10

A (experimental, now dead) python implementation of CSL.

bdarcus/citeproc-rb 8

a Ruby implementation of the Citation Style Language (CSL)

bdarcus/bibo-in-html 4

Some examples of how to encode BIBO RDF as RDFa

bdarcus/bibmaps 2

simple json hashes to define mappings to csl data model

bdarcus/bibo-py 2

An rdf-object mapping for bibliographic data.

bdarcus/courses-intro-human-geography 2

Course content for an introduction to human geography course.

bdarcus/atomic-csl 1

An Atom package providing a validating editing environment for CSL style editing

issue commentbdarcus/bibtex-actions

rewrite bibtex-actions-insert-citation

The candidates list should be augmented with a suffix like \cite[prenote][postote]{key1,key2} to indicate which arguments will be prompted for. But you also want the duplicated options for the same command with and without prompting for optional args which I feel clutters the list and makes you scroll more while dismissing the prompt for optional args is just a RET which seems better to me. But that aspect can be made configurable.

I'm not totally following (maybe at some point screenshots would help?). By "suffix" do you mean an annotation or affixation?

And does this support my question above about different logic for natbib/bibtex vs biblatex?

bdarcus

comment created time in 28 minutes

issue commentbdarcus/bibtex-actions

rewrite bibtex-actions-insert-citation

Yes.

That reminds me:

Do we need to consider different logic for bibtex/natbib and biblatex/pandoc, given the the latter allows affixes (pre/post) per reference, and the former does not?

bdarcus

comment created time in 7 hours

issue commentbdarcus/bibtex-actions

rewrite bibtex-actions-insert-citation

ideally there would be an embark action that allows this in 1 step ...

Can you say more about this? How would that work?

bdarcus

comment created time in 17 hours

issue openedbdarcus/bibtex-actions

WTD with `insert-entry`, `insert-reference`, `add-PDF-attachment` and `add-pdf-to-library`?

What is left now is insert-entry, insert-reference, add-PDF-attachment and add-pdf-to-library. For all of these I am unsure how to go about them.

Originally posted by @aikrahguzar in https://github.com/bdarcus/bibtex-actions/issues/307#issuecomment-928041463

created time in a day

startedryanjgallagher/focalevents

started time in a day

push eventbdarcus/bibtex-actions

Matt Price

commit sha 7f0781ec446b5ca653e10cabe1126c909a7d8ecc

docs: add info about function forms (#309)

view details

push time in a day

PR merged bdarcus/bibtex-actions

add brief documentation about function forms

It took me a while to figure this out on my own, so I thought it would be helpful to have it documented somewhere. README might be more appropriate.

+47 -2

1 comment

1 changed file

titaniumbones

pr closed time in a day

pull request commentbdarcus/bibtex-actions

add brief documentation about function forms

Thanks.

titaniumbones

comment created time in a day

push eventtitaniumbones/bibtex-actions

Bruce D'Arcus

commit sha 9c1bb657e9654dc41890823400d461ab3c058328

Update CONTRIBUTING.org

view details

push time in a day

Pull request review commentbdarcus/bibtex-actions

add brief documentation about function forms

 I imagine it will stay pretty simple and stable, and that enhancements will focu Otherwise, I expect most innovations to focus on configuration details laid out on the wiki. You should feel free to add your ideas there. -You can of course write your own functions that rely on =bibtex-actions-read=, but if you want to share it more widely, you should consider submitting it for inclusion in [[https://github.com/tmalsburg/helm-bibtex][bibtex-completion]]. itself.- If you do submit a PR, details:  - Follow the [[https://github.com/bbatsov/emacs-lisp-style-guide][elisp style guide]]. - If the CI flags any errors or warnings, which it will report on the "files" tab, please fix them. - For working on lists and such, we primarily use the =seq= functions, and would like to remove the dependence on =s= and =bibtex-completion= in general.+++** Extending bibtex-actions++Most user-accessible bibtex-actions  functions take an argument ~key-entry~ or ~keys-entries~. These expect, respectively, a cons cell of a citation key (a string like "SmithWritingHistory1987") and the corresponding bibliography entry for that citation, or a list of such cons cells.  If you wish to extend bibtex-actions at the user-action level, perhaps by adding a function to one of the embark keymaps, you will find it easiest to reproduce this pattern.  If you need to build the cons cells manually, this can be accomplished via ~bibtex-actions--get-entry~.  So, for example, to insert the annotations from a pdf into a buffer, the following pair of functions might be used:
Most user-accessible bibtex-actions functions take an argument ~key-entry~ or ~keys-entries~.
These expect, respectively, a cons cell of a citation key (a string like "SmithWritingHistory1987") and the corresponding bibliography entry for that citation, or a list of such cons cells.
If you wish to extend bibtex-actions at the user-action level, perhaps by adding a function to one of the embark keymaps, you will find it easiest to reproduce this pattern.
If you need to build the cons cells manually, this can be accomplished via ~bibtex-actions--get-entry~.
So, for example, to insert the annotations from a pdf into a buffer, the following pair of functions might be used:

Just changing to one-sentence-per-line.

titaniumbones

comment created time in a day

PullRequestReviewEvent

issue openedbdarcus/bibtex-actions

rewrite bibtex-actions-insert-citation

We need feedback on this, particularly from latex and pandoc citation users.

As part of #246, @aikrahguzar is working on #307 to redo the insert commands to remove the bibtex-completion dependency.

This also means room to change how they work.

Feedback?

created time in a day

Pull request review commentbdarcus/bibtex-actions

Towards removing bibtex-completion dependency + misc changes

+;;; bibtex-actions-latex.el --- Latex adapter for bibtex-actions -*- lexical-binding: t; -*-+;;+;; Copyright (C) 2021 Bruce D'Arcus+;;+;; Author: Bruce D'Arcus <https://github.com/bdarcus>+;; Maintainer: Bruce D'Arcus <https://github.com/bdarcus>+;; Created: February 27, 2021+;; License: GPL-3.0-or-later+;; Version: 0.4+;; Homepage: https://github.com/bdarcus/bibtex-actions+;; Package-Requires: ((emacs "26.3"))+;;+;; This file is not part of GNU Emacs.+;;+;; This program is free software: you can redistribute it and/or modify+;; it under the terms of the GNU General Public License as published by+;; the Free Software Foundation, either version 3 of the License, or+;; (at your option) any later version.++;; This program is distributed in the hope that it will be useful,+;; but WITHOUT ANY WARRANTY; without even the implied warranty of+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the+;; GNU General Public License for more details.++;; You should have received a copy of the GNU General Public License+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.+;;+;;; Commentary:+;;+;; A small package that provides the functions required to use bibtex-actions+;; with latex.+;;+;; Simply loading this file will enable manipulating the citations with+;; commands provided by bibtex-actions.+;;+;;; Code:++(require 'bibtex-actions)+(require 'tex)+(require 'reftex)++(defcustom bibtex-actions-latex-cite-commands+  '((("cite" "Cite" "parencite"

Could just not worry about it now, and iterate once we have a starting point?

aikrahguzar

comment created time in 2 days

PullRequestReviewEvent

Pull request review commentbdarcus/bibtex-actions

Towards removing bibtex-completion dependency + misc changes

+;;; bibtex-actions-latex.el --- Latex adapter for bibtex-actions -*- lexical-binding: t; -*-+;;+;; Copyright (C) 2021 Bruce D'Arcus+;;+;; Author: Bruce D'Arcus <https://github.com/bdarcus>+;; Maintainer: Bruce D'Arcus <https://github.com/bdarcus>+;; Created: February 27, 2021+;; License: GPL-3.0-or-later+;; Version: 0.4+;; Homepage: https://github.com/bdarcus/bibtex-actions+;; Package-Requires: ((emacs "26.3"))+;;+;; This file is not part of GNU Emacs.+;;+;; This program is free software: you can redistribute it and/or modify+;; it under the terms of the GNU General Public License as published by+;; the Free Software Foundation, either version 3 of the License, or+;; (at your option) any later version.++;; This program is distributed in the hope that it will be useful,+;; but WITHOUT ANY WARRANTY; without even the implied warranty of+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the+;; GNU General Public License for more details.++;; You should have received a copy of the GNU General Public License+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.+;;+;;; Commentary:+;;+;; A small package that provides the functions required to use bibtex-actions+;; with latex.+;;+;; Simply loading this file will enable manipulating the citations with+;; commands provided by bibtex-actions.+;;+;;; Code:++(require 'bibtex-actions)+(require 'tex)+(require 'reftex)++(defcustom bibtex-actions-latex-cite-commands+  '((("cite" "Cite" "parencite"

I don't really use LaTeX citations directly anymore, so take my questions/feedback with suitable grain-of-salt ...

I know this is how this is often implemented; as a flat list of commands.

But in practice, not all commands are the same; that their relevance depends on which system one is using; for example, natbib vs biblatex.

If you're using one, do you really want to have access to the long list of options compared to the other?

Also, I don't know if there's any value in cross-fertilizing ideas, because org-cite is more general than latex, but here's what the current org-cite style selection UI looks like by default, using Emacs 28 group-function.

image

aikrahguzar

comment created time in 2 days

PullRequestReviewEvent

issue commentbdarcus/bibtex-actions

Rewrite format-reference to use citeproc-el

Maybe we could move this command out of the main file, and create a new bibtex-actions-citeproc.el file where a revised version could go.

oc-bibtex-actions could then require that.

WDYT @aikrahguzar?

bdarcus

comment created time in 2 days

pull request commentbdarcus/bibtex-actions

Towards removing bibtex-completion dependency + misc changes

PS - seems you're packing a lot into one PR. Can be easier to manage if more focused.

For example, cl-case -> pcase could be on its own.

aikrahguzar

comment created time in 2 days

Pull request review commentbdarcus/bibtex-actions

Towards removing bibtex-completion dependency + misc changes

 and nil means no action." (defcustom bibtex-actions-major-mode-functions   '(((latex-mode) .      ((local-bib-files . bibtex-actions-latex--local-bib-files)+      (insert-keys . bibtex-actions-latex--insert-keys)

It is useful for me because insert-citation gives a menu with cite commands and I only use \cite so I have defined a command that use \cite using insert-keys.

I want to change insert-citation so that it can be passed the citation argument as an optional argument so that it gives you the menu only if it is not passed, in that case it will become less useful.

Yeah, this is what I meant about org-cite-insert.

I'm not sure it's the 100% best UI ATM, but it's an improvement. So:

  1. when you run it in bare text, it just inserts the citation with keys.
  2. when you run it when point is on "cite", it gives you the style UI
  3. when you run it when point is on a citekey, it prompts to replace the key

Not sure how much of that is possible in LaTeX, given the more lightweight syntax, but might be worth thinking about.

aikrahguzar

comment created time in 2 days

PullRequestReviewEvent

pull request commentbdarcus/bibtex-actions

Towards removing bibtex-completion dependency + misc changes

to what extent is bibtex-actions usable in org right now without org-cite?

I think it's pretty usable, as the user has a choice of different citation options: pandoc, org-ref, etc.

But you could arguably say that's a problem too.

Is it a goal to keep it usable without org-cite?

IDK ATM.

Maybe bibtex-actions-insert works even without org-cite?

Maybe. Need to think on this more.

Question beyond whether it "works", is how.

I think ideally:

  1. if you're using org-cite, the bibtex-actions-insert commands (at least for citations and keys) shouldn't load (see #278).
  2. we allow people to use insert-citation with pandoc or org-ref, at least for now

WDYT?

aikrahguzar

comment created time in 2 days

PullRequestReviewEvent

Pull request review commentbdarcus/bibtex-actions

Towards removing bibtex-completion dependency + misc changes

 and nil means no action." (defcustom bibtex-actions-major-mode-functions   '(((latex-mode) .      ((local-bib-files . bibtex-actions-latex--local-bib-files)+      (insert-keys . bibtex-actions-latex--insert-keys)

Both pandoc and org-cite use the @key syntax, with semi-colon delimiter.

See bibtex-completion-format-citation-pandoc-citeproc.

But that has had me wonder whether insert-keys is a useful command; particularly in org-cite (where org-cite-insert works differently depending on where point it).

Is it useful in latex, given insert-citation?

aikrahguzar

comment created time in 2 days

pull request commentbdarcus/bibtex-actions

Towards removing bibtex-completion dependency + misc changes

But I do need to deal with a package management questions. At present I need to add

(require 'org-cite)
(require 'reftex)

Which seem sub-optimal. The other option is to leave bibtex-actions-major-mode-functions nil by default and then (add-to-list bibtex-actions-major-mode-functions ...) in oc-bibtex-actions and a new bibtex-actions-latex. This has the better lazy loading behavior but makes configuration more complicated.

I am learning this too, and so not certain.

But two things to consider:

  1. with-eval-after-load (see how consult uses this)
  2. fbounp and boundp
aikrahguzar

comment created time in 2 days

pull request commentbdarcus/bibtex-actions

Towards removing bibtex-completion dependency + misc changes

It is only for bibtex or can it also do the in file bibliography which is possible in latex.

It just outputs the entry plain text, for any text mode.

It doesn't work very well in my experience, and ...

I am fine with removing it. But what about #275?

.. sorry; #245.

The idea would be to have citeproc-el handle the formatting.

aikrahguzar

comment created time in 2 days

Pull request review commentbdarcus/bibtex-actions

Towards removing bibtex-completion dependency + misc changes

 offering the selection candidates."          ((string= extension (or "org" "md")) "Notes")           (t "Library Files"))))) +(defun bibtex-actions-latex--local-bib-files ()+  "Local bibliographic for latex retrieved using reftex"+  (reftex-access-scan-info t)

Check the docstring.

aikrahguzar

comment created time in 2 days

PullRequestReviewEvent

pull request commentbdarcus/bibtex-actions

Towards removing bibtex-completion dependency + misc changes

Question: Does bibtex-actions-insert-reference work?

I haven't tested that command in a long time.

Also what is it supposed to do?

Format a bibliographic entry.

We could just remove it, and also consider #275.

aikrahguzar

comment created time in 2 days

push eventbdarcus/bibtex-actions

Bruce D'Arcus

commit sha 0fc5396159633cf66d8cab8e2ceccd6ebe09f5cf

Remove extensions-external refs (#306)

view details

Bruce D'Arcus

commit sha 801b2ccccaeea256422abbda9446b379947bd597

Start org-cite citation editing commands

view details

Bruce D'Arcus

commit sha 3d334e6eea3d5397d6b13795fa45c157f9788703

Adapt shift function

view details

push time in 3 days

issue commentbdarcus/bibtex-actions

Error happens when calling `org-open-at-point` at a citation link

Another oversight.

Try again when you get a chance; I just merged a commit that remove reference to that (now outdated) variable.

liebkne

comment created time in 3 days