* bibtex-clean-entry indents badly when splitting long lines
@ 2007-08-22 23:39 Tim Hesterberg
0 siblings, 0 replies; 3+ messages in thread
From: Tim Hesterberg @ 2007-08-22 23:39 UTC (permalink / raw)
To: bug-gnu-emacs
I have an entry like this in a .bib file:
@Article{turl00,
author = {author},
title = {This is a long title that is more than one line long and should be split into multiple lines},
journal = {journal},
year = {year}
}
In emacs 21.3, if I do C-c C-c (bibtex-clean-entry) the result is:
@Article{turl00,
author = {author},
title = {This is a long title that is more than one line long
and should be split into multiple lines},
journal = {journal},
year = {year}
}
Note that the title line is split into two lines, with indentation
determined by bibtex-contline-indentation, which has the value 17.
In emacs 22.1 the continuation line is indented incorrectly:
@Article{turl00,
author = {author},
title = {This is a long title that is more than one line long
and should be split into multiple lines},
journal = {journal},
year = {year}
}
My .emacs includes:
(setq bibtex-include-OPTcrossref nil)
(setq bibtex-include-OPTkey nil)
(setq bibtex-maintain-sorted-entries t)
(setq bibtex-text-indentation 16)
I tried to debug this. In case it helps:
In emacs 21.3 the sequence of function calls is:
bibtex-clean-entry
bibtex-fill-entry
bibtex-do-auto-fill
do-auto-fill
In emacs 22.1 the sequence is:
bibtex-clean-entry
bibtex-fill-entry (this is very different from the emacs 21.3 version)
bibtex-fill-field-bounds
fill-region-as-paragraph
In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
of 2007-06-02 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/gnuwin32/include'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: ENU
locale-coding-system: cp1252
default-enable-multibyte-characters: t
Major mode: Apropos
Minor modes in effect:
display-time-mode: t
shell-dirtrack-mode: t
show-paren-mode: t
encoded-kbd-mode: t
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
Recent input:
C-x N C-v C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p C-u
C-u C-f C-u C-u C-f C-u C-f C-h v <return> C-x N C-x
1 C-x N C-n C-n C-n C-n C-n <escape> v C-x 1 <escape>
v C-u C-u C-p C-u C-p C-u C-p C-u C-p <escape> v C-n
C-u C-p C-p C-u C-u C-f C-b C-b C-b <escape> k C-x
4 b t e m p . e l <return> C-x b t e m p . b i b <return>
C-p C-o <return> C-c C-e C-a t u r l 0 0 <return> a
u t h o r C-j T h i s SPC i s SPC a SPC l o n g SPC
t i t l e SPC t h a t SPC s t r e t <escape> h i s
SPC m o r e SPC t h a n SPC o n e SPC l i n e SPC l
o n g SPC a n d SPC s h o u l d SPC b e SPC s p l i
t SPC i n t o SPC m u l t i p l e SPC l i n e s C-j
j o u r n a l C-j y e a r C-c C-c C-x n C-v C-v C-v
C-v C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-e
C-x C-e C-x n C-n C-n C-c C-c C-x u C-n C-n C-e C-b
<return> C-u C-p C-p C-SPC C-n C-n C-n C-n C-n C-n
<escape> w C-x N C-h a b u g <return> C-x n C-v C-s
s u b m i t C-a C-n C-n C-n C-n C-SPC C-u C-u C-f <escape>
C-g <escape> w <escape> x C-y <return>
Recent messages:
bibtex-fill-field-bounds
Undo!
Mark set
Type C-x 1 to remove help window.
Mark saved where search started
Mark set
Loading emacsbug...done
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: bibtex-clean-entry indents badly when splitting long lines
[not found] <mailman.5160.1187826082.32220.bug-gnu-emacs@gnu.org>
@ 2007-08-23 17:01 ` Roland Winkler
2007-08-24 15:22 ` Tim Hesterberg
0 siblings, 1 reply; 3+ messages in thread
From: Roland Winkler @ 2007-08-23 17:01 UTC (permalink / raw)
To: Tim Hesterberg; +Cc: bug-gnu-emacs
Tim Hesterberg <timh@insightful.com> writes:
> In emacs 22.1 the continuation line is indented incorrectly:
>
> @Article{turl00,
> author = {author},
> title = {This is a long title that is more than one line long
> and should be split into multiple lines},
> journal = {journal},
> year = {year}
> }
>
> My .emacs includes:
> (setq bibtex-include-OPTcrossref nil)
> (setq bibtex-include-OPTkey nil)
> (setq bibtex-maintain-sorted-entries t)
> (setq bibtex-text-indentation 16)
I cannot reproduce that.
Both in emacs 21.3 and 22.1 filling of fields is done only if
bibtex-entry-format includes also the option realign, i.e., you need
a line like the folliwng in your .emacs
(setq bibtex-entry-format '(opts-or-alts numerical-fields realign))
When I do that, I get the same filling you got with emacs 21.3.
Have you tried to reproduce the unintended behavior with
"emacs --no-init-file" and evaluating the above BibTeX settings in
the *scratch* buffer? As you noticed, the real work of filling is
now done by fill-region-as-paragraph, whereas emacs 21.3 used
do-auto-fill. Maybe you have some personal customizations that affect
the behavior of these general functions.
Roland
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: bibtex-clean-entry indents badly when splitting long lines
2007-08-23 17:01 ` bibtex-clean-entry indents badly when splitting long lines Roland Winkler
@ 2007-08-24 15:22 ` Tim Hesterberg
0 siblings, 0 replies; 3+ messages in thread
From: Tim Hesterberg @ 2007-08-24 15:22 UTC (permalink / raw)
To: Roland Winkler; +Cc: bug-gnu-emacs
Thanks for checking.
My apology - there were some additional relevant things in my .emacs:
(setq bibtex-entry-format '(opts-or-alts required-fields numerical-fields realign last-comma))
(add-hook 'bibtex-mode-hook
'(lambda ()
(setq fill-prefix nil); prevent C-o from indenting
))
It is setting the fill-prefix to nil that appears to cause this.
I set the fill-prefix to nil to prevent C-o open-line from indenting.
I'll look for another way to do that.
>Tim Hesterberg <timh@insightful.com> writes:
>> In emacs 22.1 the continuation line is indented incorrectly:
>>
>> @Article{turl00,
>> author = {author},
>> title = {This is a long title that is more than one line long
>> and should be split into multiple lines},
>> journal = {journal},
>> year = {year}
>> }
>>
>> My .emacs includes:
>> (setq bibtex-include-OPTcrossref nil)
>> (setq bibtex-include-OPTkey nil)
>> (setq bibtex-maintain-sorted-entries t)
>> (setq bibtex-text-indentation 16)
>
>I cannot reproduce that.
>
>Both in emacs 21.3 and 22.1 filling of fields is done only if
>bibtex-entry-format includes also the option realign, i.e., you need
>a line like the folliwng in your .emacs
>
>(setq bibtex-entry-format '(opts-or-alts numerical-fields realign))
>
>When I do that, I get the same filling you got with emacs 21.3.
>
>Have you tried to reproduce the unintended behavior with
>"emacs --no-init-file" and evaluating the above BibTeX settings in
>the *scratch* buffer? As you noticed, the real work of filling is
>now done by fill-region-as-paragraph, whereas emacs 21.3 used
>do-auto-fill. Maybe you have some personal customizations that affect
>the behavior of these general functions.
>
>Roland
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-24 15:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.5160.1187826082.32220.bug-gnu-emacs@gnu.org>
2007-08-23 17:01 ` bibtex-clean-entry indents badly when splitting long lines Roland Winkler
2007-08-24 15:22 ` Tim Hesterberg
2007-08-22 23:39 Tim Hesterberg
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).