From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: How to create a small child-frame which only show two lines Date: Fri, 08 Dec 2017 11:12:02 +0100 Message-ID: <5A2A6572.4060700@gmx.at> References: <32764281.548.1602e496fa6.Coremail.tumashu@163.com> <5A290998.6030900@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1512727939 2345 195.159.176.226 (8 Dec 2017 10:12:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 8 Dec 2017 10:12:19 +0000 (UTC) To: tumashu , "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 08 11:12:14 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNFde-0000Sw-KJ for ged-emacs-devel@m.gmane.org; Fri, 08 Dec 2017 11:12:14 +0100 Original-Received: from localhost ([::1]:36349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNFdl-0006Zj-R2 for ged-emacs-devel@m.gmane.org; Fri, 08 Dec 2017 05:12:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNFdf-0006Y6-Lu for emacs-devel@gnu.org; Fri, 08 Dec 2017 05:12:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNFdc-0005WE-GJ for emacs-devel@gnu.org; Fri, 08 Dec 2017 05:12:15 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:53461) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eNFdc-0005Vc-2t for emacs-devel@gnu.org; Fri, 08 Dec 2017 05:12:12 -0500 Original-Received: from [192.168.1.100] ([46.125.250.26]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M4Wwq-1fHRDr22ai-00yfO0; Fri, 08 Dec 2017 11:12:03 +0100 In-Reply-To: <5A290998.6030900@gmx.at> X-Provags-ID: V03:K0:uuRoo1LXOwmkkTltb4he2uyqge5RyoANCzi17fyVusoa9GtScqU Z4SgCMh9maeuLLGexHhoYPlIlgnI/twxNr1oziSIo39cudIvHiUUL1pvoXLcmM2dcPcK3xb jSfz1Im8z0/bsFI9g+0I4Aajqe25oFC++g1iTBzR+I3Rksp9+XlofecI2eBWxIFIPk6BoO7 lcTGNKEmpVzTGFuK9YlWg== X-UI-Out-Filterresults: notjunk:1;V01:K0:s1SdNCKgOH4=:r0FWHhJVToIaY0hIQMPkt0 kKefNkysIUEV7GYj5FB5GrlIHnL6cHe/E9+oaJ1UDX2bWeU6MTY/9+hkb6qzVCXlxKTgQ6a1K vpanhny64T7tVVreb09Pq2lgJk7vjKyvM0FIsSJy+DbC0+YySSEvZPOm10d+F58Pdz1TlH9Fl wzgfqS0iLM6mXf1PAbnOLm2Pmtj3jeix/25T3nM2ro9XjJB5SU3F1AYiXdyxJeQ3FkiMtYlVk FN3gBRcQwN0gAWUMuR3CsW4xU7zP/QkVXF/mDEihhWCZUNGUl49Qubvya/XAmdf+eufTF0ri4 SuElXM9VjVTF2khrLB50WwL9ywERHu9dtTgUrs9qzS1HMW0b6cu4rSIGM28lDWL+0fdS+P6iS 8Ctd+2EstKmKcaZv6cQ+KTm2Uev/h5m1YQQc8CpgOqNTfmIGA7JBCZRJ7zdtAuA487Fp2NZQ1 jvEg+CVhg3ilZzvMZXOhGc+2kF6Iy1kOW7jK0Y3qn4iQEigcGOSfD7GgLB+xRsZay9SQbbjnv bDZHzTNMJV/ZPQ69zCcvEwvc//WaRf44pPSLUXO7LY4evvZUqlsMF7mSBwQ4w/h7nhhdF0C0I Swndx+pK4AQ0P2Ojggf/dug4cPa22uQI2Sg7JOKx/Qm8gRrk9YdmQlWBzAmmsQOrGV90XIhx/ zo5l8oQmj+cfLzvtJAQAmMPlaLsMM3j8fJhl0gNdcX57242Ag6/lyyJnX/WRQr8FuIYmtWmAA tL8q2Epl5mV87NjNmr+xaR2j1DtxN2T4qCequNhqBPMbkAQg6h7GKmn5pCbtj5zomt3WjLOI X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:220784 Archived-At: > > I only need show 2 lines with child-frame while its mini > > size is show 4 lines, anyone suggest how to deal with this problem? > [...] > > (let ((window (frame-root-window my-child-frame))) > > (set-window-parameter window 'mode-line-format 'none) > > (set-window-parameter window 'header-line-format 'none)) > > Looks like a stupid bug in the implementation of these parameters. I'll > hopefully come up with a fix soon. Sorry. Trying again with the current release version the following form makes a frame with a two lines root window. What does it make for you? (let ((window-min-height 1) (window-min-width 1)) (setq my-child-frame (let ((after-make-frame-functions nil)) (make-frame `((parent-frame . ,(window-frame)) (no-accept-focus . t) (min-width . t) (min-height . t) (border-width . 0) (internal-border-width . 0) (vertical-scroll-bars . nil) (horizontal-scroll-bars . nil) (left-fringe . 10) (right-fringe . 0) (menu-bar-lines . 0) (tool-bar-lines . 0) (line-spacing . 0) (unsplittable . t) (no-other-frame . t) ;;(undecorated . t) (undecorated . nil) (visibility . t) (cursor-type . nil) (minibuffer . nil) (width . 50) (height . 1) (no-special-glyphs . t))))) (let ((window (frame-root-window my-child-frame))) (set-window-parameter window 'mode-line-format 'none) (set-window-parameter window 'header-line-format 'none)) (set-window-buffer (frame-root-window my-child-frame) (get-buffer-create "*foo*")) (with-current-buffer "*foo*" (insert "line 1\nline 2\n")) (fit-frame-to-buffer my-child-frame)) If it gives you more than two lines, then please tell me what the following two forms evaluate to. (window-mode-line-height (frame-root-window my-child-frame)) (window-header-line-height (frame-root-window my-child-frame)) Thank you, martin