emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41737: closed (26.3; (window-text-pixel-size) in console)


From: GNU bug Tracking System
Subject: bug#41737: closed (26.3; (window-text-pixel-size) in console)
Date: Thu, 13 Aug 2020 01:02:02 +0000

Your message dated Wed, 12 Aug 2020 18:01:31 -0700
with message-id 
<CADwFkmk3qVOJJEOKp5QEsNwma_Hosbmq8M_ahf0hTYLzVkRwqg@mail.gmail.com>
and subject line Re: bug#41737: 26.3; (window-text-pixel-size) in console
has caused the debbugs.gnu.org bug report #41737,
regarding 26.3; (window-text-pixel-size) in console
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
41737: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41737
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 26.3; (window-text-pixel-size) in console Date: Sat, 06 Jun 2020 14:47:14 +0200
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’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.

   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=/nix/store/qc9ipxcjcf33izlavkbj3jsqvwfcf602-emacs-26.3
 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft
 CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=101200'

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-emacs-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=fcitx
  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/store/bp2z6hf7yxcsygrr1pblbid3i9lh065v-emacs-packages-deps/share/emacs/site-lisp/elpa/password-store-20190929.1627/password-store
/nix/store/bp2z6hf7yxcsygrr1pblbid3i9lh065v-emacs-packages-deps/share/emacs/site-lisp/site-start
 hides 
/nix/store/qc9ipxcjcf33izlavkbj3jsqvwfcf602-emacs-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/auth-source-pass
/nix/store/bp2z6hf7yxcsygrr1pblbid3i9lh065v-emacs-packages-deps/share/emacs/site-lisp/elpa/let-alist-1.0.6/let-alist
 hides 
/nix/store/qc9ipxcjcf33izlavkbj3jsqvwfcf602-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))



--- End Message ---
--- Begin Message --- Subject: Re: bug#41737: 26.3; (window-text-pixel-size) in console Date: Wed, 12 Aug 2020 18:01:31 -0700 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Eli Zaretskii <eliz@gnu.org> writes:

>> From: Tomas Hlavaty <tom@logand.com>
>> 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.

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


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]