-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coding style for org-roam-bibtex #13
Comments
No problem whatsoever, don't sweat it.
Sounds good. I'm ironing it the kinks as I see them, but I'm learning as I'm going, just like you I assume. On top of the links you've mentioned, there's also @alphapapa's excellent Emacs Package Developer's Handbook. Now that the And thanks again for your help maintaining the package. I think we've done pretty good so far! 🚀 |
Yes, thank you very much for you collaboration! Indeed, everything is developing very nicely. |
Here I would suggest that we do not require our feature libraries in There are potentially two problems with this paradigm.
The latter problem can be addressed easily by providing instructions in README on how to generate autoloads file. We may also have in future some auxiliary library or libraries that would contain purely utility functions akin to So the structure would be like this:
The arrows show how the features are provided. Utility libraries provide features to |
Sounds good. I think I got confused because I couldn't get my Emacs to load the library at some point, but that might have been due to an unrelated error. I might have been using the wrong session to run my tests, one which hadn't loaded And so, this understanding led to #25, which led to a recursion error spotted by #27, and fixed in 8cc2d95. I think that the bulk of the confusion came from #26: where to define the key-binding? In the
That is such an edge-case that I'm not even sure if it bears mentioning |
Also, I'm crunching for my MA thesis right now, so I'm going to take the week off to focus on it. I'll try to keep an eye out on the repo, but I won't be doing anything substantial. |
There is nothing principally wrong in requiring If you install
Could you please test the latest commit of this branch with the setup above? No need to hurry though, this can wait. |
Do you mean #30 or |
#30 with my commit. |
It's working. I'm merging. |
Ok, good. |
Also, I've disabled the option to merge all commits from a PR, and instead, we're going to squash-then-merge them. That'll prevent a lot of small commits from crowding up the history. |
YES! |
Now, enough procrastinating. It's working, it's doing its job. And there is real work ahead to be done. |
Righto. Glad to know you're in the spot as I am, although a bit further down the line. Let's reconvene once we've done enough progress to convince our supervisors that we're doing decent work. 🤡 |
I've created a development branch New features should start on |
Sounds good. I did it in a |
* feature: reference scrapper * interactive orb-reference-scrapper process * create special orb-temp-dir * fix orb-reference-scrapper--cleanup * another fix for buffer cleanup * prevent multiple orb-reference-scrapper processes * s/orb-reference-scrapper/orb-pdf-scrapper * isolate orb-pdf-scrapper--sanitize-txt * major reformatting * orb-with message macro * orb-pdf-scrapper-anystyle with plist options * polishing orb-anystyle, documentation * minor adjustments to orb-anystyle * use orb-anystyle in orb-pdf-scrapper * switch between txt and bib, interactively * fix orb-pdf-scrapper-mode-map * better regexp for orb-pdf-scrapper-sanitize-text * replace switch-to-buffer with pop-to-buffer * better regexp for sanitize text - also library dependencies * rename: to `orb-pdf-scrapper-keygen-function` * isolate journal regexp function - /s/orb--tsv-to-list /orb-pdf-scrapper--tsv-to-list - improve pages regexp * fix anystyle check - check command does not require a valid format option - additionally, renamings in orb-pdf-scrapper * add variables, fix regression in keygen function - orb-data-dir - orb-anystyle-parser-model - orb-anystyle-finder-model * fix anystyle model keys, scrapper sanitize * fix library requires * orb--buffer-string; rename util. funcs. * refactor and document orb-pdf-scrapper * set file local fill-column to 79 relevant to #13 * autokey functionality: format field * fix typos, new journal abbreviations * it works; added docstrings * fix type mismatch in orb-autokey-generate-key * fix orb-autokey-generate-key elisp evaluation - save match data before evaluation * eval-when-compile rx; autoload orb-autokey.. * rewrite pdf-scrapper citekey generation * fix edge cases in orb--autokey-format-field * add edit-org interactive context * defvar orb-anystyle crop * right order for org-roam-capture-templates * refactor orb-anystyle * refactor orb-pdf-scrapper.el * separate undo history for different modes + refactor orb-pdf-scrapper.el * refactor autokey functions * remove journal_titles.tsv and related code - this was too much tailored to my discipline; it was here for development and testing purposes and now goes back to my personal config * remove orb-data-dir * orb-autokey-invalid-field-marker * rename orb-autokey-invalid-field- s/marker/token * extract orb-pdf-scrapper--generate-key-at-point-1 - parsing a single record was extracted into a separate function - this function is used in commands `orb-pdf-scrapper-generate-keys` and `orb-pdf-scrapper-generate-key-at-point` - use parsebib instead of bibtex-completion-get-entry to avoid setting buffer-local bibliography - references are stored unsorted until they are passed to `orb-pdf-scrapper--edit-org` * C-u prefix for orb-pdf-scrapper-generate-keys - remove `orb-pdf-scrapper-generate-key-at-point`, move its functionality into `orb-pdf-scrapper-generate-keys` making it accessible with the universal argument * remove option `orb-pdf-scrapper-keygen-function` - customization of key generation can be achieved with `orb-autokey-generate-key`. - customization of how to validate keys, which fields to set and which to export can be achieved with corresponding user variables * docs: :after org-roam in use-package examples - leaving it out may potentially lead to loading problems #66 * fix a few minor regressions after refactoring * insert as org list or table, minor fixes * add parser training session, refactoring * set orb-autokey-titlewords-ignore directly * optimize lazy loading * orb-autokey-invalid-characters - filter characters not allowed in BibTeX/LaTeX - `orb-autokey-invalid-characters` is a user variable for such characters - " and " ("and" surrounded with spaces) as the name field delimiter - orb-autokey-titlewords-ignore is not copied from `bibtex-autokey-titleword-ignore`. This was really a bad idea. - rename `orb-autokey-invalid-field-token` > `orb-autokey-empty-field-token` * orb-autokey latest commit follow-up * fix year expansion edge cases * set fields per entry type; customize definitions - in `orb-pdf-scrapper-set-fields` list, entry types can be specified in the tail of element's list. The field will be set only if its record's type is a member of those types - `defcustom` definitions for user variables - minor refactoring * refactor orb-pdf-scrapper--insert-org-as-table also defcustom for orb-pdf-scrapper-mode-hook * fix training session bug; backup master xml file * anystyle defcustoms * Add note actions documentation - also make `orb-note-actions-default` a user variable * Update README.md and docstrings * Fix missing quote * Require pdf-scraper in relevant action * Clarify language The filling might have been messed up, so it’ll probably require a clean-up later down the line. * use biblatex dialect in BibTeX mode * fix invalidate-range regexp Co-authored-by: Leo Vivier <[email protected]>
@zaeph
There are a couple of general emacs-lisp style guides, most notably the official one:
https://www.gnu.org/software/emacs/manual/html_node/elisp/Coding-Conventions.html
and another one here:
https://github.com/bbatsov/emacs-lisp-style-guide
I would suggest we adhere to the guidelines outlined in the above resources. Which we seem to have been doing so far anyway.
I have started this issue, however, with subtler matters in mind, which it seems did not make it into the guides, and which will likely arise in the development process.
In the recent commit 715083d I have introduced
.dir-locals.el
and also a file-local variables section at the bottom oforg-roam-bibtex.el
.So far,
sentence-end-double-space
is set tot
as a top-directory variable (Emacs default). It seems my Emacs installation has it set tonil
and I have constantly been messing up the spaces in the doc-strings - I would like to apologise for that.I also set
fill-column
to70
, which is Emacs default, as a file-local variable.If you have other preferences, please feel free to change these and other relevant variables to your liking. I care as much as to keep the things coherent, the actual values being of lesser importance.
The text was updated successfully, but these errors were encountered: