emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: forward-comment, C-M-a and C-M-e problems in bibtex-mode


From: Stefan Monnier
Subject: Re: forward-comment, C-M-a and C-M-e problems in bibtex-mode
Date: Mon, 22 May 2006 14:35:17 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> >> >> Oh, and I forgot another problem: doing C-c C-c inside a comment
>> >> >> throws a Wrong type argument: number-or-marker-p error.
>> 
>> Hmmm... wrong type argument, you say?
>> 
>> >> Given the context, you hopefully understand that "inside a comment" is
>> >> a meaningless description of the circumstance.
>> >> Please give a concrete example.
>> 
>> > Create a new .bib file
>> > Then type in it: 
>> > M-; blah blah C-c C-c 
>> > This is the original situation that I encountered. 
>> > But also the same thing happens if you type in a new file:
>> > % blah blah C-c C-c
>> > If you type in a new file:
>> > @Comment {blah blah} C-c C-c
>> 
>> > the error is "Search failed [snip a humongous regexp]"
>> 
>> That's not a wrong type argument error any more.  It's just complaining that
>> it can't find the BibTeX entry you're asking to format.
>> The same happens without the "%" or the "@Comment".

> Do you have some local changes? 

I was partly commenting on your bug-report, not just on the behavior I saw.

> I still get the same errors with a freshly updated and bootstrapped Emacs... 

Which error?  The wrong type argument or the search failed?
Does the patch below "help"?


        Stefan


*** bibtex.el   22 May 2006 13:59:55 -0400      1.118
--- bibtex.el   22 May 2006 14:32:33 -0400      
***************
*** 3879,3885 ****
    (interactive "P")
    (let ((case-fold-search t)
          (start (bibtex-beginning-of-entry))
!         (_ (looking-at bibtex-any-entry-maybe-empty-head))
          (entry-type (bibtex-type-in-head))
          (key (bibtex-key-in-head)))
      ;; formatting
--- 3879,3886 ----
    (interactive "P")
    (let ((case-fold-search t)
          (start (bibtex-beginning-of-entry))
!         (_ (or (looking-at bibtex-any-entry-maybe-empty-head)
!              (error "Not inside a BibTeX entry")))
          (entry-type (bibtex-type-in-head))
          (key (bibtex-key-in-head)))
      ;; formatting




reply via email to

[Prev in Thread] Current Thread [Next in Thread]