GNU bug report logs - #15580
[PATCH] 24.3.50; subword-capitalize at the end of a buffer jumps to the beginning

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Thu, 10 Oct 2013 07:02:01 UTC

Severity: normal

Tags: patch

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#15580: closed ([PATCH] 24.3.50; subword-capitalize at the end
 of a buffer jumps to the beginning)
Date: Wed, 16 Oct 2013 03:04:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 15 Oct 2013 23:03:11 -0400
with message-id <jwv8uxtncmr.fsf-monnier+emacsbugs <at> gnu.org>
and subject line Re: bug#15580: [PATCH] 24.3.50; subword-capitalize at the end of a buffer jumps to the beginning
has caused the debbugs.gnu.org bug report #15580,
regarding [PATCH] 24.3.50; subword-capitalize at the end of a buffer jumps to the beginning
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
15580: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15580
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Dima Kogan <dima <at> secretsauce.net>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] 24.3.50;
 subword-capitalize at the end of a buffer jumps to the beginning
Date: Thu, 10 Oct 2013 00:01:22 -0700
[Message part 3 (text/plain, inline)]
Hi.

I'm observing subword-capitalize get confused when called near the end
of a buffer. Instead of doing nothing like capitalize-word does,
subword-capitalize jumps to around the beginning of the buffer and
capitalizes something there.

The cause is simple. subword-capitalize does

(re-search-forward "[[:alpha:]]" ....)

and uses the results of this search even if it failed. The attached
patch explicitly checks for search failure and exits the function in
that case.

[0001-subword-capitalize-now-fails-gracefully-at-end-of-bu.patch (text/x-diff, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Dima Kogan <dima <at> secretsauce.net>
Cc: 15580-done <at> debbugs.gnu.org
Subject: Re: bug#15580: [PATCH] 24.3.50;
 subword-capitalize at the end of a buffer jumps to the beginning
Date: Tue, 15 Oct 2013 23:03:11 -0400
> Thanks for looking at this. I tried the fix you made in the repo, and it
> has two issues:

Duh!

> I'm attaching a patch to fix these two issues

Thank you very much.  Installed as-is for fear of messing up again,


        Stefan


This bug report was last modified 11 years and 279 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.