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: bug fixes (Joost Kremers)
   2. Re: ebib under Windows (Joost Kremers)
   3. Re: ebib under Windows (Steve Youngs)
   4. Re: ebib under Windows (Joost Kremers)
   5. Re: ebib under Windows (Steve Youngs)


----------------------------------------------------------------------

Message: 1
Date: Mon, 2 Oct 2006 10:55:34 +0200
From: Joost Kremers <[EMAIL PROTECTED]>
Subject: Re: [Ebib-users] bug fixes
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

As usual, I seem to have forgotten the attachment... Let's give it another
try.

On Sun, Oct 01, 2006 at 04:45:21PM +0200, Joost Kremers wrote:
> Hi list,
> 
> As Thomas Schmitz pointed out in an earlier message, there is a serious bug
> in Ebib 0.25. I have now fixed this bug, together with another one that I
> found while testing Thomas' examples. Since this is a serious bug, I'm
> sending a patch that fixes it. To apply the patch and reload Ebib, do the
> following:
> 
> Put the patch file in the same directory that ebib.el is in and type:
> 
> patch < ebib-0.25.1.patch
> 
> This will update ebib.el. If you have a byte-compiled version of Ebib,
> recompile the source and restart Emacs to load it.[1]
> 
> Thanks to Thomas for reporting this bug to me.
> 
> Joost
> 
> 
> [1] Alternatively to restarting Emacs, you can quit Ebib, type 'M-x
> unload-feature RET ebib RET' and restart Ebib.

-- 
Joost Kremers
Life has its moments

-------------- next part --------------
--- ebib-0.25/ebib.el   2006-08-18 13:50:58.000000000 +0200
+++ ebib-0.25.1/ebib.el 2006-10-01 16:24:58.000000000 +0200
@@ -1,4 +1,4 @@
-;; Ebib v0.25
+;; Ebib v0.25.1
 ;;
 ;; Copyright (c) 2003, 2004, 2005 Joost Kremers
 ;; All rights reserved.
