unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Resizing frames and windows pixelwise
@ 2013-11-28 10:42 martin rudalics
  2013-11-28 17:13 ` Eli Zaretskii
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: martin rudalics @ 2013-11-28 10:42 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]

I intend to install the attached patch in the next days.  Its main
purpose is to allow pixelwise resizing of frames and windows.  In order
to resize frames pixelwise use the option `frame-resize-pixelwise'.  In
order to resize windows pixelwise customize `window-resize-pixelwise'.

In addition, you can use dividers between windows which can be activated
by customizing the frame parameters `right-divider-width' and
`bottom-divider-width'.  The patch should also remove gaps between side
by side windows and the necessity of extending the fringe of the
rightmost window.  Finally, functions like `fit-window-to-buffer' and
`fit-frame-to-buffer' will use the size of displayed text to resize
windows and frames accurately.

I tested the changes on Windows XP and GNU/Linux Debian 7.0.  I did not
test them on OS X since I do not have access to such a machine.  Likely,
Emacs will crash or simply fail to compile on such systems.  I'd greatly
appreciate if someone could help me testing and fixing that.

Thanks for your attention, martin

[-- Attachment #2: pixelwise.diff.gz --]
[-- Type: application/gzip, Size: 87769 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Resizing frames and windows pixelwise
  2013-11-28 10:42 Resizing frames and windows pixelwise martin rudalics
@ 2013-11-28 17:13 ` Eli Zaretskii
  2013-11-30 12:16 ` martin rudalics
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2013-11-28 17:13 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

> Date: Thu, 28 Nov 2013 11:42:32 +0100
> From: martin rudalics <rudalics@gmx.at>
> 
> I intend to install the attached patch in the next days.  Its main
> purpose is to allow pixelwise resizing of frames and windows.  In order
> to resize frames pixelwise use the option `frame-resize-pixelwise'.  In
> order to resize windows pixelwise customize `window-resize-pixelwise'.
> 
> In addition, you can use dividers between windows which can be activated
> by customizing the frame parameters `right-divider-width' and
> `bottom-divider-width'.  The patch should also remove gaps between side
> by side windows and the necessity of extending the fringe of the
> rightmost window.  Finally, functions like `fit-window-to-buffer' and
> `fit-frame-to-buffer' will use the size of displayed text to resize
> windows and frames accurately.

Thanks for doing this, Martin.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Resizing frames and windows pixelwise
  2013-11-28 10:42 Resizing frames and windows pixelwise martin rudalics
  2013-11-28 17:13 ` Eli Zaretskii
@ 2013-11-30 12:16 ` martin rudalics
  2013-11-30 16:59   ` Romain Francoise
  2013-12-01  7:50 ` Alp Aker
  2013-12-02  1:30 ` YAMAMOTO Mitsuharu
  3 siblings, 1 reply; 16+ messages in thread
From: martin rudalics @ 2013-11-30 12:16 UTC (permalink / raw)
  To: emacs-devel

 > I intend to install the attached patch in the next days.

Installed in revision 115301 on trunk.  I'll add the NEWS entries later.

martin



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Resizing frames and windows pixelwise
  2013-11-30 12:16 ` martin rudalics
@ 2013-11-30 16:59   ` Romain Francoise
  2013-11-30 17:03     ` martin rudalics
  0 siblings, 1 reply; 16+ messages in thread
From: Romain Francoise @ 2013-11-30 16:59 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

martin rudalics <rudalics@gmx.at> writes:

> Installed in revision 115301 on trunk.

Hmm, it looks like setting `width' and `height' in `initial-frame-alist'
now resizes the initial frame in terms of pixels and not characters? Is
that expected? Because my usual 80x81 characters frame is now much, much
smaller than I need it to be...

Thanks.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Resizing frames and windows pixelwise
  2013-11-30 16:59   ` Romain Francoise
@ 2013-11-30 17:03     ` martin rudalics
  2013-11-30 17:09       ` Romain Francoise
  0 siblings, 1 reply; 16+ messages in thread
From: martin rudalics @ 2013-11-30 17:03 UTC (permalink / raw)
  To: Romain Francoise; +Cc: emacs-devel

> Hmm, it looks like setting `width' and `height' in `initial-frame-alist'
> now resizes the initial frame in terms of pixels and not characters? Is
> that expected? Because my usual 80x81 characters frame is now much, much
> smaller than I need it to be...

Could you try the patch I proposed for bug#16013 ?

Thanks, martin



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Resizing frames and windows pixelwise
  2013-11-30 17:03     ` martin rudalics
@ 2013-11-30 17:09       ` Romain Francoise
  2013-12-01  9:45         ` martin rudalics
  2013-12-02 18:15         ` martin rudalics
  0 siblings, 2 replies; 16+ messages in thread
From: Romain Francoise @ 2013-11-30 17:09 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

