emacs_chrome icon indicating copy to clipboard operation
emacs_chrome copied to clipboard

Wishlist: Match the emacs frame's look with the text box

Open wh5a opened this issue 15 years ago • 3 comments

It would be awesome if the popup frame's font, width and height could exactly match with the text box. I tried for a while but didn't get anywhere.

wh5a avatar Jan 23 '10 17:01 wh5a

Here's some idea:

In the content script, get the textarea's clientWidth and clientHeight properties in pixels. In Emacs, use frame-char-height and frame-char-width to convert them to units of characters. Then it's easy to set the frame's height and width.

A remaining issue is to communicate the width/height information to Emacs server. How do we achieve this? Can we pass json and use a json library on the Emacs side? Or are we going to append the information before the text, and hand-parse it in Emacs?

I suppose font can be handled similarly.

wh5a avatar Jan 23 '10 20:01 wh5a

Awesome! I've finished implementing this feature, except for the font part.

wh5a avatar Jan 23 '10 22:01 wh5a

If you implement this, I'd prefer it be optional. One reason I prefer an external editor is to have an editing region that stays visually consistent and is frequently much larger than what appears in the browser.

krishnoid avatar Sep 15 '11 01:09 krishnoid