GNU bug report logs - #17903
Man-softhyphen-to-minus error when current-language-environment is shorter than 6 characters

Previous Next

Package: emacs;

Reported by: Nick Dokos <ndokos <at> gmail.com>

Date: Wed, 2 Jul 2014 20:12:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17903 in the body.
You can then email your comments to 17903 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#17903; Package emacs. (Wed, 02 Jul 2014 20:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nick Dokos <ndokos <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 02 Jul 2014 20:12:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nick Dokos <ndokos <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Man-softhyphen-to-minus error when current-language-environment is
 shorter than 6 characters
Date: Wed, 2 Jul 2014 15:59:23 -0400
[Message part 1 (text/plain, inline)]
My current-language-environment is "UTF-8" and every time I do M-x man to
get a new manpage, I get the error

Man-softhyphen-to-minus: Args out of range: "UTF-8", 0, 6

Here's a patch (although this is sent with gmail - don't ask - and it might
be mangled beyond recognition):

diff --git a/lisp/man.el b/lisp/man.el
index 4b23530..24daca1 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -1177,7 +1177,8 @@ See the variable `Man-notify-method' for the
different notification behaviors."
   ;; \255 is SOFT HYPHEN in Latin-N.  Versions of Debian man, at
   ;; least, emit it even when not in a Latin-N locale.
   (unless (eq t (compare-strings "latin-" 0 nil
- current-language-environment 0 6 t))
+ current-language-environment
+ 0 (min 6 (length current-language-environment)) t))
     (goto-char (point-min))
     (let ((str "\255"))
       (if enable-multibyte-characters
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17903; Package emacs. (Wed, 02 Jul 2014 20:46:01 GMT) Full text and rfc822 format available.

Message #8 received at 17903 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 17903 <at> debbugs.gnu.org
Cc: Nick Dokos <ndokos <at> gmail.com>
Subject: Re: bug#17903: Man-softhyphen-to-minus error when
 current-language-environment is shorter than 6 characters
Date: Wed, 02 Jul 2014 16:45:37 -0400
First fallout from "Do not allow out-of-range character position in
Fcompare_strings".

Ref: http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00470.html




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17903; Package emacs. (Tue, 08 Jul 2014 02:00:05 GMT) Full text and rfc822 format available.

Message #11 received at 17903 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 17903 <at> debbugs.gnu.org, dmantipov <at> yandex.ru
Cc: Nick Dokos <ndokos <at> gmail.com>
Subject: Re: bug#17903: Man-softhyphen-to-minus error when
 current-language-environment is shorter than 6 characters
Date: Mon, 07 Jul 2014 21:59:53 -0400
Glenn Morris wrote:

> First fallout from "Do not allow out-of-range character position in
> Fcompare_strings".
>
> Ref: http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00470.html

Dmitry, please could you fix this? You'll also need to keep an eye out
for future reports with these symptoms. (Are you sure this change is
worth the pain it will cause?)

BTW, this is another change that needs an "incompatible change" NEWS entry.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17903; Package emacs. (Mon, 21 Jul 2014 09:51:02 GMT) Full text and rfc822 format available.

Message #14 received at 17903 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: dmantipov <at> yandex.ru
Cc: 17903 <at> debbugs.gnu.org
Subject: Re: bug#17903: Man-softhyphen-to-minus error when
 current-language-environment is shorter than 6 characters
Date: Mon, 21 Jul 2014 05:50:11 -0400
Hi - just a reminder about this issue.

Glenn Morris wrote:

>> First fallout from "Do not allow out-of-range character position in
>> Fcompare_strings".
>>
>> Ref: http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00470.html
>
> Dmitry, please could you fix this? You'll also need to keep an eye out
> for future reports with these symptoms. (Are you sure this change is
> worth the pain it will cause?)
>
> BTW, this is another change that needs an "incompatible change" NEWS entry.




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Sat, 02 Aug 2014 16:23:02 GMT) Full text and rfc822 format available.

Notification sent to Nick Dokos <ndokos <at> gmail.com>:
bug acknowledged by developer. (Sat, 02 Aug 2014 16:23:03 GMT) Full text and rfc822 format available.

Message #19 received at 17903-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 17903-done <at> debbugs.gnu.org
Cc: Glenn Morris <rgm <at> gnu.org>, Dmitry Antipov <dmantipov <at> yandex.ru>
Subject: Re: [Noah Friedman] Man-softhyphen-to-minus
Date: Sat, 02 Aug 2014 09:21:54 -0700
In trunk bzr 117628 I fixed this by changing compare-strings to silently 
bring too-large positive end values into range, making it more 
compatible with traditional behavior.  If we were designing 
compare-strings from scratch the extra checking could be helpful, but I 
doubt whether we have the time to find and fix all the contrary uses now.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 31 Aug 2014 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 261 days ago.

Previous Next


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