emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Why is emacs so square?"


From: Arthur Miller
Subject: Re: "Why is emacs so square?"
Date: Fri, 05 Jun 2020 15:01:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > > When I write a pamphlet using Libre Office, I need to see how it
>   > > will appear on the page.  I need to see where line breaks and paragraph
>   > > breaks appear.
>   > >
>   > > I want Emacs to be able to do tect processing that way.
>   > When you say page, you mean a printed page on paper?
>
> Of course.  A pamphlet is for handing out.
>
>   > Can't that be helped with some of live preview options for a pdf or ps
>   > or latex format? Auctex maybe? Or maybe some of org -> pdf/ps + DocView?
>
> It would probably take half a minute each time.  I am sure you
> understand the advantage of WYSIWYG.  Especially when the text needs
> to fit in a limited space.
I understand that wysiwyg is easier and I understand your concern
for delays. I believe those delays would not be noticable for a pamphlet
(A4/A5 size?) if you used html as intermediate format.

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?

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, but that
would ask for some c and exposing of some graphics (XDrawRect & co) to
elisp?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]