Skip to content

Conversation

@arifer612
Copy link
Contributor

@arifer612 arifer612 commented Nov 7, 2025

This PR refactors some parts of citar.el and citar-file.el. It resolves the byte-compilation errors in the current CI workflow, and more. In particular, it resolves the errors arising from:

  1. Undefined functions from bibtex CI #472, CI #471, and CI #470.
  2. Extraneous quotation in an ignore-error statement arifer612/citar CI #1.
  3. Wrong value-type declaration for the citar-display-transform-functions custom variable arifer612/citar CI #2.

Changes made

The changes made are as follows.

  1. Added a (require 'bibtex) statement in the preamble of citar.el. This resolves the issue discussed in feat: New citar-no-export-fields variable #872 (comment).
  2. Removed the extraneous quotation in an ignore-error function in citar.el.
  3. Used the correct value-type in the definition of the custom variable citar-display-transform-functions.

More details are included in the commit messages.

Validation

These changes successfully passes the current CI workflow (see arifer612/citar CI #4). There is, however, a possible issue with the linter that should be resolved separately.

This ensures that the `bibtex-beginning-of-entry',
`bibtex-search-forward-field', and `bibtex-set-dialect' functions in citar.el
are loaded before attempting to byte-compile the file.

This should resolve the issue in
emacs-citar#872 (comment).
According to the help message for `ignore-error', the error condition should not
be quoted. This will raise an error when byte-compiling in Emacs 30.2.
The value type for the custom variable `citar-display-transform-functions' is
currently set to `list', which is not a proper elisp type. This will raise an
error when attempting to byte-compile the file. Instead, the correct value-type
should be sexp.

Moreover, as there nothing is being evaluated, the backtick quotation should be
replaced with a regular quotation to avoid unexpected expansion of the sexp.
@bdarcus bdarcus merged commit 0d98191 into emacs-citar:main Nov 7, 2025
8 checks passed
@bdarcus
Copy link
Contributor

bdarcus commented Nov 7, 2025

Thank you!

@arifer612 arifer612 deleted the refactor/byte-compilation-errors branch November 8, 2025 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants