unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting failure
@ 2016-01-03  9:13 CHENG Gao
  2016-01-10  5:58 ` bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting fai Anders Lindgren
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: CHENG Gao @ 2016-01-03  9:13 UTC (permalink / raw)
  To: 22298



Settings below stopped frame size from resizing to largest. If order
changed and upper part put under lower part, it works well.
If tool-bar-mode disabled it works well. Other modes are irrelavant. I
tested them all with comment/uncomment.

,----
| (when window-system (set-frame-size (selected-frame) 155 38 nil)
| 	  (set-frame-position (selected-frame) 0 0))
| 
| (when window-system
| 	(tool-bar-mode 1)
| 	(set-scroll-bar-mode 'right)
| 	(global-linum-mode 1)
| 	(visual-line-mode 1)
|     (mouse-wheel-mode 1))
`----




In GNU Emacs 25.1.50.1 (x86_64-apple-darwin15.2.0, NS appkit-1404.34 Version 10.11.2 (Build 15C50))
 of 2016-01-01
Repository revision: ee0117c4a859f7d8c37661c60aa4736add4dd53f
Windowing system distributor 'Apple', version 10.3.1404
Configured using:
 'configure CC=clang'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS

Important settings:
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  display-time-mode: t
  global-linum-mode: t
  linum-mode: t
  auto-image-file-mode: t
  minibuffer-electric-default-mode: t
  global-ede-mode: t
  ede-minor-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Loading /Users/cg/.emacs.d/.emacs-custom.el (source)...done
Loading /Users/cg/.emacs.d/.session...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...
Type C-x 1 to delete the help window, C-M-v to scroll help.
uncompressing tool-bar.el.gz...done
Mark set

Load-path shadows:
~/.emacs.d/site-lisp/compface hides /Applications/Emacs.app/Contents/Resources/lisp/gnus/compface

Features:
(shadow sort footnote mail-extr gnus-msg gnus-art mm-uu mml2015 mm-view
mml-smime smime dig mailcap gnus-sum gnus-group gnus-undo gnus-start
gnus-cloud nnimap nnmail mail-source tls utf7 netrc nnoo parse-time
gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems nnheader emacsbug
message idna dired dired-loaddefs rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mail-utils seq jka-compr eieio-opt org
org-macro org-footnote org-pcomplete pcomplete org-list org-faces
org-entities noutline outline easy-mmode org-version ob-emacs-lisp ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint comint
ansi-color ring ob-core ob-eval org-compat org-macs org-loaddefs
format-spec find-func cal-menu calendar cal-loaddefs session boxquote
rect time linum image-file minibuf-eldef ede/speedbar ede/files ede
ede/detect ede/base ede/auto ede/source eieio-base eieio-speedbar
speedbar sb-image ezimage dframe eieio-custom wid-edit cedet paren
finder-inf info package epg-config url-handlers url-parse auth-source
cl-seq eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core
cl-macs gv eieio-loaddefs gnus-util mm-util help-fns help-mode easymenu
cl-loaddefs pcase cl-lib mail-prsvr password-cache url-vars time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel ns-win term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 262181 6488)
 (symbols 48 36922 0)
 (miscs 40 259 370)
 (strings 32 72991 11391)
 (string-bytes 1 2240815)
 (vectors 16 32360)
 (vector-slots 8 687600 3125)
 (floats 8 594 118)
 (intervals 56 669 0)
 (buffers 976 15))




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

* bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting fai
  2016-01-03  9:13 bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting failure CHENG Gao
@ 2016-01-10  5:58 ` Anders Lindgren
  2016-01-10  7:36   ` CHENG Gao
  2016-01-10 20:58 ` bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting failure Anders Lindgren
  2022-01-24 13:40 ` Lars Ingebrigtsen
  2 siblings, 1 reply; 8+ messages in thread
From: Anders Lindgren @ 2016-01-10  5:58 UTC (permalink / raw)
  To: CHENG Gao, 22298

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

> Settings below stopped frame size from resizing to largest. If order
changed and upper part put under lower part, it works well. If
tool-bar-mode disabled it works well. Other modes are irrelavant. I tested
them all with comment/uncomment.

Unfortunately, I don't see what the problem is.

Could you provide a step by step description of how to reproduce this,
starting with "emacs -Q" from the command line. Please state what you see
and what you expected to see. Also, make sure that the recipe work
regardless of the screen size used.

Just one note: In the OS X port, tool-bar is not included in the size of
the text part of the frame. In other words, when enabling the tool-bar, the
height of the frame increases. This may cause it to stretch below the
bottom edge of the screen.

    -- Anders

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

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

* bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting fai
  2016-01-10  5:58 ` bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting fai Anders Lindgren
@ 2016-01-10  7:36   ` CHENG Gao
  0 siblings, 0 replies; 8+ messages in thread