martin rudalics <rudalics@gmx.at> writes:

> Could you try the patch I proposed for bug#16013 ?

Yep, the patch works for me. Thanks!



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Resizing frames and windows pixelwise
  2013-11-28 10:42 Resizing frames and windows pixelwise martin rudalics
  2013-11-28 17:13 ` Eli Zaretskii
  2013-11-30 12:16 ` martin rudalics
@ 2013-12-01  7:50 ` Alp Aker
  2013-12-01  9:45   ` martin rudalics
  2013-12-02  1:30 ` YAMAMOTO Mitsuharu
  3 siblings, 1 reply; 16+ messages in thread
From: Alp Aker @ 2013-12-01  7:50 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 383 bytes --]

> I tested the changes on Windows XP and GNU/Linux Debian 7.0.  I did not
> test them on OS X since I do not have access to such a machine.  Likely,
> Emacs will crash or simply fail to compile on such systems.  I'd greatly
> appreciate if someone could help me testing and fixing that.

This breaks the OS X build, as reported in
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16018.

[-- Attachment #2: Type: text/html, Size: 636 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Resizing frames and windows pixelwise
  2013-11-30 17:09       ` Romain Francoise
@ 2013-12-01  9:45         ` martin rudalics
  2013-12-02 18:15         ` martin rudalics
  1 sibling, 0 replies; 16+ messages in thread
From: martin rudalics @ 2013-12-01  9:45 UTC (permalink / raw)
  To: Romain Francoise; +Cc: emacs-devel

> Yep, the patch works for me. Thanks!

Are the sizes correct ?

martin



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Resizing frames and windows pixelwise
  2013-12-01  7:50 ` Alp Aker
@ 2013-12-01  9:45   ` martin rudalics
  0 siblings, 0 replies; 16+ messages in thread
From: martin rudalics @ 2013-12-01  9:45 UTC (permalink / raw)
  To: Alp Aker; +Cc: emacs-devel

> This breaks the OS X build, as reported in
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16018.

Unfortunately so.  Can you help fixing this ?

martin



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Resizing frames and windows pixelwise
  2013-11-28 10:42 Resizing frames and windows pixelwise martin rudalics
                   ` (2 preceding siblings ...)
  2013-12-01  7:50 ` Alp Aker
