From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rustom Mody Newsgroups: gmane.emacs.bugs Subject: bug#12111: 23.4; Display problem with devanagari Date: Wed, 1 Aug 2012 17:38:38 +0530 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d0447a119b74e9504c6332747 X-Trace: dough.gmane.org 1343822991 29218 80.91.229.3 (1 Aug 2012 12:09:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Aug 2012 12:09:51 +0000 (UTC) To: 12111@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 01 14:09:51 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SwXkL-0005in-Pa for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Aug 2012 14:09:50 +0200 Original-Received: from localhost ([::1]:50723 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwXkL-0007xf-2Z for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Aug 2012 08:09:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwXkC-0007wp-NG for bug-gnu-emacs@gnu.org; Wed, 01 Aug 2012 08:09:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwXkA-000182-7R for bug-gnu-emacs@gnu.org; Wed, 01 Aug 2012 08:09:40 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwXkA-00017s-3i for bug-gnu-emacs@gnu.org; Wed, 01 Aug 2012 08:09:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SwXrK-0001Ak-9B for bug-gnu-emacs@gnu.org; Wed, 01 Aug 2012 08:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rustom Mody Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Aug 2012 12:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12111 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13438233814403 (code B ref -1); Wed, 01 Aug 2012 12:17:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Aug 2012 12:16:21 +0000 Original-Received: from localhost ([127.0.0.1]:54385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SwXqe-00018x-IH for submit@debbugs.gnu.org; Wed, 01 Aug 2012 08:16:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33001) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SwXqb-00018l-Ly for submit@debbugs.gnu.org; Wed, 01 Aug 2012 08:16:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwXjK-00011Q-IU for submit@debbugs.gnu.org; Wed, 01 Aug 2012 08:08:53 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:60180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwXjK-00011J-EK for submit@debbugs.gnu.org; Wed, 01 Aug 2012 08:08:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwXjI-0007qB-KF for bug-gnu-emacs@gnu.org; Wed, 01 Aug 2012 08:08:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwXjE-0000zt-Gc for bug-gnu-emacs@gnu.org; Wed, 01 Aug 2012 08:08:44 -0400 Original-Received: from mail-yw0-f41.google.com ([209.85.213.41]:53793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwXjE-0000zn-As for bug-gnu-emacs@gnu.org; Wed, 01 Aug 2012 08:08:40 -0400 Original-Received: by yhr47 with SMTP id 47so8384844yhr.0 for ; Wed, 01 Aug 2012 05:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=/VuuzJDYqOwWCYR/ZwWHXOHkfz45xJmJj0N0q9tO6CA=; b=iwKlG4c4uK3y9e7lZe2Y6BjDhczQEuPKh7SD/esC3LVaSe/OpZ2AXHiv/26ZpBIJLP VBBw6Ce3nXjXoti+yu6uTuG1L3bEvLlANPnFlomGlWgSTgQjy9BTOg13cR7XcASYBJlU qd4NtqFm52atD5WEwhm+0uyVzpUab4HnQxie0IZgwTupH4X4koAIB4czW7g9xkC8Y/lm sK5w6FksRtInKrstkBnyNDdc/Q1LwmD9W3EaU8GQ5b9P30LqbyLaHOb7tjNtE5aR5m7v Vk4t/duxmm7Sg9Yc1iurPXLTuKkx/RlwCih0AWqHotrqFVlFs9vxzMuuJE3QtuOctnbD SrsA== Original-Received: by 10.50.237.73 with SMTP id va9mr5041232igc.3.1343822918798; Wed, 01 Aug 2012 05:08:38 -0700 (PDT) Original-Received: by 10.231.13.204 with HTTP; Wed, 1 Aug 2012 05:08:38 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62714 Archived-At: --f46d0447a119b74e9504c6332747 Content-Type: text/plain; charset=ISO-8859-1 I see a certain wrong behavior with emacs involving fonts and unicode (devanagari). I have a small elisp function that generates devanagari in a new buffer. When the unicode is generated, the display is wrong. If the badly displaying buffer is saved, emacs is exited and restarted, it is displayed correct. The problem could be with the (adobe) font. However there is also some issue with the display in emacs which is perhaps not correct. To make it happen the following are needed: .Xresources containing the 1 line: emacs*font: -adobe-courier-medium-r-normal--12-120-75-75-m-70-iso10646-1 Of course the font should be installed. A text file called roman.txt with the two lines (for translating to devanagari) ----------------- saMprApte DukRRiMkaraNe ---------------- The following elisp in a file say apply-input-method.el Now call emacs as emacs -q -l apply-input-method.el roman.txt (-Q does not work) And then call F4 ie rpm-apply-input-method. A new frame should open with two lines of devanagari with the newline between the two lines *looking* as though it is 1 page wide, though it is only 1 newline. In short the newline displays as though it were some 20 or so lines. The elisp file: apply-input-method.el ---------------------- (setq rpm-input-method "devanagari-itrans") (defun rpm-apply-input-method () "buffer to buffer apply input method with buffering windowing stuff mixed up" (interactive) (let* ((inp (buffer-substring-no-properties (point-min) (point-max))) (filename (file-name-nondirectory (buffer-file-name))) (outname (concat (file-name-sans-extension filename) "-hi" (file-name-extension filename t))) (p)) (switch-to-buffer-other-frame outname) (save-excursion (save-window-excursion (setq buffer-file-coding-system 'utf-8) (set-input-method rpm-input-method t) (setq p (point)) (erase-buffer) (execute-kbd-macro inp))) (goto-char p) (other-frame 1))) (global-set-key [f4] 'rpm-apply-input-method) If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /usr/share/emacs/23.4/etc/DEBUG. In GNU Emacs 23.4.1 (i486-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-04-08 on biber, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11201902 configured using `configure '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.4/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/i386-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -DDEBIAN -O2' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' 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_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Text Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x r e p o r t - e m Recent messages: Loading /etc/emacs/site-start.d/50global.el (source)...done Loading /etc/emacs/site-start.d/50ledger.el (source)...done Loading /etc/emacs/site-start.d/50lilypond-data.el (source)...done Loading /etc/emacs/site-start.d/50psvn.el (source)...done Loading /etc/emacs/site-start.d/50pydb.el (source)...done For information about GNU Emacs and the GNU system, type C-h C-a. Loading quail/indian...done byte-code: Beginning of buffer [3 times] byte-code: End of buffer [3 times] byte-code: Beginning of buffer [2 times] byte-code: Beginning of buffer Load-path shadows: /usr/share/emacs/23.4/site-lisp/cscope/xcscope hides /usr/share/emacs/site-lisp/xcscope /usr/share/emacs/23.4/site-lisp/cdargs hides /usr/share/emacs/site-lisp/cdargs /usr/share/emacs/23.4/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /usr/share/emacs/site-lisp/tree-widget hides /usr/share/emacs/23.4/lisp/tree-widget /usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.4/lisp/textmodes/flyspell /usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.4/lisp/textmodes/ispell Features: (shadow sort mail-extr message sendmail ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug cus-start cus-load ind-util regexp-opt quail help-mode easymenu view tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs) --f46d0447a119b74e9504c6332747 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I see a certain wrong behavior with emacs involving fonts and unicode (deva= nagari).

