From unknown Fri Aug 15 16:22:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41737: 26.3; (window-text-pixel-size) in console Resent-From: Tomas Hlavaty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Jun 2020 15:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41737 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 41737@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159145840813061 (code B ref -1); Sat, 06 Jun 2020 15:47:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Jun 2020 15:46:48 +0000 Received: from localhost ([127.0.0.1]:52321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhb1z-0003Oa-JD for submit@debbugs.gnu.org; Sat, 06 Jun 2020 11:46:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:50942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhYEL-0002sk-2n for submit@debbugs.gnu.org; Sat, 06 Jun 2020 08:47:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhYEK-0000YL-PM for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2020 08:47:20 -0400 Received: from logand.com ([37.48.87.44]:37444) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhYEJ-0002ue-7g for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2020 08:47:20 -0400 Received: by logand.com (Postfix, from userid 1001) id 038BE1ACD9A; Sat, 6 Jun 2020 14:47:16 +0200 (CEST) X-Mailer: emacs 26.3 (via feedmail 11-beta-1 I) From: Tomas Hlavaty Date: Sat, 06 Jun 2020 14:47:14 +0200 Message-ID: <87a71g1hv1.fsf@logand.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=37.48.87.44; envelope-from=tom@logand.com; helo=logand.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/06 08:47:17 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Mailman-Approved-At: Sat, 06 Jun 2020 11:46:46 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hi, (window-text-pixel-size) in console seems to be wrong. The width seems to the width of the (visible) window. The height seems to be number of lines in a file. However, when evaluated in notmuch thread, the cdr of the return value is a number which I cannot interpret (it is not number of lines in the buffer and it is now height of the visible window). Return the size of the text of WINDOW=E2=80=99s buffer in pixels. WINDOW must be a live window and defaults to the selected one. The return value is a cons of the maximum pixel-width of any text line and the maximum pixel-height of all text lines. I suppose that pixel in console is one character. the maximum pixel-width of any text line but this does not seem to be true. I have file with long line but it still returns number of visible columns. maximum pixel-height of all text lines It is not clean, what does that mean and the returned number doesn't seem to be useful for anything. Thanks, Tomas In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) Recent messages: Mark set Making completion list... (96 . 218) next-line: End of buffer [7 times] Mark set Quit Mark set Quit Mark set C-x C-g is undefined Configured using: 'configure --prefix=3D/nix/store/qc9ipxcjcf33izlavkbj3jsqvwfcf602-emacs-26.3 --disable-build-details --with-modules --with-x-toolkit=3Dgtk3 --with-xft CFLAGS=3D-DMAC_OS_X_VERSION_MAX_ALLOWED=3D101200' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GSETTINGS GLIB NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD Important settings: value of $EMACSLOADPATH: /nix/store/bp2z6hf7yxcsygrr1pblbid3i9lh065v-emac= s-packages-deps/share/emacs/site-lisp: value of $LC_MONETARY: en_GB.UTF-8 value of $LC_NUMERIC: en_GB.UTF-8 value of $LC_TIME: en_GB.UTF-8 value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: @im=3Dfcitx locale-coding-system: utf-8-unix Major mode: notmuch-show Minor modes in effect: gpm-mouse-mode: t global-magit-file-mode: t magit-auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t shell-dirtrack-mode: t diff-auto-refine-mode: t show-paren-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t visual-line-mode: t transient-mark-mode: t Load-path shadows: /run/current-system/sw/share/emacs/site-lisp/password-store hides /nix/stor= e/bp2z6hf7yxcsygrr1pblbid3i9lh065v-emacs-packages-deps/share/emacs/site-lis= p/elpa/password-store-20190929.1627/password-store /nix/store/bp2z6hf7yxcsygrr1pblbid3i9lh065v-emacs-packages-deps/share/emacs= /site-lisp/site-start hides /nix/store/qc9ipxcjcf33izlavkbj3jsqvwfcf602-ema= cs-26.3/share/emacs/site-lisp/site-start /nix/store/bp2z6hf7yxcsygrr1pblbid3i9lh065v-emacs-packages-deps/share/emacs= /site-lisp/elpa/auth-source-pass-20191126.1242/auth-source-pass hides /nix/= store/qc9ipxcjcf33izlavkbj3jsqvwfcf602-emacs-26.3/share/emacs/26.3/lisp/aut= h-source-pass /nix/store/bp2z6hf7yxcsygrr1pblbid3i9lh065v-emacs-packages-deps/share/emacs= /site-lisp/elpa/let-alist-1.0.6/let-alist hides /nix/store/qc9ipxcjcf33izla= vkbj3jsqvwfcf602-emacs-26.3/share/emacs/26.3/lisp/emacs-lisp/let-alist Features: (shadow emacsbug vc-git network-stream starttls url-http tls gnutls url-gw nsm url-cache url-auth mailalias sendmail feedmail sort gnus-alias mail-extr mule-util misearch multi-isearch notmuch-jump t-mouse term/linux elec-pair finder-inf info pdf printing ps-print ps-print-loaddefs ps-def lpr unoffice framebuffer hydra lv dumb-jump popup f s elfeed-show elfeed-search magit-bookmark bookmark elfeed-csv elfeed elfeed-curl elfeed-log elfeed-db elfeed-lib xml-query email-eww cltl clhs notmuch hl-line notmuch-hello notmuch-tree notmuch-show notmuch-print notmuch-crypto notmuch-mua notmuch-message notmuch-draft notmuch-maildir-fcc notmuch-address notmuch-company notmuch-parser notmuch-wash coolj notmuch-query goto-addr icalendar diary-lib diary-loaddefs notmuch-tag notmuch-lib notmuch-compat mm-view mml-smime smime dig eww-lnum eww mm-url gnus nnheader wid-edit url-queue url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap shr svg xml dom magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit package url-handlers url-parse auth-source url-vars magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process magit-mode git-commit transient magit-git magit-section magit-utils crm log-edit message rmc puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor cl-extra help-mode async-bytecomp async shell server subr-x dash diff-mode ob-ledger org-element avl-tree generator org org-macro org-footnote org-pcomplete pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs paredit edmacro kmacro slime-asdf grep slime-fancy slime-trace-dialog slime-fontifying-fu slime-package-fu slime-references slime-compiler-notes-tree advice slime-scratch slime-presentations bridge slime-macrostep macrostep slime-mdot-fu slime-enclosing-context slime-fancy-trace slime-fancy-inspector slime-fuzzy slime-c-p-c slime-autodoc slime-editing-commands slime-repl slime-parse slime compile etags xref cl-seq project eieio eieio-core eieio-loaddefs arc-mode archive-mode noutline outline easymenu pp comint ansi-color ring hyperspec thingatpt browse-url slime-autoloads picolisp tsm easy-mmode cl-macs cl time-date paren cus-start cus-load seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib disp-table tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors 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 composite charscript charprop 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 threads dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 351465 36274) (symbols 48 43865 6) (miscs 40 3116 3771) (strings 32 115935 3694) (string-bytes 1 4549539) (vectors 16 43596) (vector-slots 8 821982 19876) (floats 8 398 374) (intervals 56 4673 304) (buffers 992 21)) From unknown Fri Aug 15 16:22:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41737: 26.3; (window-text-pixel-size) in console Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Jun 2020 17:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41737 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tomas Hlavaty Cc: 41737@debbugs.gnu.org Received: via spool by 41737-submit@debbugs.gnu.org id=B41737.159146591924353 (code B ref 41737); Sat, 06 Jun 2020 17:52:02 +0000 Received: (at 41737) by debbugs.gnu.org; 6 Jun 2020 17:51:59 +0000 Received: from localhost ([127.0.0.1]:52391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhcz9-0006Ki-E8 for submit@debbugs.gnu.org; Sat, 06 Jun 2020 13:51:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhcz8-0006KW-9l for 41737@debbugs.gnu.org; Sat, 06 Jun 2020 13:51:58 -0400 Received: from [2001:470:142:3::e] (port=34674 helo=fencepost.gnu.org) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhc90-0002kS-2I; Sat, 06 Jun 2020 12:58:06 -0400 Received: from [176.228.60.248] (port=4426 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jhc8t-0003mr-6P; Sat, 06 Jun 2020 12:57:59 -0400 Date: Sat, 06 Jun 2020 19:57:51 +0300 Message-Id: <83eeqs873k.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87a71g1hv1.fsf@logand.com> (message from Tomas Hlavaty on Sat, 06 Jun 2020 14:47:14 +0200) References: <87a71g1hv1.fsf@logand.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Tomas Hlavaty > Date: Sat, 06 Jun 2020 14:47:14 +0200 > > (window-text-pixel-size) in console seems to be wrong. I don't think it's wrong, I think the doc string needs clarification (which I just did). > The width seems to the width of the (visible) window. If the text is as wide or wider than the window, then by default this is what is expected, yes. > The height seems to be number of lines in a file. On a TTY frame, yes. > However, when evaluated in notmuch thread, the cdr of the return > value is a number which I cannot interpret (it is not number of > lines in the buffer and it is now height of the visible window). I'd need to see an example to respond to that. But maybe using the new doc string (below) you will be able to understand what happens in that use case as well. > Return the size of the text of WINDOW’s buffer in pixels. WINDOW > must be a live window and defaults to the selected one. The return > value is a cons of the maximum pixel-width of any text line and the > maximum pixel-height of all text lines. > > I suppose that pixel in console is one character. Yes, that is a general rule in TTY frames. > the maximum pixel-width of any text line > > but this does not seem to be true. I have file with long line but it > still returns number of visible columns. Right, by default text beyond window's width is ignored. It was not immediately clear from the doc string; I hope it is more clear now. > maximum pixel-height of all text lines > > It is not clean, what does that mean and the returned number doesn't > seem to be useful for anything. I clarified that as well. The doc string now says: Return the size of the text of WINDOW's buffer in pixels. WINDOW must be a live window and defaults to the selected one. The return value is a cons of the maximum pixel-width of any text line and the pixel-height of all the text lines in the accessible portion of buffer text. This function exists to allow Lisp programs to adjust the dimensions of WINDOW to the buffer text it needs to display. The optional argument FROM, if non-nil, specifies the first text position to consider, and defaults to the minimum accessible position of the buffer. If FROM is t, it stands for the minimum accessible position that starts a non-empty line. TO, if non-nil, specifies the last text position and defaults to the maximum accessible position of the buffer. If TO is t, it stands for the maximum accessible position that ends a non-empty line. The optional argument X-LIMIT, if non-nil, specifies the maximum X coordinate beyond which the text should be ignored. It is therefore also the maximum width that the function can return. X-LIMIT nil or omitted means to use the pixel-width of WINDOW's body. This default means text of truncated lines wider than the window will be ignored; specify a large value for X-LIMIT if lines are truncated and you need to account for the truncated text. Use nil for X-LIMIT if you want to know how high WINDOW should become in order to fit all of its buffer's text with the width of WINDOW unaltered. Use the maximum width WINDOW may assume if you intend to change WINDOW's width. Since calculating the width of long lines can take some time, it's always a good idea to make this argument as small as possible; in particular, if the buffer contains long lines that shall be truncated anyway. The optional argument Y-LIMIT, if non-nil, specifies the maximum Y coordinate beyond which the text is to be ignored; it is therefore also the maxcomp height that the function can return (excluding the height of the mode- or header-line, if any). Y-LIMIT nil or omitted means consider all of the accessible portion of buffer text up to the position specified by TO. Since calculating the text height of a large buffer can take some time, it makes sense to specify this argument if the size of the buffer is large or unknown. Optional argument MODE-AND-HEADER-LINE nil or omitted means do not include the height of the mode- or header-line of WINDOW in the return value. If it is either the symbol `mode-line' or `header-line', include only the height of that line, if present, in the return value. If t, include the height of both, if present, in the return value. From unknown Fri Aug 15 16:22:02 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Tomas Hlavaty Subject: bug#41737: closed (Re: bug#41737: 26.3; (window-text-pixel-size) in console) Message-ID: References: <87a71g1hv1.fsf@logand.com> X-Gnu-PR-Message: they-closed 41737 X-Gnu-PR-Package: emacs Reply-To: 41737@debbugs.gnu.org Date: Thu, 13 Aug 2020 01:02:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1597280522-12826-1" This is a multi-part message in MIME format... ------------=_1597280522-12826-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #41737: 26.3; (window-text-pixel-size) in console which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 41737@debbugs.gnu.org. --=20 41737: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D41737 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1597280522-12826-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 41737-done) by debbugs.gnu.org; 13 Aug 2020 01:01:41 +0000 Received: from localhost ([127.0.0.1]:46169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k61ci-00034v-UU for submit@debbugs.gnu.org; Wed, 12 Aug 2020 21:01:41 -0400 Received: from mail-yb1-f193.google.com ([209.85.219.193]:40491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k61cf-0002xn-Lx for 41737-done@debbugs.gnu.org; Wed, 12 Aug 2020 21:01:39 -0400 Received: by mail-yb1-f193.google.com with SMTP id q3so2383981ybp.7 for <41737-done@debbugs.gnu.org>; Wed, 12 Aug 2020 18:01:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc :content-transfer-encoding; bh=jn/Av0rHSNhRcao60oTJ9eerA2mvUToV6j26zd53Rik=; b=jdbu1rGSK9GR/QVNqEPCwOEtsZC8NnVTa2kN2O8UfUOtHEOm8SkCqjPht4Rl88gE22 cF9zyryRTDnJtuk7sF+iSMu4N+K/hfELOyQdut5pjapMrP2UODdd2cmSeaplsfXoQoES rxbyXKrwjvIs0qRxQsjGiJNTh3BgaV9t6BXWgArDsjCNSmjbUvLBKcXL1EUOf/Nv0T7B Pw5f0TzeZz8Scm0Ukr0BY2xKA4/JRcymEN6NRrkv9sAJyCwtrR5np0wREW/P0JtDD01Y a2KL/iz9VMKXs94aqgx6Bdc10aSBRQNrTx2YGENh5va1AorYlUj+Ni3QhPNpZvREfpXn Inwg== X-Gm-Message-State: AOAM530JRqJPhIxdQCeQtzpIm5bZU2vC+9Fb/NT7OgMY0pk7thQZlOVE Uiuquu+XfgYxc2SITu4XX0fjZaD2z9wt6l9ZC3sJqjJU5P8= X-Google-Smtp-Source: ABdhPJyAN640TC3cNcafhQNo/Fd7g2uc5PA7M+c7uN0WZ9gMBsTxfZLh60LLMO2fIqUTak5eVwV2RFn1YIvU3hl6Iv4= X-Received: by 2002:a25:9843:: with SMTP id k3mr3132399ybo.466.1597280492151; Wed, 12 Aug 2020 18:01:32 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 12 Aug 2020 18:01:31 -0700 From: Stefan Kangas In-Reply-To: <83eeqs873k.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 06 Jun 2020 19:57:51 +0300") References: <87a71g1hv1.fsf@logand.com> <83eeqs873k.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Wed, 12 Aug 2020 18:01:31 -0700 Message-ID: Subject: Re: bug#41737: 26.3; (window-text-pixel-size) in console To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41737-done Cc: 41737-done@debbugs.gnu.org, Tomas Hlavaty X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Tomas Hlavaty >> Date: Sat, 06 Jun 2020 14:47:14 +0200 >> >> (window-text-pixel-size) in console seems to be wrong. > > I don't think it's wrong, I think the doc string needs clarification > (which I just did). > >> The width seems to the width of the (visible) window. > > If the text is as wide or wider than the window, then by default this > is what is expected, yes. > >> The height seems to be number of lines in a file. > > On a TTY frame, yes. > >> However, when evaluated in notmuch thread, the cdr of the return >> value is a number which I cannot interpret (it is not number of >> lines in the buffer and it is now height of the visible window). > > I'd need to see an example to respond to that. But maybe using the > new doc string (below) you will be able to understand what happens in > that use case as well. > >> Return the size of the text of WINDOW=E2=80=99s buffer in pixels. WI= NDOW >> must be a live window and defaults to the selected one. The return >> value is a cons of the maximum pixel-width of any text line and the >> maximum pixel-height of all text lines. >> >> I suppose that pixel in console is one character. > > Yes, that is a general rule in TTY frames. > >> the maximum pixel-width of any text line >> >> but this does not seem to be true. I have file with long line but it >> still returns number of visible columns. > > Right, by default text beyond window's width is ignored. It was not > immediately clear from the doc string; I hope it is more clear now. > >> maximum pixel-height of all text lines >> >> It is not clean, what does that mean and the returned number doesn't >> seem to be useful for anything. > > I clarified that as well. That was 9 weeks ago, and, given the lack of updates since, it seems like all issues here are resolved. I'm therefore closing this bug report. Best regards, Stefan Kangas ------------=_1597280522-12826-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 6 Jun 2020 15:46:48 +0000 Received: from localhost ([127.0.0.1]:52321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhb1z-0003Oa-JD for submit@debbugs.gnu.org; Sat, 06 Jun 2020 11:46:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:50942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhYEL-0002sk-2n for submit@debbugs.gnu.org; Sat, 06 Jun 2020 08:47:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhYEK-0000YL-PM for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2020 08:47:20 -0400 Received: from logand.com ([37.48.87.44]:37444) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhYEJ-0002ue-7g for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2020 08:47:20 -0400 Received: by logand.com (Postfix, from userid 1001) id 038BE1ACD9A; Sat, 6 Jun 2020 14:47:16 +0200 (CEST) X-Mailer: emacs 26.3 (via feedmail 11-beta-1 I) From: Tomas Hlavaty To: bug-gnu-emacs@gnu.org Subject: 26.3; (window-text-pixel-size) in console Date: Sat, 06 Jun 2020 14:47:14 +0200 Message-ID: <87a71g1hv1.fsf@logand.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=37.48.87.44; envelope-from=tom@logand.com; helo=logand.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/06 08:47:17 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 06 Jun 2020 11:46:46 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hi, (window-text-pixel-size) in console seems to be wrong. The width seems to the width of the (visible) window. The height seems to be number of lines in a file. However, when evaluated in notmuch thread, the cdr of the return value is a number which I cannot interpret (it is not number of lines in the buffer and it is now height of the visible window). Return the size of the text of WINDOW=E2=80=99s buffer in pixels. WINDOW must be a live window and defaults to the selected one. The return value is a cons of the maximum pixel-width of any text line and the maximum pixel-height of all text lines. I suppose that pixel in console is one character. the maximum pixel-width of any text line but this does not seem to be true. I have file with long line but it still returns number of visible columns. maximum pixel-height of all text lines It is not clean, what does that mean and the returned number doesn't seem to be useful for anything. Thanks, Tomas In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) Recent messages: Mark set Making completion list... (96 . 218) next-line: End of buffer [7 times] Mark set Quit Mark set Quit Mark set C-x C-g is undefined Configured using: 'configure --prefix=3D/nix/store/qc9ipxcjcf33izlavkbj3jsqvwfcf602-emacs-26.3 --disable-build-details --with-modules --with-x-toolkit=3Dgtk3 --with-xft CFLAGS=3D-DMAC_OS_X_VERSION_MAX_ALLOWED=3D101200' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GSETTINGS GLIB NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD Important settings: value of $EMACSLOADPATH: /nix/store/bp2z6hf7yxcsygrr1pblbid3i9lh065v-emac= s-packages-deps/share/emacs/site-lisp: value of $LC_MONETARY: en_GB.UTF-8 value of $LC_NUMERIC: en_GB.UTF-8 value of $LC_TIME: en_GB.UTF-8 value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: @im=3Dfcitx locale-coding-system: utf-8-unix Major mode: notmuch-show Minor modes in effect: gpm-mouse-mode: t global-magit-file-mode: t magit-auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t shell-dirtrack-mode: t diff-auto-refine-mode: t show-paren-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t visual-line-mode: t transient-mark-mode: t Load-path shadows: /run/current-system/sw/share/emacs/site-lisp/password-store hides /nix/stor= e/bp2z6hf7yxcsygrr1pblbid3i9lh065v-emacs-packages-deps/share/emacs/site-lis= p/elpa/password-store-20190929.1627/password-store /nix/store/bp2z6hf7yxcsygrr1pblbid3i9lh065v-emacs-packages-deps/share/emacs= /site-lisp/site-start hides /nix/store/qc9ipxcjcf33izlavkbj3jsqvwfcf602-ema= cs-26.3/share/emacs/site-lisp/site-start /nix/store/bp2z6hf7yxcsygrr1pblbid3i9lh065v-emacs-packages-deps/share/emacs= /site-lisp/elpa/auth-source-pass-20191126.1242/auth-source-pass hides /nix/= store/qc9ipxcjcf33izlavkbj3jsqvwfcf602-emacs-26.3/share/emacs/26.3/lisp/aut= h-source-pass /nix/store/bp2z6hf7yxcsygrr1pblbid3i9lh065v-emacs-packages-deps/share/emacs= /site-lisp/elpa/let-alist-1.0.6/let-alist hides /nix/store/qc9ipxcjcf33izla= vkbj3jsqvwfcf602-emacs-26.3/share/emacs/26.3/lisp/emacs-lisp/let-alist Features: (shadow emacsbug vc-git network-stream starttls url-http tls gnutls url-gw nsm url-cache url-auth mailalias sendmail feedmail sort gnus-alias mail-extr mule-util misearch multi-isearch notmuch-jump t-mouse term/linux elec-pair finder-inf info pdf printing ps-print ps-print-loaddefs ps-def lpr unoffice framebuffer hydra lv dumb-jump popup f s elfeed-show elfeed-search magit-bookmark bookmark elfeed-csv elfeed elfeed-curl elfeed-log elfeed-db elfeed-lib xml-query email-eww cltl clhs notmuch hl-line notmuch-hello notmuch-tree notmuch-show notmuch-print notmuch-crypto notmuch-mua notmuch-message notmuch-draft notmuch-maildir-fcc notmuch-address notmuch-company notmuch-parser notmuch-wash coolj notmuch-query goto-addr icalendar diary-lib diary-loaddefs notmuch-tag notmuch-lib notmuch-compat mm-view mml-smime smime dig eww-lnum eww mm-url gnus nnheader wid-edit url-queue url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap shr svg xml dom magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit package url-handlers url-parse auth-source url-vars magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process magit-mode git-commit transient magit-git magit-section magit-utils crm log-edit message rmc puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor cl-extra help-mode async-bytecomp async shell server subr-x dash diff-mode ob-ledger org-element avl-tree generator org org-macro org-footnote org-pcomplete pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs paredit edmacro kmacro slime-asdf grep slime-fancy slime-trace-dialog slime-fontifying-fu slime-package-fu slime-references slime-compiler-notes-tree advice slime-scratch slime-presentations bridge slime-macrostep macrostep slime-mdot-fu slime-enclosing-context slime-fancy-trace slime-fancy-inspector slime-fuzzy slime-c-p-c slime-autodoc slime-editing-commands slime-repl slime-parse slime compile etags xref cl-seq project eieio eieio-core eieio-loaddefs arc-mode archive-mode noutline outline easymenu pp comint ansi-color ring hyperspec thingatpt browse-url slime-autoloads picolisp tsm easy-mmode cl-macs cl time-date paren cus-start cus-load seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib disp-table tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors 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 composite charscript charprop 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 threads dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 351465 36274) (symbols 48 43865 6) (miscs 40 3116 3771) (strings 32 115935 3694) (string-bytes 1 4549539) (vectors 16 43596) (vector-slots 8 821982 19876) (floats 8 398 374) (intervals 56 4673 304) (buffers 992 21)) ------------=_1597280522-12826-1--