From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Roland Winkler Newsgroups: gmane.emacs.devel Subject: Re: [angeli@iwi.uni-sb.de: [bibtex.el] Not possible to add entry in new file] Date: Sun, 12 Oct 2003 15:03:30 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <16265.20770.469468.924642@tfkp07.physik.uni-erlangen.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1065963942 29307 80.91.224.253 (12 Oct 2003 13:05:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 12 Oct 2003 13:05:42 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Oct 12 15:05:40 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A8fum-0006rN-00 for ; Sun, 12 Oct 2003 15:05:40 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1A8fum-0001VO-00 for ; Sun, 12 Oct 2003 15:05:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A8fuJ-0001Iy-Cw for emacs-devel@quimby.gnus.org; Sun, 12 Oct 2003 09:05:11 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A8fuF-0001GS-DS for emacs-devel@gnu.org; Sun, 12 Oct 2003 09:05:07 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A8ftj-00015K-Gw for emacs-devel@gnu.org; Sun, 12 Oct 2003 09:05:06 -0400 Original-Received: from [131.188.164.207] (helo=tfkp07.physik.uni-erlangen.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A8ftj-0000qb-6L for emacs-devel@gnu.org; Sun, 12 Oct 2003 09:04:35 -0400 Original-Received: by tfkp07.physik.uni-erlangen.de (Postfix, from userid 500) id E30174D12; Sun, 12 Oct 2003 15:03:32 +0200 (CEST) Original-To: emacs-devel@gnu.org X-Mailer: VM 6.96 under Emacs 21.2.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17038 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17038 > To: emacs-pretest-bug@gnu.org > From: Ralf Angeli > Date: 25 Aug 2003 16:52:35 +0200 > Subject: [bibtex.el] Not possible to add entry in new file > Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org > > After opening a new BibTeX file it is not possible to an entry via > keyboard shortcuts like 'C-x C-e b' or the respective menu item. > After trying this the following line appears in the *Messages* buffer: > > bibtex-prepare-new-entry: Beginning of buffer > > The problem does not occur if there is already an entry present in the > file. Hi About a month ago I sent the patch below to emacs-devel@gnu.org. But it seems to me that up to now it has not appeared in the CVS tree. Could someone please install it? Thank you very much, Roland 2003-09-04 Roland Winkler * textmodes/bibtex.el (bibtex-move-outside-of-entry): Bugfix. Move backward only if point was not inside an entry. --- bibtex.el 2003/06/30 17:59:05 1.25 +++ bibtex.el 2003/08/28 10:18:40 @@ -1656,16 +1656,15 @@ "Make sure point is outside of a BibTeX entry." (let ((orig-point (point))) (bibtex-end-of-entry) - (when (<= (point) orig-point) + (when (< (point) orig-point) ;; We moved backward, so we weren't inside an entry to begin with. ;; Leave point at the beginning of a line, and preferably ;; at the beginning of a paragraph. (goto-char orig-point) (beginning-of-line 1) - (let ((cb (char-before (1- (point))))) - (unless (and cb (= ?\n cb)) - (re-search-forward "^[ \t]*[@\n]" nil 'move) - (backward-char 1)))) + (unless (= ?\n (char-before (1- (point)))) + (re-search-forward "^[ \t]*[@\n]" nil 'move) + (backward-char 1))) (skip-chars-forward " \t\n"))) (defun bibtex-beginning-of-first-entry ()