I have a small elisp function that generates devanagari in = a new buffer.
When the unicode is generated, the display is wrong.
If the badly displaying buffer is saved, emacs is exited and restarted, it = is displayed correct.

The problem could be with the (adobe) font. Ho= wever there is also some issue with the display in emacs which is perhaps n= ot correct.

To make it happen the following are needed:
.Xresources containing t= he 1 line:
emacs*font: -adobe-courier-medium-r-normal--12-120-75-75-m-70= -iso10646-1

Of course the font should be installed.

A text fi= le called roman.txt with the two lines (for translating to devanagari)
-----------------
saMprApte
DukRRiMkaraNe
----------------

= The following elisp in a file say apply-input-method.el
Now call emacs a= s
emacs -q -l apply-input-method.el roman.txt
(-Q does not work)
And then call F4 ie rpm-apply-input-method.

A new frame should open = with two lines of devanagari with the newline between the two lines *lookin= g* as though it is 1 page wide,
though it is only 1 newline.

In short the newline displays as though it were some 20 or so lines.
The elisp file: apply-input-method.el
----------------------
(setq rpm-input-method "devanagari-itrans&qu= ot;)

(defun rpm-apply-input-method ()
=A0 "buffer to buffer = apply input method with buffering windowing stuff mixed up"
=A0 (in= teractive)
=A0 (let* ((inp (buffer-substring-no-properties (point-min) (point-max)))=A0=A0=A0=A0 (filename (file-name-nondirectory (buffer-file-name)))
= =A0=A0=A0=A0 (outname (concat (file-name-sans-extension filename)
=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 "-hi"
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (file-name-extension= filename t)))
=A0=A0=A0=A0 (p))
=A0=A0=A0 (switch-to-buffer-other-fr= ame outname)
=A0=A0=A0 (save-excursion
=A0=A0=A0=A0=A0 (save-window-e= xcursion
=A0=A0=A0 (setq buffer-file-coding-system 'utf-8)
=A0=A0=A0 (set-input-method rpm-input-method t)
=A0=A0=A0 (setq p (point= ))
=A0=A0=A0 (erase-buffer)
=A0=A0=A0 (execute-kbd-macro inp)))
= =A0=A0=A0 (goto-char p)
=A0=A0=A0 (other-frame 1)))

(global-set-k= ey [f4] 'rpm-apply-input-method)


If Emacs crashed, and you have the Emacs process in the gdb debugge= r,
please include the output from the following gdb commands:
=A0=A0= =A0 `bt full' and `xbacktrace'.
For information about debugging = Emacs, please read the file
/usr/share/emacs/23.4/etc/DEBUG.


In GNU Emacs 23.4.1 (i486-pc-li= nux-gnu, GTK+ Version 2.24.10)
=A0of 2012-04-08 on biber, modified by De= bian
Windowing system distributor `The X.Org Foundation', version 11= .0.11201902
configured using `configure=A0 '--build' 'i486-linux-gnu' &= #39;--build' 'i486-linux-gnu' '--prefix=3D/usr' '--= sharedstatedir=3D/var/lib' '--libexecdir=3D/usr/lib' '--loc= alstatedir=3D/var/lib' '--infodir=3D/usr/share/info' '--man= dir=3D/usr/share/man' '--with-pop=3Dyes' '--enable-locallis= ppath=3D/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.4/site-lisp:/usr/= local/share/emacs/site-lisp:/usr/share/emacs/23.4/site-lisp:/usr/share/emac= s/site-lisp' '--with-crt-dir=3D/usr/lib/i386-linux-gnu' '--= with-x=3Dyes' '--with-x-toolkit=3Dgtk' '--with-toolkit-scro= ll-bars' 'build_alias=3Di486-linux-gnu' 'CFLAGS=3D-g -O2 -f= stack-protector --param=3Dssp-buffer-size=3D4 -Wformat -Wformat-security -W= error=3Dformat-security -Wall -DDEBIAN -O2' 'CPPFLAGS=3D-D_FORTIFY_= SOURCE=3D2''

Important settings:
=A0 value of $LC_ALL: nil
=A0 value of $LC_CO= LLATE: nil
=A0 value of $LC_CTYPE: nil
=A0 value of $LC_MESSAGES: nil=
=A0 value of $LC_MONETARY: nil
=A0 value of $LC_NUMERIC: nil
=A0 = value of $LC_TIME: nil
=A0 value of $LANG: en_US.UTF-8
=A0 value of $XMODIFIERS: nil
=A0 loc= ale-coding-system: utf-8-unix
=A0 default enable-multibyte-characters: t=

Major mode: Text

Minor modes in effect:
=A0 tooltip-mode:= t
=A0 mouse-wheel-mode: t
=A0 tool-bar-mode: t
=A0 menu-bar-mode: t
= =A0 file-name-shadow-mode: t
=A0 global-font-lock-mode: t
=A0 font-lo= ck-mode: t
=A0 blink-cursor-mode: t
=A0 auto-encryption-mode: t
= =A0 auto-compression-mode: t
=A0 line-number-mode: t
=A0 transient-mark-mode: t

Recent input:<= br><f4> <switch-frame> <switch-frame> <help-echo> &= lt;help-echo>
<help-echo> <help-echo> <help-echo> = <help-echo> <switch-frame>
<down-mouse-4> <mouse-4> <double-down-mouse-4> <double= -mouse-4>
<triple-down-mouse-4> <triple-mouse-4> <dow= n-mouse-5>
<mouse-5> <double-down-mouse-5> <double-mo= use-5> <triple-down-mouse-5>
<triple-mouse-5> <down-mouse-4> <mouse-4> <double-down= -mouse-4>
<double-mouse-4> <triple-down-mouse-4> <tri= ple-mouse-4>
<help-echo> <help-echo> <help-echo> &= lt;help-echo> <help-echo>
<help-echo> M-x r e p o r t - e m <tab> <return>

R= ecent messages:
Loading /etc/emacs/site-start.d/50global.el (source)...d= one
Loading /etc/emacs/site-start.d/50ledger.el (source)...done
Loading /etc/emacs/site-start.d/50lilypond-data.el (source)...done
Loading /etc/emacs/site-start.d/50psvn.el (source)...done
Loading /etc/e= macs/site-start.d/50pydb.el (source)...done
For information about GNU Em= acs and the GNU system, type C-h C-a.
Loading quail/indian...done
byte-code: Beginning of buffer [3 times]
byte-code: End of buffer [3 tim= es]
byte-code: Beginning of buffer [2 times]
byte-code: Beginning of = buffer

Load-path shadows:
/usr/share/emacs/23.4/site-lisp/cscope/= xcscope hides /usr/share/emacs/site-lisp/xcscope
/usr/share/emacs/23.4/site-lisp/cdargs hides /usr/share/emacs/site-lisp/cda= rgs
/usr/share/emacs/23.4/site-lisp/cmake-data/cmake-mode hides /usr/sha= re/emacs/site-lisp/cmake-mode
/usr/share/emacs/site-lisp/tree-widget hid= es /usr/share/emacs/23.4/lisp/tree-widget
/usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/= emacs/23.4/lisp/textmodes/flyspell
/usr/share/emacs23/site-lisp/dictiona= ries-common/ispell hides /usr/share/emacs/23.4/lisp/textmodes/ispell

Features:
(shadow sort mail-extr message sendmail ecomplete rfc822 m= ml mml-sec
password-cache mm-decode mm-bodies mm-encode mailcap mail-par= se rfc2231
rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util n= etrc
time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1
= hex-util hashcash mail-utils emacsbug cus-start cus-load ind-util
regexp= -opt quail help-mode easymenu view tooltip ediff-hook vc-hooks
lisp-floa= t-type mwheel x-win x-dnd font-setting tool-bar dnd fontset
image fringe lisp-mode register page menu-bar rfn-eshadow timer select
s= croll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
fram= e cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet la= o korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
= simple abbrev loaddefs button minibuffer faces cus-face files
text-prope= rties overlay md5 base64 format env code-pages mule custom
widget hashta= ble-print-readable backquote make-network-process dbusbind
system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)
--f46d0447a119b74e9504c6332747--