Bug#307260: apel: Invalid character errors

2005-05-27 Thread Tatsuya Kinoshita
tags 307260 + upstream
tags 307260 + patch
tags 307260 + pending
thanks

On May 3, 2005 at 2:46AM +0900,
tats (at vega.ocn.ne.jp) wrote:

  Invalid character: 020031, 8217, 0x2019 errors while working.

  /usr/share/emacs21/site-lisp/apel/poem.el:82:
  (defalias-maybe 'char-or-char-int-p 'integerp)

  char-or-char-int-p is always bound to integerp.  Gnus' nnrss.el uses
  Gnus' mm-util.el, in which char-or-char-int-p is used if it exists
  (char-valid-p otherwise).  But with APEL loaded, char-or-char-int-p
  isn't reliable anymore...

 Thanks for the report.  I'll ask the upstream developers about this.

I asked, and the following patch has been applied to the upstream
CVS version.  This bug will be fixed in post-sarge.


--- apel.orig/poem.el
+++ apel/poem.el
@@ -77,9 +77,15 @@

 (defalias-maybe 'int-char 'identity)

-(defalias-maybe 'characterp 'integerp)
-
-(defalias-maybe 'char-or-char-int-p 'integerp)
+(defalias-maybe 'characterp
+  (cond
+   ((fboundp 'char-valid-p) 'char-valid-p)
+   (t 'integerp)))
+
+(defalias-maybe 'char-or-char-int-p
+  (cond
+   ((fboundp 'char-valid-p) 'char-valid-p)
+   (t 'integerp)))

 (defun-maybe char-octet (ch optional n)
   Return the octet numbered N (should be 0 or 1) of char CH.


Thanks,
--
Tatsuya Kinoshita


pgp4ltVpdBVHt.pgp
Description: PGP signature


Bug#307260: apel: Invalid character errors

2005-05-02 Thread Boris Daix
Package: apel
Version: 10.6+0.20040418-1
Severity: normal

Hello,

Emacs-ist for two years or so, I've often been disturbed by mysterious
Invalid character: 020031, 8217, 0x2019 errors while working.
Especially, I wasn't able to use nnrss backend in Gnus, that fetches
and converts RSS streams in Gnus articles.  Now I know what makes it
fail:

/usr/share/emacs21/site-lisp/apel/poem.el:82:
(defalias-maybe 'char-or-char-int-p 'integerp)

As APEL is loaded from /etc/emacs/site-start.d/ with rank 20 (quite
normal for a library on which other stuff will rely),
char-or-char-int-p is always bound to integerp.  Gnus' nnrss.el uses
Gnus' mm-util.el, in which char-or-char-int-p is used if it exists
(char-valid-p otherwise).  But with APEL loaded, char-or-char-int-p
isn't reliable anymore...

E.g., the following sexp reproduces above error:
(message Char 8217: %c
 (if (char-or-char-int-p 8217) 8217))

I'm afraid other errors could occur with such defalias-maybe macros
loaded from poem.el (characterp, ...).  Wouldn't it be possible to
bind those predicates more precisely, or to prefix them with poem-?
Besides, why poem is loaded in case mule-ucs is available (rank 40 in
site-start.d)?

Best regards,
-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (1001, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.11-1-686
Locale: LANG=fr_FR, LC_CTYPE=fr_FR (charmap=ISO-8859-1) (ignored: LC_ALL set to 
fr_FR)

Versions of packages apel depends on:
ii  debianutils   2.13.2 Miscellaneous utilities specific t
ii  emacs21-nox [emacsen] 21.4a-1The GNU Emacs editor (without X su
ii  make  3.80-9 The GNU version of the make util

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#307260: apel: Invalid character errors

2005-05-02 Thread Tatsuya Kinoshita
On April 30, 2005 at 6:27PM +0200,
bdaix (at irisa.fr) wrote:

 Invalid character: 020031, 8217, 0x2019 errors while working.

 /usr/share/emacs21/site-lisp/apel/poem.el:82:
 (defalias-maybe 'char-or-char-int-p 'integerp)

 char-or-char-int-p is always bound to integerp.  Gnus' nnrss.el uses
 Gnus' mm-util.el, in which char-or-char-int-p is used if it exists
 (char-valid-p otherwise).  But with APEL loaded, char-or-char-int-p
 isn't reliable anymore...

Thanks for the report.  I'll ask the upstream developers about this.

The above code seems to be XEmacs emulation but not perfect.

To prevent the problem in Gnus, please put the following code in
your ~/.emacs:

(defalias 'mm-char-or-char-int-p
  (cond
   ((fboundp 'char-valid-p) 'char-valid-p)
   ((fboundp 'char-or-char-int-p) 'char-or-char-int-p)
   (t 'identity)))

 Besides, why poem is loaded in case mule-ucs is available (rank 40 in
 site-start.d)?

mule-ucs doesn't require poem, so even 20mule-ucs.el might work.

BTW, apel and mule-ucs are not normal applications that redefine and
improve common functions.

-- 
Tatsuya Kinoshita, maintainer of Debian apel package


pgpeK18fcAMsT.pgp
Description: PGP signature