unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#50337: 28.0.50; (while-no-input (redisplay) forms...) block behaves differently when window-system is pgtk
@ 2021-09-02 13:34 Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-10-01 14:37 ` bug#50337: Fejfighter
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-09-02 13:34 UTC (permalink / raw)
  To: 50337


This was tested on both a build configured with "--without-x
--with-pgtk" and a build configured with "--with-x --with-x-toolkit=no"
(my previous configuration before switching to the pgtk branch). Both
were built from the pgtk branch.

In the following steps I load a package I'm developing called
Vcomplete[1] which uses the following function to update the
'*Completions*' buffer when providing input to the minibuffer (the
'*Completions*' buffer also opens automatically when starting minibuffer
completion):

(defun vcomplete--update-in-minibuffer (&rest _args)
  "Update the completion list when completing in a minibuffer."
  (while-no-input
    (redisplay)
    (unless (memq this-command vcomplete-no-update-commands)
      (minibuffer-completion-help))))

For more details look at the package, specifically the section called
'Visual completion mode' (it's not very complex and I don't want to make
this report too long, I can provide more details if necessary).
Also, the effect is much more apparent when 'completions-detailed' is
set to t (presumably because it takes longer to display the completions).

The following steps are performed on both builds:

1. emacs -Q
2. M-x load-file RET ~/src/vcomplete/vcomplete.el RET
3. M-x vcomplete-mode RET
4. C-h f bac (combination of letters which correspond to completions)

On the X build, as soon as I start typing letters in step 4 the
'*Completions*' buffer immediately updates; on the pgtk build there is a
noticable (maybe half a second) delay during which I also can't see the
letters I'm typing into the minibuffer, in addition to the first few
letters being entered into the minibuffer twice (the amount of letters
duplicated changes).

The behavior on the X build lines up with the documentation strings of
'redisplay' and 'while-no-input', so I'm assuming this is a bug in pgtk
redisplay code (although my only knowledge of redisplay comes from
reading documentation, so I might be off).

Hope I did everything right, this is the first bug report I'm
submitting, thanks!

Daniel

[1] https://git.sr.ht/~dsemy/vcomplete


In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.29, cairo version 1.16.0)
 of 2021-08-31 built on coldharbour
Repository revision: aa437f6a59337d980795370d55edebb029ecf10b
Repository branch: master
Windowing system distributor 'System Description: void

Configured using:
 'configure --without-dbus --without-gsettings --without-x --with-pgtk
 --prefix=/opt/Emacs'

Configured features:
CAIRO FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD
LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND
THREADS TIFF TOOLKIT_SCROLL_BARS XIM GTK3 ZLIB

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Help

Minor modes in effect:
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  emms-mode-line-mode: t
  emms-playing-time-display-mode: t
  emms-playing-time-mode: t
  pdf-occur-global-minor-mode: t
  show-paren-mode: t
  electric-pair-mode: t
  repeat-mode: t
  swsw-mode: t
  global-auto-revert-mode: t
  delete-selection-mode: t
  vcomplete-mode: t
  display-time-mode: t
  minibuffer-line-mode: t
  minibuffer-electric-default-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
  blink-cursor-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
  transient-mark-mode: t

Load-path shadows:
/home/daniel/etc/emacs/elpa/transient-0.3.6/transient hides /opt/Emacs/share/emacs/28.0.50/lisp/transient

Features:
(shadow emacsbug two-column project dired-aux term ehelp shortdoc view
misearch multi-isearch mule-util vc-mtn vc-hg vc-bzr vc-src vc-sccs
vc-svn vc-cvs vc-rcs vc bug-reference face-remap magit-bookmark
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 magit-repos magit-apply magit-wip magit-log which-func magit-diff
git-commit rx log-edit pcvs-util add-log magit-core magit-autorevert
magit-margin magit-transient magit-process with-editor shell pcomplete
magit-mode transient magit-git magit-section magit-utils crm dash
deuglify gnus-cus gnus-demon gnus-diary nndiary gnus-draft gnus-dup
gnus-fun gnus-html url-queue gnus-kill gnus-logic gnus-mh mh-comp
mh-scan mh-gnus mh-e mh-compat mh-buffers mh-loaddefs gnus-registry
registry eieio-base gnus-salt gnus-uu yenc gnus-vm sendmail nnselect
gnus-search eieio-opt speedbar ezimage dframe help-fns radix-tree
cl-print debug backtrace noutline outline vc-git vc-dispatcher
emms-playlist-mode emms-source-playlist emms-source-file locate url-http
url-gw url-cache url-auth nnrss mm-url qp smerge-mode diff diff-mode
easy-mmode mm-archive sort smiley gnus-cite mail-extr gnus-async
gnus-bcklg gnus-ml disp-table gnus-topic nndraft nnmh nnfolder utf-7
epa-file cl-extra gnutls network-stream nsm gnus-agent gnus-srvr
gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view
mml-smime smime dig nntp gnus-cache gnus-sum shr kinsoku svg dom
gnus-group gnus-undo init-gnus gnus-start gnus-dbus gnus-cloud nnimap
nnmail mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int
gnus-range message rmc puny rfc822 mml mml-sec epa derived epg rfc6068
epg-config mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader
gnus-win gnus nnheader gnus-util rmail rmail-loaddefs mail-utils
cus-start webjump time-date checkdoc lisp-mnt mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr help-mode flymake-proc flymake
warnings thingatpt cal-julian solar cal-dst cal-menu calendar
cal-loaddefs flyspell ispell edmacro kmacro init-interfaces grep
init-emms emms-mode-line emms-playing-time emms-player-mpv
emms-player-simple emms-info-opusinfo emms-info emms-later-do emms
emms-compat init-web elpher-eww-emulation init-volume init-pass
auth-source-pass pinentry init-programs pdf-occur ibuf-ext ibuffer
ibuffer-loaddefs tablist tablist-filter semantic/wisent/comp
semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util
semantic semantic/tag semantic/lex semantic/fw mode-local find-func
cedet pdf-isearch let-alist pdf-misc imenu pdf-tools compile comint
ansi-color ring pdf-view bookmark text-property-search jka-compr
pdf-cache pdf-info tq pdf-util advice format-spec image-mode exif dired
dired-loaddefs init-term init-eshell init-programming paren elec-pair
init-ui repeat swsw autorevert filenotify delsel vcomplete battery dbus
xml time minibuffer-line minibuf-eldef pcase init-base server finder-inf
package browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv info cus-edit pp cus-load wid-edit cl-loaddefs cl-lib
iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/pgtk-win pgtk-win term/common-win tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer 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
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads inotify
dynamic-setting font-render-setting cairo move-toolbar gtk x-toolkit
pgtk lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 634923 559779)
 (symbols 48 37441 3)
 (strings 32 180878 95332)
 (string-bytes 1 7865170)
 (vectors 16 76290)
 (vector-slots 8 1556469 156147)
 (floats 8 732 742)
 (intervals 56 8164 3393)
 (buffers 992 35))





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

* bug#50337:
  2021-09-02 13:34 bug#50337: 28.0.50; (while-no-input (redisplay) forms...) block behaves differently when window-system is pgtk Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-10-01 14:37 ` Fejfighter
  2021-10-02  1:31   ` bug#50579: Fwd: Fejfighter
  2021-10-01 14:54 ` bug#50337: Fejfighter
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Fejfighter @ 2021-10-01 14:37 UTC (permalink / raw)
  To: 50337