From: CHENG Gao @ 2016-01-10  7:36 UTC (permalink / raw)
  To: 22298

*On Sun, 10 Jan 2016 06:58:00 +0100
* Also sprach Anders Lindgren <andlind@gmail.com>:

>> Settings below stopped frame size from resizing to largest. If order
> changed and upper part put under lower part, it works well. If
> tool-bar-mode disabled it works well. Other modes are irrelavant. I tested
> them all with comment/uncomment.
>
> Unfortunately, I don't see what the problem is.
>
> Could you provide a step by step description of how to reproduce this,
> starting with "emacs -Q" from the command line. Please state what you see
> and what you expected to see. Also, make sure that the recipe work
> regardless of the screen size used.
>
> Just one note: In the OS X port, tool-bar is not included in the size of
> the text part of the frame. In other words, when enabling the tool-bar, the
> height of the frame increases. This may cause it to stretch below the
> bottom edge of the screen.
>
>     -- Anders

Thank you for looking into this.

In my bug report I listed two snippets that can be put into init.el.
When (tool-bar-mode 1) is set before set-frame-size, it works. When set
after set-frame-size, it won't.

Using C-x C-e to eval them, it works. So I think "emacs -Q" can not help
here. It's only about order of settings.

Later after reporting, I found tool-bar-mode is defaulted to "t" when
window-system is detected (in C source code), so I just removed it and
it works now. So it does not bother me any more, but I can not say this
bug is fixed.






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

* bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting failure
  2016-01-03  9:13 bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting failure CHENG Gao
  2016-01-10  5:58 ` bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting fai Anders Lindgren
@ 2016-01-10 20:58 ` Anders Lindgren
  2016-01-11 11:08   ` CHENG Gao
  2016-01-11 12:03   ` CHENG Gao
  2022-01-24 13:40 ` Lars Ingebrigtsen
  2 siblings, 2 replies; 8+ messages in thread
From: Anders Lindgren @ 2016-01-10 20:58 UTC (permalink / raw)
  To: CHENG Gao, 22298

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

Hi Cheng!

Ah, it was the information that the expressions should be placed in the
init file that I was missing.

I can confirm that I can reproduce the problem using the following recipe.

Place the following lines in a file, say bug22298.el:

    (when window-system
      (set-frame-size (selected-frame) 155 38 nil)
      (tool-bar-mode 1))

    emacs -Q -l bug22298.el

Here, Emacs use its standard frame size whereas it should use the newly
specified size (155x38).

    -- Anders Lindgren


> Thank you for looking into this.

> In my bug report I listed two snippets that can be put into init.el.
> When (tool-bar-mode 1) is set before set-frame-size, it works. When set
> after set-frame-size, it won't.

> Using C-x C-e to eval them, it works. So I think "emacs -Q" can not help
> here. It's only about order of settings.

> Later after reporting, I found tool-bar-mode is defaulted to "t" when
> window-system is detected (in C source code), so I just removed it and
> it works now. So it does not bother me any more, but I can not say this
> bug is fixed.

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

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

* bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting failure
  2016-01-10 20:58 ` bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting failure Anders Lindgren
@ 2016-01-11 11:08   ` CHENG Gao
  2016-01-11 11:30     ` CHENG Gao
  2016-01-11 12:03   ` CHENG Gao
  1 sibling, 1 reply; 8+ messages in thread
From: CHENG Gao @ 2016-01-11 11:08 UTC (permalink / raw)
  To: 22298

*On Sun, 10 Jan 2016 21:58:10 +0100
* Also sprach Anders Lindgren <andlind@gmail.com>:

> Hi Cheng!
>
> Ah, it was the information that the expressions should be placed in the
> init file that I was missing.
>
> I can confirm that I can reproduce the problem using the following recipe.
>
> Place the following lines in a file, say bug22298.el:
>
>     (when window-system
>       (set-frame-size (selected-frame) 155 38 nil)
>       (tool-bar-mode 1))
>
>     emacs -Q -l bug22298.el
>
> Here, Emacs use its standard frame size whereas it should use the newly
> specified size (155x38).
>
>     -- Anders Lindgren

Thank you Anders.

I played a while and tweaked some settings to do more tests, and found
out that though tool-bar-mode can trigger this bug, the culprit seems
not to be tool-bar-mode.

Before set-frame-size setting, I have:
,----
| (setq frame-resize-pixelwise t)
`----

With this setting, tool-bar-mode can not show after set-frame-size. If I
comment it out, location of tool-bar-mode setting does not matter.

