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

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

filling long html href


From: Kevin Ryde
Subject: filling long html href
Date: Thu, 19 Apr 2007 11:26:24 +1000
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux)

In my build of a recent cvs or with the debian emacs snapshot,
paragraph filling the file foo.html below using

        emacs -Q foo.html
        M-q

produces

fjdafd jkfad fjksda
jfkad <a
href="jkdafjkdsajfkdsjfkjasdkfjasdkfjksdajfkdsjafkdasjfkjsfkjasdkfjasdkfjkasdjfkasd">something</a>
fjdkajfkdajf

where I hoped to get

fjdafd jkfad fjksda jfkad
<a 
href="jkdafjkdsajfkdsjfkjasdkfjasdkfjksdajfkdsjafkdasjfkjsfkjasdkfjasdkfjkasdjfkasd">something</a>
fjdkajfkdajf

because I thought sgml-fill-nobreak in fill-nobreak-predicate would
prevent a break between "<a" and its "href=...".  The latter is what
you get in emacs 21, if you copy sgml-fill-nobreak to there.
        

Nosing around the code I think there's two things going on.

I see in fill-move-to-break-point that fill-nobreak-predicate is
ignored (let bound to nil) if there's no breaks found before
fill-column.  It seems to me not a good idea to sometimes obey that
var and sometimes not.  The docstring seems pretty definite when it
says "If it returns t, fill commands do not break the line there.".

Second I see that paragraph-start is setup so a tag like "<a" at the
start of a line is a paragraph start, so filling avoids a break
leaving that at the start of a line.  That rule is nice, but I wonder
if simple html markup like "<a" and "<code>" and whatnot could be non
paragraph starts, just ordinary parts of paragraph text, if you know
what I mean.  I expect that'd be good for paragraph move commands too.

fjdafd jkfad fjksda jfkad something fjdkajfkdajf


In GNU Emacs 22.0.97.1 (i586-pc-linux-gnu)
 of 2007-04-15 on blah
configured using `configure  'CFLAGS=-O' '--prefix=/down/emacs/b/inst' 
'INSTALL=/home/gg/bin/install-with-symlink''

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: en_AU
  locale-coding-system: iso-8859-1
  default-enable-multibyte-characters: t

Major mode: HTML

Minor modes in effect:
  encoded-kbd-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t

reply via email to

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