[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BibTeX mode --- remove unwanted fields
From: |
Emanuel Berg |
Subject: |
Re: BibTeX mode --- remove unwanted fields |
Date: |
Fri, 29 Apr 2016 08:59:24 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
"N. Raghavendra" <raghu@hri.res.in> writes:
> Is there a way to remove unwanted fields from
> a BibTeX entry when doing `bibtex-clean-entry'?
> I'd like to have a variable `my-bibtex-fields' with
> a value like
>
> '("author" "editor" "title" "journal" "year"
> "publisher" "doi" "url" ...)
>
> and kill any field that doesn't belong to
> `my-bibtex-fields', when I run `bibtex-clean-entry'
> on an entry.
With Elisp, this isn't super-difficult to do (God
willing).
There is already `bibtex-next-field'. Then get the
data preferrable with a built-in, otherwise use
`thing-at-point' or something to that end. Oh, and the
"data" here is the field name, not the field data!
Then use `member' and see if that data is in your
variable of desired fields. If it isn't, kill with
`bibtex-kill-field'. After that/otherwise loop the
whole thing.
--
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
- so far: 29 Blogomatic articles -