Even I comment out frame-resize-pixelwise setting, if I use
,----
|  (set-frame-size (selected-frame) 155 38 t)
`----
that's to use pixelwise setting, same problem as before.

So it's all about pixelwise setting. I can't decide it's a bug or a
(mis)feature.  I'll try to dig a little in C source code
(set-frame-size), but my knowledge of C is very limited.






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

* bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting failure
  2016-01-11 11:08   ` CHENG Gao
@ 2016-01-11 11:30     ` CHENG Gao
  0 siblings, 0 replies; 8+ messages in thread
From: CHENG Gao @ 2016-01-11 11:30 UTC (permalink / raw)
  To: 22298

*On Mon, 11 Jan 2016 19:08:20 +0800
* Also sprach CHENG Gao <chenggao@royau.me>:

> *On Sun, 10 Jan 2016 21:58:10 +0100
> * Also sprach Anders Lindgren <andlind@gmail.com>:
>
>> Hi Cheng!
>>
>> Ah, it was the information that the expressions should be placed in the
>> init file that I was missing.
>>
>> I can confirm that I can reproduce the problem using the following recipe.
>>
>> Place the following lines in a file, say bug22298.el:
>>
>>     (when window-system
>>       (set-frame-size (selected-frame) 155 38 nil)
>>       (tool-bar-mode 1))
>>
>>     emacs -Q -l bug22298.el
>>
>> Here, Emacs use its standard frame size whereas it should use the newly
>> specified size (155x38).
>>
>>     -- Anders Lindgren
>
> Thank you Anders.
>
> I played a while and tweaked some settings to do more tests, and found
> out that though tool-bar-mode can trigger this bug, the culprit seems
> not to be tool-bar-mode.
>
> Before set-frame-size setting, I have:
> ,----
> | (setq frame-resize-pixelwise t)
> `----
>
> With this setting, tool-bar-mode can not show after set-frame-size. If I
> comment it out, location of tool-bar-mode setting does not matter.
>
> Even I comment out frame-resize-pixelwise setting, if I use
> ,----
> |  (set-frame-size (selected-frame) 155 38 t)
> `----
> that's to use pixelwise setting, same problem as before.
>
> So it's all about pixelwise setting. I can't decide it's a bug or a
> (mis)feature.  I'll try to dig a little in C source code
> (set-frame-size), but my knowledge of C is very limited.

Sorry for my stupidity.

,----
|  (set-frame-size (selected-frame) 155 38 t)
`----
This explicitly uses pixelwise to set frame size.

Please ignore above message. It's false alarm. I need do more tests.






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

* bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting failure
  2016-01-10 20:58 ` bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting failure Anders Lindgren
  2016-01-11 11:08   ` CHENG Gao
@ 2016-01-11 12:03   ` CHENG Gao
  1 sibling, 0 replies; 8+ messages in thread
From: CHENG Gao @ 2016-01-11 12:03 UTC (permalink / raw)
  To: 22298

,----
| Here, Emacs use its standard frame size whereas it should use the newly
| specified size (155x38).
`----

You are right.


,----
| (when window-system
|    (set-frame-position (selected-frame) 0 0)
|    (set-frame-size (selected-frame) 156 41 nil))
| 
| (sleep-for 3)
| 
| (when window-system
|    (tool-bar-mode nil))
`----

I added sleep-for to check startup process, and I can see frame size is
resized correctly, and then shrink back by tool-bar-mode. So
tool-bar-mode does not use newly set size but standard frame size.






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

* bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting failure
  2016-01-03  9:13 bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting failure CHENG Gao
  2016-01-10  5:58 ` bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting fai Anders Lindgren
  2016-01-10 20:58 ` bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting failure Anders Lindgren
@ 2022-01-24 13:40 ` Lars Ingebrigtsen
  2 siblings, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-24 13:40 UTC (permalink / raw)
  To: CHENG Gao; +Cc: 22298

CHENG Gao <chenggao@royau.me> writes:

> ,----
> | (when window-system (set-frame-size (selected-frame) 155 38 nil)
> | 	  (set-frame-position (selected-frame) 0 0))

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

Yes, en/disabling the tool bar will change the size of the frame, so you
have to en/disable it before setting the frame size.

I don't think this is a bug -- it's how Emacs has always worked, so I'm
closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2022-01-24 13:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-03  9:13 bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting failure CHENG Gao
2016-01-10  5:58 ` bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting fai Anders Lindgren
2016-01-10  7:36   ` CHENG Gao
2016-01-10 20:58 ` bug#22298: 25.1.50; Enabling tool-bar-mode caused frame size setting failure Anders Lindgren
2016-01-11 11:08   ` CHENG Gao
2016-01-11 11:30     ` CHENG Gao
2016-01-11 12:03   ` CHENG Gao
2022-01-24 13:40 ` Lars Ingebrigtsen

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).