From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: using glyphs by default in perl-mode Date: Fri, 07 Jun 2013 17:52:10 +0300 Message-ID: <83obbit1lx.fsf@gnu.org> References: <87d2sp92vb.fsf@lifelogs.com> <87bo877kf7.fsf@lifelogs.com> <87obbs7cew.fsf@lifelogs.com> <87ip1y54fx.fsf@lifelogs.com> <87ehck6670.fsf@lifelogs.com> <87a9n854tx.fsf@lifelogs.com> <8761xw54rv.fsf@lifelogs.com> <87sj0y4p7h.fsf@lifelogs.com> <87ppw13aky.fsf@lifelogs.com> <874ndc39bt.fsf@lifelogs.com> <83d2ryv0cn.fsf@gnu.org> <87wqq6qe6n.fsf@lifelogs.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1370616760 17274 80.91.229.3 (7 Jun 2013 14:52:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Jun 2013 14:52:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 07 16:52:40 2013 Return-path: Envelope-to: ged-emacs-devel@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 1Uky1v-0006uL-UF for ged-emacs-devel@m.gmane.org; Fri, 07 Jun 2013 16:52:40 +0200 Original-Received: from localhost ([::1]:48583 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uky1v-0004Bo-Hj for ged-emacs-devel@m.gmane.org; Fri, 07 Jun 2013 10:52:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uky1o-00045f-IA for emacs-devel@gnu.org; Fri, 07 Jun 2013 10:52:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uky1n-0005YU-12 for emacs-devel@gnu.org; Fri, 07 Jun 2013 10:52:32 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:33254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uky1m-0005YF-IJ for emacs-devel@gnu.org; Fri, 07 Jun 2013 10:52:30 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MO1000002J29H00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Fri, 07 Jun 2013 17:52:29 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MO100MCI2NCXUB0@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Fri, 07 Jun 2013 17:52:25 +0300 (IDT) In-reply-to: <87wqq6qe6n.fsf@lifelogs.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:160222 Archived-At: > From: Ted Zlatanov > Date: Fri, 07 Jun 2013 08:48:48 -0400 > > OK, but read that sentence again. Can you really make sense of it? Yes, definitely. I wonder what makes it illegible for you. (No, I didn't write that doc string.) > >> It would be really nice to be able to [...] use an image to create a > >> glyph. > > EZ> I don't understand this: Emacs _can_ display an image, so what can you > EZ> possibly mean by "use an image to create a glyph"? What is a "glyph" > EZ> in this context? > > Currently, AFAIK Emacs treats images as a text property. More accurately, you display images by creating text properties with images as their values. > This is > convenient but there are many cases where I'd rather have images behave > like typed characters: one image == one character == one glyph. Then create a font. That's what you want. Emacs cannot display text as something else except via text properties or overlays. > (make-char 'image "/tmp/gnus.png") > > will produce something that respects font size, can be scaled, and looks > like a character to all Emacs functions but like an image visually. In > text mode or without image support it would be treated like a character > that can't be rendered. This doesn't make sense to me: a character has many properties and attributes that the above doesn't provide. Displaying an image as a character means that you will need to implement a font library, or something close. Why can't you generate a set of strings with display properties, and then insert them into a buffer? After all, a single-character string should do what you want, no?