[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: |
Sun, 07 Jun 2020 17:21:29 +0300 |
> From: Tomas Hlavaty <tom@logand.com>
> Cc: emacs-devel@gnu.org
> Date: Sun, 07 Jun 2020 10:03:35 +0200
>
> I poked around a bit and it seems that what I did in emacs-pdf
> (pdf-buffer function) is similar to what ps-print-buffer function does
> in ps-print and ps-mule with ps-multibyte-buffer set to nil.
BDF fonts were OK when ps-mule.el and ps-bdf.el were developed, but
nowadays I think you will find that many users will object to using
bitmapped fonts in printed matter. (There were plans to develop
ps-type1.el, but I don't think they materialized.) Caveat emptor.
> There is frame-position but no window-position. Is there a way to get
> window position in a frame?
Is window-edges what you want?
> >> For example, I would like to browse OpenStreetMap in Emacs. I wrote
> >> a console based OSM browser osmq
> >> <https://logand.com/sw/osmq/log.html> and web-based OSM browser at
> >> <https://osmq.eu/>. I would prefer an Emacs based map browser.
> >> However, I have not figured out how to lay out images in Emacs in a
> >> grid and how to detect which image was clicked. A bonus would be,
> >> where exactly was clicked. Any ideas what should I look into?
> >
> > Emacs supports "hot spots" on images for this: a click on an image
> > returns information about pixel-resolution offset of the click from
> > the image origin. I think that's what you want, although I'm not 100%
> > sure.
>
> Yes. Is there an example how to start with this?
I suggest to read "Click Events" and "Accessing Mouse" in the ELisp
manual, I think the description there is clear enough to let you write
code even without examples.
> > We also support displaying slices of images, in case that helps to
> > produce a smarter layout of images.
>
> Great. Is there an example?
Likewise here: I suggest to read "Showing Images", where this is
described.
Re: "Why is emacs so square?", Tomas Hlavaty, 2020/06/05
Re: "Why is emacs so square?", Richard Stallman, 2020/06/07
Re: "Why is emacs so square?", Ricardo Wurmus, 2020/06/16