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: martin rudalics
Subject: Re: forward-comment, C-M-a and C-M-e problems in bibtex-mode
Date: Sun, 07 May 2006 23:48:30 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> If I have a bib file containing:
>
> @Comment blah blah blah
> @Comment blah blah blah
>
> Doing:
> M-: (goto-char 1) RET M-: (forward-comment 2) RET M-: (point) RET
>
> prints:
> 1
>
> `forward-comment' should move the cursor if a comment follows the point.

FWIW, this works for me correctly when I use curly braces as in

@Comment{blah blah blah}
@Comment{blah blah blah}

But if I have a comment like

@Comment{blah blah blah
         blah blah blah}

the second line does not get highlighted with font-lock-comment-face.

>
> If @ is replaced with % (the other comment character), then
> forward-comment works as expected.

% comments work without curly braces.

>
> Pressing C-M-a when inside a bibtex entry moves the cursor to the
> beginning of the entry, but pressing it again does not move to the
> previous entry.

There seems to be a bug in `bibtex-beginning-of-entry', it has

  (if (looking-at "@")
      (forward-char))

which could be rewritten as

  (if (and (looking-at "@") (not (bobp)))
      (backward-char))

but the idea to subsequently search for "^[ \t]*@" might get you
to the beginning of an @comment as well ...

> The same is true for C-M-e.

The doc-string of `bibtex-end-of-entry' contains the sentence "If inside
an entry, move to the end of it, otherwise move to the end of the
previous entry." which inherently contradicts the idea of moving to the
end of the _following_ entry.

> All modes support this type of navigation using C-M-{a,e}






reply via email to

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