[-- Attachment #1.1: Type: text/plain, Size: 310 bytes --]

Having looked at this, the variable is respected, it's largely the same
code as the x version.
if the cursor colour and the foreground face are different it will show up

The actual error is that the colour selected to draw was the foreground
face rather than the background used. this patch should correct it

[-- Attachment #1.2: Type: text/html, Size: 385 bytes --]

[-- Attachment #2: 0001-Set-correct-face-color-for-stretched-glyphs.patch --]
[-- Type: text/x-patch, Size: 739 bytes --]

From 5d9df7345d7b3960c03099d1f698437032e63a68 Mon Sep 17 00:00:00 2001
From: Jeff Walsh <fejfighter@gmail.com>
Date: Sat, 2 Oct 2021 00:28:19 +1000
Subject: [PATCH] Set correct face color for stretched glyphs

* src/pgtkterm.c (x_draw_stretch_glyph_string): s/foreground/background
---
 src/pgtkterm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 559fc8b5c6..e48c1ce7ad 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -2391,7 +2391,7 @@ x_draw_stretch_glyph_string (struct glyph_string *s)
 	      color = s->xgcv.foreground;
 	    }
 	  else
-	    color = s->face->foreground;
+	    color = s->face->background;
 
 	  cairo_t *cr = pgtk_begin_cr_clip (s->f);
 
-- 
2.31.1


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

* bug#50337:
  2021-09-02 13:34 bug#50337: 28.0.50; (while-no-input (redisplay) forms...) block behaves differently when window-system is pgtk Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-10-01 14:37 ` bug#50337: Fejfighter
@ 2021-10-01 14:54 ` Fejfighter
  2021-12-06 18:12 ` bug#50337: 28.0.50; (while-no-input (redisplay) forms...) block behaves differently when window-system is pgtk Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-12-06 18:31 ` Daniel Semyonov
  3 siblings, 0 replies; 7+ messages in thread
From: Fejfighter @ 2021-10-01 14:54 UTC (permalink / raw)
  To: 50337


[-- Attachment #1.1: Type: text/plain, Size: 170 bytes --]

This appears to be left over from earlier days of the port, no longer
needed.

made described change, bootstrapped and loaded new pgtk emacs, no concerns

patch attached

[-- Attachment #1.2: Type: text/html, Size: 254 bytes --]

[-- Attachment #2: 0001-configure.ac-PGTK_LIBS-remove-dl-dependency.patch --]
[-- Type: text/x-patch, Size: 722 bytes --]

From 21b2a0d21dda757d806440ccb60b95404c6bba59 Mon Sep 17 00:00:00 2001
From: Jeff Walsh <fejfighter@gmail.com>
Date: Sat, 2 Oct 2021 00:50:08 +1000
Subject: [PATCH] configure.ac (PGTK_LIBS): remove dl dependency

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 6ebb966700..c277899b2f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2827,7 +2827,7 @@ AC_DEFUN
 PGTK_LIBS=
 if test "$window_system" = "pgtk"; then
   PGTK_OBJ="pgtkfns.o pgtkterm.o pgtkselect.o pgtkmenu.o pgtkim.o xsettings.o"
-  PGTK_LIBS="$GTK_LIBS -ldl"
+  PGTK_LIBS="$GTK_LIBS"
   HAVE_PGTK=yes
   AC_DEFINE([HAVE_PGTK], 1, [Define to 1 if you have pure Gtk+-3.])
 fi
-- 
2.31.1


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

* bug#50579: Fwd:
  2021-10-01 14:37 ` bug#50337: Fejfighter
@ 2021-10-02  1:31   ` Fejfighter
  0 siblings, 0 replies; 7+ messages in thread
From: Fejfighter @ 2021-10-02  1:31 UTC (permalink / raw)
  To: 50579


[-- Attachment #1.1: Type: text/plain, Size: 463 bytes --]

---------- Forwarded message ---------
From: Fejfighter <fejfighter@gmail.com>
Date: Sat, Oct 2, 2021 at 12:37 AM
Subject:
To: <50337@debbugs.gnu.org>


Having looked at this, the variable is respected, it's largely the same
code as the x version.
if the cursor colour and the foreground face are different it will show up

The actual error is that the colour selected to draw was the foreground
face rather than the background used. this patch should correct it

[-- Attachment #1.2: Type: text/html, Size: 837 bytes --]

[-- Attachment #2: 0001-Set-correct-face-color-for-stretched-glyphs.patch --]
[-- Type: application/x-patch, Size: 739 bytes --]

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

* bug#50337: 28.0.50; (while-no-input (redisplay) forms...) block behaves differently when window-system is pgtk
  2021-09-02 13:34 bug#50337: 28.0.50; (while-no-input (redisplay) forms...) block behaves differently when window-system is pgtk Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-10-01 14:37 ` bug#50337: Fejfighter
  2021-10-01 14:54 ` bug#50337: Fejfighter
@ 2021-12-06 18:12 ` Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-12-07  2:20   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-12-06 18:31 ` Daniel Semyonov
  3 siblings, 1 reply; 7+ messages in thread
From: Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-12-06 18:12 UTC (permalink / raw)
  To: 50337

This has been fixed at some point (not sure how to close this bug, or if
I'm even able to do so as the reporter).

Thanks,
Daniel





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

* bug#50337: 28.0.50; (while-no-input (redisplay) forms...) block behaves differently when window-system is pgtk
  2021-09-02 13:34 bug#50337: 28.0.50; (while-no-input (redisplay) forms...) block behaves differently when window-system is pgtk Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors
                   ` (2 preceding siblings ...)
  2021-12-06 18:12 ` bug#50337: 28.0.50; (while-no-input (redisplay) forms...) block behaves differently when window-system is pgtk Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-12-06 18:31 ` Daniel Semyonov
  3 siblings, 0 replies; 7+ messages in thread
From: Daniel Semyonov @ 2021-12-06 18:31 UTC (permalink / raw)
  To: 50337-done

My testing (on two different computers which were affected by this
issue) indicates that this bug has been fixed.





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

* bug#50337: 28.0.50; (while-no-input (redisplay) forms...) block behaves differently when window-system is pgtk
  2021-12-06 18:12 ` bug#50337: 28.0.50; (while-no-input (redisplay) forms...) block behaves differently when window-system is pgtk Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-12-07  2:20   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 7+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-12-07  2:20 UTC (permalink / raw)
  To: Daniel Semyonov; +Cc: 50337-done

Daniel Semyonov <daniel@dsemy.com> writes:

> This has been fixed at some point (not sure how to close this bug, or if
> I'm even able to do so as the reporter).
>
> Thanks,
> Daniel

Great!  I think I fixed that a few days ago making interrupt-based input
work on the PGTK port, so I'm closing this bug.





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

end of thread, other threads:[~2021-12-07  2:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-02 13:34 bug#50337: 28.0.50; (while-no-input (redisplay) forms...) block behaves differently when window-system is pgtk Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-01 14:37 ` bug#50337: Fejfighter
2021-10-02  1:31   ` bug#50579: Fwd: Fejfighter
2021-10-01 14:54 ` bug#50337: Fejfighter
2021-12-06 18:12 ` bug#50337: 28.0.50; (while-no-input (redisplay) forms...) block behaves differently when window-system is pgtk Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-07  2:20   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-06 18:31 ` Daniel Semyonov

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