@ 2013-12-02  1:30 ` YAMAMOTO Mitsuharu
  2013-12-02  7:38   ` martin rudalics
  2013-12-20 10:59   ` martin rudalics
  3 siblings, 2 replies; 16+ messages in thread
From: YAMAMOTO Mitsuharu @ 2013-12-02  1:30 UTC (permalink / raw)
  To: emacs-devel

>>>>> On Thu, 28 Nov 2013 11:42:32 +0100, martin rudalics <rudalics@gmx.at> said:

> The patch should also remove gaps between side by side windows and
> the necessity of extending the fringe of the rightmost window.

I removed code for fringe background extension on X11 at revno:
115343.  I could also make similar changes at least on W32, but I
think it would be better to do so after changing some (actually, most
of) members in `struct scroll_bar' from Lisp_Object to non-Lisp_Object
in order to leave at least one non-Lisp_Object member for the use of
ALLOCATE_PSEUDOVECTOR (currently, `fringe_extended_p' is the only
non-Lisp_Object member).  Does anyone having access to W32 systems
want to make such a change?  Also, I guess the `w32_widget_low/high'
members are unused.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Resizing frames and windows pixelwise
  2013-12-02  1:30 ` YAMAMOTO Mitsuharu
@ 2013-12-02  7:38   ` martin rudalics
  2013-12-20 10:59   ` martin rudalics
  1 sibling, 0 replies; 16+ messages in thread
From: martin rudalics @ 2013-12-02  7:38 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: emacs-devel

 >> The patch should also remove gaps between side by side windows and
 >> the necessity of extending the fringe of the rightmost window.
 >
 > I removed code for fringe background extension on X11 at revno:
 > 115343.

Thanks.  I hope your change is not premature, though ...

 > I could also make similar changes at least on W32, but I
 > think it would be better to do so after changing some (actually, most
 > of) members in `struct scroll_bar' from Lisp_Object to non-Lisp_Object
 > in order to leave at least one non-Lisp_Object member for the use of
 > ALLOCATE_PSEUDOVECTOR (currently, `fringe_extended_p' is the only
 > non-Lisp_Object member).  Does anyone having access to W32 systems
 > want to make such a change?  Also, I guess the `w32_widget_low/high'
 > members are unused.

I shall do that as soon as I sorted out the major bugs introduced by my
changes.  Do you have experienced additional problems?  Do you have any
ideas how to proceed with the OS X build?

Thanks, martin



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Resizing frames and windows pixelwise
  2013-11-30 17:09       ` Romain Francoise
  2013-12-01  9:45         ` martin rudalics
@ 2013-12-02 18:15         ` martin rudalics
  2013-12-02 21:48           ` Romain Francoise
  1 sibling, 1 reply; 16+ messages in thread
From: martin rudalics @ 2013-12-02 18:15 UTC (permalink / raw)
  To: Romain Francoise; +Cc: emacs-devel

>> Could you try the patch I proposed for bug#16013 ?
> 
> Yep, the patch works for me. Thanks!

I sent a hopefully better one to that list.  Please try it.

Thanks, martin




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Resizing frames and windows pixelwise
  2013-12-02 18:15         ` martin rudalics
@ 2013-12-02 21:48           ` Romain Francoise
  2013-12-03  7:55             ` martin rudalics
  0 siblings, 1 reply; 16+ messages in thread
From: Romain Francoise @ 2013-12-02 21:48 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

martin rudalics <rudalics@gmx.at> writes:

> I sent a hopefully better one to that list.  Please try it.

As far as I can tell this new one seems to work just as well. Thanks.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Resizing frames and windows pixelwise
  2013-12-02 21:48           ` Romain Francoise
@ 2013-12-03  7:55             ` martin rudalics
  0 siblings, 0 replies; 16+ messages in thread
From: martin rudalics @ 2013-12-03  7:55 UTC (permalink / raw)
  To: Romain Francoise; +Cc: emacs-devel

> As far as I can tell this new one seems to work just as well. Thanks.

Committed in revision 115361.

Thanks, martin




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Resizing frames and windows pixelwise
  2013-12-02  1:30 ` YAMAMOTO Mitsuharu
  2013-12-02  7:38   ` martin rudalics
@ 2013-12-20 10:59   ` martin rudalics
  2013-12-20 17:05     ` Jan Djärv
  1 sibling, 1 reply; 16+ messages in thread
From: martin rudalics @ 2013-12-20 10:59 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: emacs-devel

 > I removed code for fringe background extension on X11 at revno:
 > 115343.  I could also make similar changes at least on W32, but I
 > think it would be better to do so after changing some (actually, most
 > of) members in `struct scroll_bar' from Lisp_Object to non-Lisp_Object
 > in order to leave at least one non-Lisp_Object member for the use of
 > ALLOCATE_PSEUDOVECTOR (currently, `fringe_extended_p' is the only
 > non-Lisp_Object member).  Does anyone having access to W32 systems
 > want to make such a change?

I've done that now.

 > Also, I guess the `w32_widget_low/high'
 > members are unused.

I think so too.  If nobody objects I'll remove them.

What about nsterm.m?

martin



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Resizing frames and windows pixelwise
  2013-12-20 10:59   ` martin rudalics
@ 2013-12-20 17:05     ` Jan Djärv
  0 siblings, 0 replies; 16+ messages in thread
From: Jan Djärv @ 2013-12-20 17:05 UTC (permalink / raw)
  To: martin rudalics; +Cc: YAMAMOTO Mitsuharu, emacs-devel

Hello.

20 dec 2013 kl. 11:59 skrev martin rudalics <rudalics@gmx.at>:

> > I removed code for fringe background extension on X11 at revno:
> > 115343.  I could also make similar changes at least on W32, but I
> > think it would be better to do so after changing some (actually, most
> > of) members in `struct scroll_bar' from Lisp_Object to non-Lisp_Object
> > in order to leave at least one non-Lisp_Object member for the use of
> > ALLOCATE_PSEUDOVECTOR (currently, `fringe_extended_p' is the only
> > non-Lisp_Object member).  Does anyone having access to W32 systems
> > want to make such a change?
> 
> I've done that now.
> 
> > Also, I guess the `w32_widget_low/high'
> > members are unused.
> 
> I think so too.  If nobody objects I'll remove them.
> 
> What about nsterm.m?
> 
> martin

fringe_extended_p is just checked at one place, ns_set_vertical_scroll_bar.  It is trivial to remove.

	Jan D.





^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-12-20 17:05 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-28 10:42 Resizing frames and windows pixelwise martin rudalics
2013-11-28 17:13 ` Eli Zaretskii
2013-11-30 12:16 ` martin rudalics
2013-11-30 16:59   ` Romain Francoise
2013-11-30 17:03     ` martin rudalics
2013-11-30 17:09       ` Romain Francoise
2013-12-01  9:45         ` martin rudalics
2013-12-02 18:15         ` martin rudalics
2013-12-02 21:48           ` Romain Francoise
2013-12-03  7:55             ` martin rudalics
2013-12-01  7:50 ` Alp Aker
2013-12-01  9:45   ` martin rudalics
2013-12-02  1:30 ` YAMAMOTO Mitsuharu
2013-12-02  7:38   ` martin rudalics
2013-12-20 10:59   ` martin rudalics
2013-12-20 17:05     ` Jan Djärv

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).