@@ -38,7 +38,7 @@
 
 ;; variables that are set only once
 (defconst ebib-bibtex-identifier "[^\"#%'(),={} \t\n\f]*" "Regex describing a 
licit BibTeX identifier.")
-(defconst ebib-version "0.25")
+(defconst ebib-version "0.25.1")
 (defvar ebib-entry-types-hash nil "Holds the hash table containing the entry 
type definitions.")
 (defvar ebib-ign-fields nil "Holds a list of the ignored fields.")
 (defvar ebib-default-type nil "The default type for a newly created entry.")
@@ -972,11 +972,13 @@
 The contents of a field is delimited by a comma or by the closing brace of
 the entry. The latter is at position LIMIT."
   (while (and (not (eq (char-after) ?\,))
-             (< (point) (1- limit)))
+             (< (point) limit))
     (cond
      ((eq (char-after) ?\{) (ebib-match-paren-forward limit))
      ((eq (char-after) ?\") (ebib-match-quote-forward limit)))
     (forward-char 1))
+  (if (= (point) limit)
+      (skip-chars-backward " \n\t\f"))
   (point))
 
 (defun ebib-lower ()
@@ -1260,8 +1262,9 @@
    (let ((beg (ebib-search-key-in-buffer entry-key)))
      (forward-line 1)
      (delete-region beg (point))))
-  (ebib-search-key-in-buffer (ebib-cur-entry-key))
-  (ebib-set-index-highlight))
+  (when-entries
+   (ebib-search-key-in-buffer (ebib-cur-entry-key))
+   (ebib-set-index-highlight)))
 
 (defun ebib-delete-entry (&optional entry-key)
   "Deletes the current entry from the database."

------------------------------

Message: 2
Date: Mon, 2 Oct 2006 14:57:00 +0200
From: Joost Kremers <[EMAIL PROTECTED]>
Subject: Re: [Ebib-users] ebib under Windows
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii

On Sun, Sep 10, 2006 at 01:15:13PM -0400, Jos Elkink wrote:
> > > My .bib
> > > file is generated using another BibTex manager, JabRef, so it should
> > > be syntactically correct :). I also never get errors when using it.
> >
> > could you send me (part of) a bibtex file you're trying to load? send it
> > (g)zipped as an attachment, not as a text file, because i need to have
> > the exact file byte-for-byte. i'm beginning to have a nasty suspicion on
> > what the problem might be...
> 
> I will send it right away in private email ...

ok, i got it. it turns out that the problem was not what i thought it was
(which makes me a little happier ;-) i tried loading your bib-file in ebib,
and got the same result: an error message stating "end of buffer" (i don't
know if you reported that) and apparently nothing is loaded. when i lowered
ebib and activated it again, i found that part of the file *had* been
loaded, however. it wasn't difficult to identify the entry where things go
wrong:

@ARTICLE{AntoniTorcini1998,
  author = {Micka"el Antoni and Alessandro Torcini},
  title = {Anomalous diffusion as a signature of a collapsing phase in 
two-dimensional self-gravitating systems},
  journal = {Physical Review E},
  year = {1998},
  volume = {57},
  pages = {6233-6236},
  number = {6},
  month = {JUN},
  owner = {elkinkj},
}

and the exact problem is with the diarhesis in the name `Micka"el'. ebib
takes the character " to be the start of a string, and tries to find the
matching double quote that ends the string. since this is never found, an
"end of buffer" error message is produced.

there is a work-around and a solution for this. the work-around involves
writing \" rather than " in your bib-file. the solution would be to recode
ebib so that it knows about this way of writing accented characters.

the former may have disadvantages that i'm not aware of. the latter has one
big disadvantage: it's not straight-forward. in order to read a field
contents, ebib finds the opening { that marks the beginning of the field
contents, and then looks for the matching }: everything in between is
considered the field contents. in order to find the matching }, ebib uses
the function FORWARD-LIST, which is a standard elisp function. it is this
function that knows about strings and string delimiters, and that causes
the problem in your case.

i obviously cannot alter existing elisp functions. therefore, in order to
solve the issue, i'd have to write an alternative to FORWARD-LIST, and make
it smart enough to ignore accented characters written in this fashion. i do
have (still rather vague) plans to largely rewrite the code that loads
bibtex files. when i get to that, i'll certainly think about how i can get
this right, but right now, i suggest you use the work-around...

sorry that i can't offer a better solution right now, but at least we know
where the problem lies.

-- 
Joost Kremers
Life has its moments




------------------------------

Message: 3
Date: Mon, 02 Oct 2006 23:20:31 +1000
From: Steve Youngs <[EMAIL PROTECTED]>
Subject: Re: [Ebib-users] ebib under Windows
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

* Joost Kremers <[EMAIL PROTECTED]> writes:

  > and the exact problem is with the diarhesis in the name `Micka"el'. ebib
  > takes the character " to be the start of a string, and tries to find the
  > matching double quote that ends the string. since this is never found, an
  > "end of buffer" error message is produced.

  > there is a work-around and a solution for this. the work-around involves
  > writing \" rather than " in your bib-file. the solution would be to recode
  > ebib so that it knows about this way of writing accented characters.

(modify-syntax-entry ?\" "w")



-- 
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
|                 I am Dyslexic of Borg.                   | 
|    Fusistance is retile. Your arse will be laminated.    |
|------------------------------------<[EMAIL PROTECTED]>---|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 312 bytes
Desc: not available
Url : 
http://sourceforge.net/mailarchive/forum.php?forum=ebib-users/attachments/20061002/4ca4892a/attachment.bin
 

------------------------------

Message: 4
Date: Mon, 2 Oct 2006 15:44:02 +0200
From: Joost Kremers <[EMAIL PROTECTED]>
Subject: Re: [Ebib-users] ebib under Windows
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii

On Mon, Oct 02, 2006 at 11:20:31PM +1000, Steve Youngs wrote:
> (modify-syntax-entry ?\" "w")

ok, and once again i underestimate emacs. ;-) thanks for the hint, it works
beautifully.

for those who need it, add the above line to the function
ebib-find-bibtex-entries, directly after the documentation string:

#v+

(defun ebib-find-bibtex-entries ()
  "Finds the BibTeX entries in the current buffer.

The search is started at the beginnig of the buffer. All entries found are
stored in the hash table DATABASE of EBIB-CUR-DB. Returns a three-element
list: the first elements is the number of entries found, the second the
number of @STRING definitions, and the third is T or NIL, indicating
whether a @PREAMBLE was found."
  (modify-syntax-entry ?\" "w")
  (let ((n-entries 0)
        (n-strings 0)
        (preamble nil))
...

#v-

i assume (but correct me if i'm wrong) that bibtex only allows this
notation if the field value is written in {}, not when it's written in
"". i know for a fact that ebib will get confused in the latter case...

-- 
Joost Kremers
Life has its moments



------------------------------

Message: 5
Date: Tue, 03 Oct 2006 01:13:43 +1000
From: Steve Youngs <[EMAIL PROTECTED]>
Subject: Re: [Ebib-users] ebib under Windows
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

* Joost Kremers <[EMAIL PROTECTED]> writes:

  > On Mon, Oct 02, 2006 at 11:20:31PM +1000, Steve Youngs wrote:
  >> (modify-syntax-entry ?\" "w")

  > ok, and once again i underestimate emacs. ;-) 

A most unrewarding pastime. :-)

  > thanks for the hint, it works beautifully.

You're welcome.

-- 
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
|                 I am Dyslexic of Borg.                   | 
|    Fusistance is retile. Your arse will be laminated.    |
|------------------------------------<[EMAIL PROTECTED]>---|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 312 bytes
Desc: not available
Url : 
http://sourceforge.net/mailarchive/forum.php?forum=ebib-users/attachments/20061003/7b7503b0/attachment.bin
 

------------------------------

-------------------------------------------------------------------------
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 3, Issue 2
****************************************

Reply via email to