Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions citar.el
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,11 @@ always prompt to select."
(function-item citar-open-notes)
(function-item citar-open-note))))

(defcustom citar-bibtex-no-export-fields nil
"A list of fields that should be ignored when exporting BibTeX entries."
:group 'citar
:type '(repeat string))

;;;; File, note, and URL handling

(defcustom citar-open-resources '(:files :links :notes :create-notes)
Expand Down Expand Up @@ -1676,6 +1681,12 @@ including the citekeys, is maintained in Zotero with Better BibTeX."
(dolist (bib-file bibtex-files)
(insert-file-contents bib-file))
(bibtex-search-entry citekey)
(dolist (field citar-bibtex-no-export-fields)
(let ((position (bibtex-search-forward-field
field t)))
(when position
(delete-region (caar position)
(car (last position))))))
(let ((beg (bibtex-beginning-of-entry))
(end (bibtex-end-of-entry)))
(buffer-substring-no-properties beg end)))))
Expand Down
Loading