* Re: do-auto-fill bug?
[not found] <b9ybrka9n2j.fsf@jpl.org>
@ 2004-07-06 0:10 ` Katsumi Yamaoka
2004-07-06 4:38 ` Stefan
0 siblings, 1 reply; 4+ messages in thread
From: Katsumi Yamaoka @ 2004-07-06 0:10 UTC (permalink / raw)
Hi,
I sent a bug report to the pretest-bug list toward the end of
May, however there is no response so far. Is no one being
troubled with the problem? The patch I included in the report
seems to have no problem so far, and I hope it will be applied.
Thanks in advance.
-------------------- Start of forwarded message --------------------
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: emacs-pretest-bug@gnu.org
Subject: do-auto-fill bug?
Date: Thu, 27 May 2004 19:33:24 +0900
Message-ID: <b9ybrka9n2j.fsf@jpl.org>
Hi,
I'm being annoyed with a strange behavior in the auto-fill-mode.
When I type SPC at the end of a line and the column just equals
fill-column, breaking the line takes place at the end of the word
in front of one, not there. Here's an example:
---------x---------x---------x---------x---------x---------x---------x
The quick brown fox jumps over the lazy dog. The quick brown fox jumps
When fill-column is 70, that line will be folded as follows after
typing SPC at the end of the line:
---------x---------x---------x---------x---------x---------x---------x
The quick brown fox jumps over the lazy dog. The quick brown fox
jumps
I made a change temporarily like the following patch in order to
cope with the problem:
*** fill.el~ Sun Apr 18 22:21:52 2004
--- fill.el Thu May 27 10:29:30 2004
***************
*** 333,339 ****
and `fill-nobreak-invisible'."
(or
(and fill-nobreak-invisible (line-move-invisible (point)))
! (unless (bolp)
(or
;; Don't break after a period followed by just one space.
;; Move back to the previous place to break.
--- 333,339 ----
and `fill-nobreak-invisible'."
(or
(and fill-nobreak-invisible (line-move-invisible (point)))
! (unless (or (bolp) (looking-at "[ \t]*$"))
(or
;; Don't break after a period followed by just one space.
;; Move back to the previous place to break.
Regards,
--
Katsumi Yamaoka <yamaoka@jpl.org>
-------------------- End of forwarded message --------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: do-auto-fill bug?
2004-07-06 0:10 ` do-auto-fill bug? Katsumi Yamaoka
@ 2004-07-06 4:38 ` Stefan
2004-07-06 7:29 ` David Kastrup
0 siblings, 1 reply; 4+ messages in thread
From: Stefan @ 2004-07-06 4:38 UTC (permalink / raw)
Cc: emacs-devel
> I sent a bug report to the pretest-bug list toward the end of
> May, however there is no response so far. Is no one being
> troubled with the problem? The patch I included in the report
> seems to have no problem so far, and I hope it will be applied.
I've taken a quick look a while back but haven't had the time to come up
with a good bugfix yet. Maybe your patch (improved to also prevent
breaking in front of "[ \t]*$") is good enough,
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: do-auto-fill bug?
2004-07-06 4:38 ` Stefan
@ 2004-07-06 7:29 ` David Kastrup
2004-07-06 8:07 ` Katsumi Yamaoka
0 siblings, 1 reply; 4+ messages in thread
From: David Kastrup @ 2004-07-06 7:29 UTC (permalink / raw)
Cc: Katsumi Yamaoka, emacs-devel
Stefan <monnier@iro.umontreal.ca> writes:
> > I sent a bug report to the pretest-bug list toward the end of
> > May, however there is no response so far. Is no one being
> > troubled with the problem? The patch I included in the report
> > seems to have no problem so far, and I hope it will be applied.
>
> I've taken a quick look a while back but haven't had the time to come up
> with a good bugfix yet. Maybe your patch (improved to also prevent
> breaking in front of "[ \t]*$") is good enough,
I failed to followup on the following posting on emacs-pretest-bug.
Maybe one of the fixes is better than the other?
From: Richard Stallman <rms@gnu.org>
To: David Kastrup <dak@gnu.org>
CC: emacs-pretest-bug@gnu.org
Subject: Re: auto-fill-mode and filling paragraphs differ
References: <x5hdw31zyf.fsf@lola.goethe.zz>
Message-Id: <E1B9Hjs-0006U4-Re@fencepost.gnu.org>
Date: Fri, 02 Apr 2004 01:01:12 -0500
I would interpret this as the last permissable column of content.
According to C-x =, column 70 is the column _after_ fsafd. If we now
say "ok, at this column, the end of line is legal", it would appear
that auto-fill-mode wraps one column too early. I think that typing a
space immediately at the end of line should _not_ wrap the preceding
word to the next line, but merely replace the typed space (instead of
the last space before that) with a newline.
I agree with you. Does this patch give correct results?
*** fill.el.~1.170.~ Fri Mar 26 12:04:37 2004
--- fill.el Thu Apr 1 23:12:54 2004
***************
*** 353,359 ****
;; Don't split a line if the rest would look like a new paragraph.
(unless use-hard-newlines
(save-excursion
! (skip-chars-forward " \t") (looking-at paragraph-start)))
(run-hook-with-args-until-success 'fill-nobreak-predicate)))))
;; Put `fill-find-break-point-function' property to charsets which
--- 353,364 ----
;; Don't split a line if the rest would look like a new paragraph.
(unless use-hard-newlines
(save-excursion
! (skip-chars-forward " \t")
! ;; If this break point is at the end of the line,
! ;; which can occur for auto-fill, don't consider the newline
! ;; which follows as a reason to return t.
! (and (not (eolp))
! (looking-at paragraph-start))))
(run-hook-with-args-until-success 'fill-nobreak-predicate)))))
;; Put `fill-find-break-point-function' property to charsets which
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: do-auto-fill bug?
2004-07-06 7:29 ` David Kastrup
@ 2004-07-06 8:07 ` Katsumi Yamaoka
0 siblings, 0 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2004-07-06 8:07 UTC (permalink / raw)
Cc: Stefan, emacs-devel
>>>>> In <x5smc5r3tz.fsf@lola.goethe.zz>
>>>>> David Kastrup <dak@gnu.org> wrote:
> Stefan <monnier@iro.umontreal.ca> writes:
>> I've taken a quick look a while back but haven't had the time to come up
>> with a good bugfix yet. Maybe your patch (improved to also prevent
>> breaking in front of "[ \t]*$") is good enough,
> I failed to followup on the following posting on emacs-pretest-bug.
> Maybe one of the fixes is better than the other?
[...]
RMS> I agree with you. Does this patch give correct results?
> *** fill.el.~1.170.~ Fri Mar 26 12:04:37 2004
> --- fill.el Thu Apr 1 23:12:54 2004
The patch also fulfills my purpose. I've never been scrutinizing
the side effects of those fixes, but this may be better.
--
Katsumi Yamaoka <yamaoka@jpl.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-07-06 8:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <b9ybrka9n2j.fsf@jpl.org>
2004-07-06 0:10 ` do-auto-fill bug? Katsumi Yamaoka
2004-07-06 4:38 ` Stefan
2004-07-06 7:29 ` David Kastrup
2004-07-06 8:07 ` Katsumi Yamaoka
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).