[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Why is emacs so square?"
From: |
Eli Zaretskii |
Subject: |
Re: "Why is emacs so square?" |
Date: |
Fri, 05 Jun 2020 17:00:33 +0300 |
> From: Arthur Miller <arthur.miller@live.com>
> 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.
- Re: "Why is emacs so square?", (continued)
Re: "Why is emacs so square?", Richard Stallman, 2020/06/04
- Re: "Why is emacs so square?", Marcin Borkowski, 2020/06/05
- Re: "Why is emacs so square?", Richard Stallman, 2020/06/05
- Re: "Why is emacs so square?", Arthur Miller, 2020/06/06
- Re: "Why is emacs so square?", Richard Stallman, 2020/06/06
- Re: "Why is emacs so square?", Arthur Miller, 2020/06/07
Re: "Why is emacs so square?", Arthur Miller, 2020/06/05
Re: "Why is emacs so square?",
Eli Zaretskii <=
Re: "Why is emacs so square?", Arthur Miller, 2020/06/05
Re: "Why is emacs so square?", Eli Zaretskii, 2020/06/05
Re: "Why is emacs so square?", Tomas Hlavaty, 2020/06/05
Re: "Why is emacs so square?", Eli Zaretskii, 2020/06/05
Re: "Why is emacs so square?", Tomas Hlavaty, 2020/06/06
Re: "Why is emacs so square?", Richard Stallman, 2020/06/05
Re: "Why is emacs so square?", Eli Zaretskii, 2020/06/06
Re: "Why is emacs so square?", Bob Newell, 2020/06/05
Re: "Why is emacs so square?", Tomas Hlavaty, 2020/06/05