Send Ebib-users mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/ebib-users
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Ebib-users digest..."
Today's Topics:
1. Re: message at byte-compile (Abel Morabito)
2. multiple keywords fields in bib files (Abel Morabito)
3. following URLs (Abel Morabito)
4. Re: multiple keywords fields in bib files (Joost Kremers)
5. Re: following URLs (Joost Kremers)
6. Re: multiple keywords fields in bib files (Abel Morabito)
7. Re: following URLs (Abel Morabito)
8. Re: multiple keywords fields in bib files (Joost Kremers)
----------------------------------------------------------------------
Message: 1
Date: Wed, 21 Mar 2007 03:10:24 +0100
From: Abel Morabito <[EMAIL PROTECTED]>
Subject: Re: [Ebib-users] message at byte-compile
To: "Discussion of issues relating to Ebib."
<[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
Dear Joost,
It's OK. Thank you again!
On Wed, Mar 21, 2007 at 12:03:35AM +0100, Joost Kremers wrote:
> hi abel,
>
> > I'm starting with ebib seamlessly indeed #8^)
> >
> > I've just byte-compiled ebib.el from emacs and it's returned the next
> > message:
> >
> > ** The following functions are not known to be defined:
> > region-active-p, make-extent, set-extent-face,
> > set-extent-endpoints, extent-start-position, extent-end-position,
> > detach-extent, char-to-int
>
> these are all functions exclusive to XEmacs. GNU/Emacs indeed doesn't know
> about them. that's no problem, however, because they're only used when you
> run Ebib in XEemacs. in GNU/Emacs, equivalent functions are used. so you
> can safely ignore this message.
>
> --
> Joost Kremers
> Life has its moments
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Ebib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ebib-users
------------------------------
Message: 2
Date: Wed, 28 Mar 2007 07:17:20 -0300
From: Abel Morabito <[EMAIL PROTECTED]>
Subject: [Ebib-users] multiple keywords fields in bib files
To: "Discussion of issues relating to Ebib."
<[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
Dear users,
I'm working with an imported bib database with multiple keywords field, with
entries like this:
@Article{Andrew2005,
author="Andrew, Pal
and Tucker, Daniel
and Valentine, William
and Roze, St{\~A}?phane
and Gabriel, Sylvie
and Cordonnier, Daniel",
title="Cost-effectiveness of irbesartan in diabetic nephropathy: a systematic
review of published studies.",
journal="Nephrology, dialysis, transplantation : official publication of the
European Dialysis and Transplant Association - European Renal Association",
year="2005",
month="Jun",
day="xx",
volume="20",
issue="6",
pages="1103--9",
keywords="irbesartan",
keywords="nephropathy",
keywords="diabetes",
keywords="Full text",
keywords="economics",
keywords="PND2007",
note="10.1093/ndt/gfh802",
url="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=15855214&dopt=Abstract"
}
Ebib just reads the last keywords field, in this case PND2007, and deletes
the previos ones. The same entry is now saved:
@article{Andrew2005,
author = "Andrew, Pal
and Tucker, Daniel
and Valentine, William
and Roze, St{\~A}?phane
and Gabriel, Sylvie
and Cordonnier, Daniel",
title = "Cost-effectiveness of irbesartan in diabetic nephropathy: a
systematic review of published studies.",
journal = "Nephrology, dialysis, transplantation : official publication
of the European Dialysis and Transplant Association - European Renal
Association",
year = "2005",
month = "Jun",
day = "xx",
volume = "20",
issue = "6",
pages = "1103--9",
keywords = "PND2007",
note = "10.1093/ndt/gfh802",
url =
"http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=15855214&dopt=Abstract"
}
It seems ebib works with keywords written in one line, for instance
@article{Andrew2005,
author = "Andrew, Pal
and Tucker, Daniel
and Valentine, William
and Roze, St{\~A}?phane
and Gabriel, Sylvie
and Cordonnier, Daniel",
title = "Cost-effectiveness of irbesartan in diabetic nephropathy: a
systematic review of published studies.",
journal = "Nephrology, dialysis, transplantation : official publication
of the European Dialysis and Transplant Association - European Renal
Association",
year = "2005",
month = "Jun",
day = "xx",
volume = "20",
issue = "6",
pages = "1103--9",
keywords = {PND2007, ARB},
note = "10.1093/ndt/gfh802",
url =
"http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=15855214&dopt=Abstract"
}
How could I work this out so I can use the original bib file without editing
every keywords field?
Thank you!
------------------------------
Message: 3
Date: Wed, 28 Mar 2007 07:40:35 -0300
From: Abel Morabito <[EMAIL PROTECTED]>
Subject: [Ebib-users] following URLs
To: "Discussion of issues related to Ebib."
<[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
Dear Joost,
As I'm making some bibliographic synthesis I visit URLs saved in bib
entries all the time. I think it would be handy to do this from within Ebib,
wouldn't it? I mean a customizable keybound function to call the web
browser. Well, this is just a wish #8^)
Regards,
------------------------------
Message: 4
Date: Wed, 28 Mar 2007 14:18:10 +0200
From: Joost Kremers <[EMAIL PROTECTED]>
Subject: Re: [Ebib-users] multiple keywords fields in bib files
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
Hi Abel,
On Wed, Mar 28, 2007 at 07:17:20AM -0300, Abel Morabito wrote:
> I'm working with an imported bib database with multiple keywords field, with
> entries like this:
>
[...]
> keywords="irbesartan",
> keywords="nephropathy",
> keywords="diabetes",
> keywords="Full text",
> keywords="economics",
> keywords="PND2007",
[...]
Mmm... I've never come across something like this before... Didn't even
know it was possible at all in BibTeX.
> Ebib just reads the last keywords field, in this case PND2007, and deletes
> the previos ones.
Yes. Ebib stores each entry in a hash table and uses the field names as the
keys. Since each key can only appear once in a hash table, each `keywords'
field replaces the previous one.
> It seems ebib works with keywords written in one line, for instance
Yep. That would be the way to do it.
It wouldn't be easy to modify Ebib to allow multiple `keywords' fields. As
I said, because I use hash tables to store the entries, and hash tables
don't allow it on principle, I would have to rewrite Ebib from scratch
using some other storage method (which I'm not about to do. ;-)
Alternatively, it would be possible to put the different keywords values in
a list and store that as the value of the keywords field in the hash
table. That, too, would take some time to implement, however, as it raises
questions about how to display this on the screen, etc.
> How could I work this out so I can use the original bib file without editing
> every keywords field?
If you have no problem with storing the different keywords in a single
keywords field, then the following code will do this:
#v+
(defun ebib-find-bibtex-fields (entry-type limit)
"Finds the fields of the BibTeX entry that starts on the line POINT is on.
Returns a hash table containing all the fields and values, or NIL if none
were found. ENTRY-TYPE is the type of the entry, which will be recorded in
the hash table. Before the search starts, POINT is moved back to the
beginning of the line."
(beginning-of-line)
(let ((fields (make-hash-table :size 15)))
(while (progn
(skip-chars-forward "^," limit) ; we must move to the next comma,
(eq (char-after) ?,)) ; and make sure we are really on a
comma.
(skip-chars-forward "\"#%'(),={} \n\t\f" limit)
(let ((beg (point)))
(when (looking-at-goto-end (concat "\\(" ebib-bibtex-identifier "\\)[
\t\n\f]*=") 1)
(let ((field-type (intern (downcase (buffer-substring-no-properties
beg (point))))))
(unless (eq field-type 'type*) ; the 'type*' key holds the entry
type, so we can't use it
(let ((field-contents (ebib-get-field-contents limit)))
(when field-contents
(let ((existing-contents (gethash field-type fields)))
(if existing-contents
(puthash field-type (from-raw (concat (to-raw
existing-contents)
"; "
(to-raw
field-contents)))
fields)
(puthash field-type field-contents fields))))))))))
(when (> (hash-table-count fields) 0)
(puthash 'type* entry-type fields)
fields)))
#v-
Replace the function ebib-find-bibtex-fields in ebib.el with this new
definition, and load your .bib file again. Ebib will concatenate all the
keywords fields into one keywords field, separated by a semicolon and a
space.
Now, when I tested this code on the BibTeX entry you provide, I noticed
another thing: the author field in your sample entry has newlines in it. In
itself, that's not a problem, but it turns out that Ebib treats it as a
so-called "raw" field, which it shouldn't do. I tracked down the problem,
and it seems to be an inconsistency (not to say "bug"...) in Emacs. I don't
have a fix for this yet. In principle, this won't be a problem as long as
you don't toggle the field's "raw" status.
(This problem only occurs with multiline field values that are surrounded
by quotes, not when they're surrounded by braces. Ebib uses braces, so the
problem won't occur with multiline values created with Ebib.)
--
Joost Kremers, PhD
University of Cologne
Institute for German Language and Literature
Albertus Magnus Platz
50923 Cologne, Germany
Tel. +49 221 / 4703807
------------------------------
Message: 5
Date: Wed, 28 Mar 2007 14:25:22 +0200
From: Joost Kremers <[EMAIL PROTECTED]>
Subject: Re: [Ebib-users] following URLs
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
Hi Abel,
On Wed, Mar 28, 2007 at 07:40:35AM -0300, Abel Morabito wrote:
> As I'm making some bibliographic synthesis I visit URLs saved in bib
> entries all the time. I think it would be handy to do this from within Ebib,
> wouldn't it? I mean a customizable keybound function to call the web
> browser. Well, this is just a wish #8^)
one that should certainly be possible to grant. ;-) emacs already provides
a mechanism for this, so it really shouldn't be difficult to
implement. i'll see what i can do as soon as i have some time to spare.
--
Joost Kremers, PhD
University of Cologne
Institute for German Language and Literature
Albertus Magnus Platz
50923 Cologne, Germany
Tel. +49 221 / 4703807
------------------------------
Message: 6
Date: Wed, 28 Mar 2007 11:59:24 -0300
From: Abel Morabito <[EMAIL PROTECTED]>
Subject: Re: [Ebib-users] multiple keywords fields in bib files
To: "Discussion of issues relating to Ebib."
<[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
> Mmm... I've never come across something like this before... Didn't even
> know it was possible at all in BibTeX.
Sorry, I'm new to BibTeX. The file is imported from Connotea at
www.connotea.org. I've load it in Emacs with bibtex-mode and did a
bibtex-convert-alien without complaints so I thought the format was right.
> If you have no problem with storing the different keywords in a single
> keywords field, then the following code will do this:
No problem at all, I replaced the code in ebib.el and it works fine.
> Now, when I tested this code on the BibTeX entry you provide, I noticed
> another thing: the author field in your sample entry has newlines in it. In
> itself, that's not a problem, but it turns out that Ebib treats it as a
> so-called "raw" field, which it shouldn't do. I tracked down the problem,
> and it seems to be an inconsistency (not to say "bug"...) in Emacs. I don't
> have a fix for this yet. In principle, this won't be a problem as long as
> you don't toggle the field's "raw" status.
It's OK for me.
Thank you very much indeed!
------------------------------
Message: 7
Date: Wed, 28 Mar 2007 12:03:02 -0300
From: Abel Morabito <[EMAIL PROTECTED]>
Subject: Re: [Ebib-users] following URLs
To: "Discussion of issues relating to Ebib."
<[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
> one that should certainly be possible to grant. ;-) emacs already provides
> a mechanism for this, so it really shouldn't be difficult to
> implement. i'll see what i can do as soon as i have some time to spare.
Great! I can surely wait for that to come #8^)
Regards,
------------------------------
Message: 8
Date: Wed, 28 Mar 2007 19:53:12 +0200
From: Joost Kremers <[EMAIL PROTECTED]>
Subject: Re: [Ebib-users] multiple keywords fields in bib files
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
On Wed, Mar 28, 2007 at 11:59:24AM -0300, Abel Morabito wrote:
> > Mmm... I've never come across something like this before... Didn't even
> > know it was possible at all in BibTeX.
>
> Sorry, I'm new to BibTeX. The file is imported from Connotea at
> www.connotea.org. I've load it in Emacs with bibtex-mode and did a
> bibtex-convert-alien without complaints so I thought the format was right.
i've looked into it a bit. the thing is, BibTeX ignores any fields that it
doesn't know/care about. the keywords field is not normally type-set, so
BibTeX just skips over it, and it doesn't care how many there are.
on the other hand, if you have two title fields or something, BibTeX *does*
issue a warning, and ignores the second one.
i'll have to think a little bit about how i'm gonna handle this.
> > Now, when I tested this code on the BibTeX entry you provide, I noticed
> > another thing: the author field in your sample entry has newlines in it. In
> > itself, that's not a problem, but it turns out that Ebib treats it as a
> > so-called "raw" field, which it shouldn't do. I tracked down the problem,
> > and it seems to be an inconsistency (not to say "bug"...) in Emacs. I don't
> > have a fix for this yet. In principle, this won't be a problem as long as
> > you don't toggle the field's "raw" status.
>
> It's OK for me.
i looked at the problem a bit further, and it turns out it is certainly not
a bug, or even inconsistent behaviour of emacs. i have a fix for it which
i'll include in the next version. let me know if you need/want it earlier.
joost
--
Joost Kremers
Life has its moments
------------------------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
------------------------------
_______________________________________________
Ebib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ebib-users
End of Ebib-users Digest, Vol 6, Issue 2
****************************************