From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: "Why is emacs so square?" Date: Fri, 05 Jun 2020 17:00:33 +0300 Message-ID: <833679boji.fsf@gnu.org> References: <863691n4xl.wl-me@enzu.ru> <86blno9yle.wl-me@enzu.ru> <87d0845msg.fsf@yahoo.com> <87h7xgjasw.fsf@yahoo.com> <875zdwjais.fsf@yahoo.com> <6a198677-41b6-4dbd-39d0-2b01550d53cf@yandex.ru> <32f6a2ce-e30f-059f-dcd4-233d666a10a1@yandex.ru> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="74390"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sb@dod.no, rms@gnu.org, emacs-devel@gnu.org To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 05 16:02:52 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jhCvr-000JFr-ME for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Jun 2020 16:02:51 +0200 Original-Received: from localhost ([::1]:42786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhCvq-0000uA-O6 for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Jun 2020 10:02:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhCu2-00088I-Ls for emacs-devel@gnu.org; Fri, 05 Jun 2020 10:00:59 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36987) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhCu0-00043K-Kx; Fri, 05 Jun 2020 10:00:56 -0400 Original-Received: from [176.228.60.248] (port=3389 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jhCtq-000604-Gu; Fri, 05 Jun 2020 10:00:47 -0400 In-Reply-To: (message from Arthur Miller on Fri, 05 Jun 2020 15:01:13 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251900 Archived-At: > From: Arthur Miller > Date: Fri, 05 Jun 2020 15:01:13 +0200 > Cc: sb@dod.no, emacs-devel@gnu.org > > Anyway what about if emacs had a print-page-mode as a minor mode for > displaying some printing hints in text modes? I am not sure if I can > write such, but here is idea: > > * provide a database of predefined paper sizes as specified on: > https://www.papersizes.org/a-sizes-in-pixels.htm > to be used as templates for width and height (in pixels) > > * advice insert funcion(s) to check for current line pixel-width and > pixel-height. If width or height exceed template width and height then > insert ^L to denote page break and move point to next line and insert > text in next line. If width is exceeded maybe it is just enough to > move point to next line, but when height for a page is exceeded one > would need a special char to visualize page break. > > As I understand Emacs already has some support for page breaks (^L) as I > learned myself very recently :-). There is extended page handling in > Emacs and also a mode called PageMode: > > https://www.emacswiki.org/emacs/PageMode > > I am not sure, but what I think is missing is just to tie those things > to paper sizes and automize page creation based on some paper template > which is nothing but a pixel-width and pixel-height. I am not sure, I > haven't used PageMode myself, I just learned about it. > > I am not sure how efficient it would be to check for pixel-width and height > on every char insertion, maybe there is some better way? All of this is already available, although not all of it is exposed to Lisp. Taking advantage of existing pixel-level capabilities is part of the job of providing the features that Richard has in mind. > It would be nice if Emacs could draw a thin line to denote edges, or a > rectangle of page size below the text as word processors do We already can display such thin lines, see, for example, help-fns.el (search for ":height"). No X-level graphics is needed.