-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modus-Vivendi cursor wrong colour in new frame #7
Comments
Hello @akoen and thanks for reporting this! I can't reproduce it. Just rebuilt Emacs28 with native-comp. Following your steps, I get a visible cursor in both frames: Could this be related to EDIT: add missing question mark. |
Interesting. I have nothing related to Emacs in my =~/.Xresources=, and I cannot reproduce the issue with any other built-in-theme. However, if you can't reproduce then it seems likely to be an artifact of my system configuration. I'll be sure to update this issue if I find a solution, but feel free to close if there's nothing else to be done. |
It is a strange problem and I am not sure what could be causing it---sorry about that. I prefer to keep this issue open in case you find some more information. In terms of the themes, |
Hi, I'm able to reproduce steps in the issue description. I run emacs prebuilt from the
I can also reproduce by creating new frames with emacsclient. I'll post any developments. |
Hello @magne-hov and thanks for the feedback! I just installed that package from the AUR, logged into my Sway/Wayland session and launched The details:
Please keep me posted. I am willing to help, though I first need to see the problem on my end. |
Hello, I am experiencing similar issue on NixOS 21.11 (Porcupine). I am using Emacs pgtk branch (with nix-community's emacs-overlay) with Wayland on Sway. It seems that when I create new frame and I noticed that when I was using just the Emacs gcc branch, I did not have that problem. After I started using the pgtk one, this issue started appearing. My guess is that Details:
|
Thank you @alternateved for reporting this! Based on your description, this must be an upstream bug.
This point, in particular, indicates that something is amiss with whatever controls the Emacs frame. I know that terminal emulators have this behaviour of using the colour of the underlying character. But this was not the experience I had while using native-comp+pgtk on Sway, where the cursor always had the expected black/white colour. EDIT: I was using the Emacs GUI. For reference, the `(cursor ((,class :background ,fg-main))) This basically makes it black for
I was using the native comp option with the pgtk branch for several days on a Sway session. This happened during mid to late September, as recorded in the commit log of my dotfiles: https://gitlab.com/protesilaos/dotfiles (last commit referencing Sway was on 2021-09-22 though I likely kept using it for several days afterwards). I also retried it a few days ago, as discussed in the previous message to this thread: #7 (comment). I can try to install an AUR package or re-build from source, in an attempt to reproduce the issue, though at this stage I cannot see how that will change things with regard to the modus-themes. My suggestion is that we report the bug to the Emacs maintainers. Have you tried What do you think? |
That is an excellent idea. I have never used Bug ID is 51161. |
Thanks for reporting the bug upstream. Now we hope for the best. Note that the |
Hello again! It seems Hello again! It seems we have not heard anything about bug#51161, though the pgtk branch has been since merged into If there are any updates on your end, I would like to know about them. Maybe we can get the maintainers to take another look at bug#51161 and, if necessary, help them by providing additional information. Or we can close this issue if it is no longer relevant.we |
Hello, thank you for tracking this issue. Currently I cannot test this issue since I am away from my personal laptop running affected environment, but I can assure that the bug was still relevant (week and a half ago) when running Emacs build with pgtk and native-comp enabled on NixOS. |
I can confirm that this issue also appears on openSUSE Tumbleweed while using this build. |
I am not denying the existence of the bug. It just is that I have never I just rebuilt Emacs to give it another try. Still not possible to This is the information of my system (I build Emacs with a custom
I got that information with: (require 'emacsbug)
(emacs-bug--system-description) Or by evaluating each of the following: (emacs-version)
=> "GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, cairo version 1.17.4) of 2022-01-03"
system-configuration-options
=> "--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-sound=alsa --with-modules --without-libotf --without-m17n-flt --without-gconf --without-gsettings --with-native-compilation --with-xinput2 --with-pgtk --without-xaw3d --with-sound=no --without-gpm --without-compress-install '--program-transform-name=s/\\([ec]tags\\)/\\1.emacs/' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection' LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS'"
system-configuration-features
=> "ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM GTK3 ZLIB"
system-configuration
=> "x86_64-pc-linux-gnu" We need to find a reproducible recipe so that we can petition the |
Yes, you are right, apologies. What would happen if you would have an (add-hook 'after-init-hook (lambda () (load-theme 'modus-vivendi))) And if you would start emacsclient with that command: emacsclient -c -a '' I know that for sure you already tried whatever you could to reproduce it, but maybe it is worth a go. |
On 2022-01-03, 09:14 -0800, Tomasz Hołubowicz ***@***.***> wrote:
Yes, you are right, apologies.
What would happen if you would have an `init.el` file with only this line:
```elisp
(add-hook 'after-init-hook (lambda () (load-theme 'modus-vivendi)))
```
And if you would start emacsclient with that command:
```bash
emacsclient -c -a ''
```
Yes, I can reproduce the bug now. A couple of notes:
* If I launch just `emacs`, the cursor works properly. So this is
specific to `emacsclient` or probably the newly-launched daemon from
the -a flag.
* In that emacsclient frame, if I do M-x modus-themes-toggle and toggle
back to `modus-vivendi` then the cursor appears as intended. So I
suspect that somehow (how?) the pgtk emacsclient/daemon/server assumes
a black-coloured cursor for new frames and for some reason (why?) it
ignores the theme's directive to use a white cursor.
I know that for sure you already tried whatever you could to reproduce
it, but maybe it is worth a go.
We have something here: that is a good step. I will continue
experimenting with this and then we can report the bug against emacs.git
(now that I have a recipe, I can write the report and add you in Cc or
post the link to the issue tracker).
…--
Protesilaos Stavrou
https://protesilaos.com
|
I reported the bug: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53073. The weird thing is that the |
The bug was fixed upstream! Please rebuild Emacs and give it a try. |
Thank you! It is amazing that this issue is not there anymore. |
Indeed! I think we were a bit unlucky with the timing of this bug, Can @magne-hov and @akoen please confirm if this bug has been fixed on |
This pertains to Emacs bug#53073 which I reported a few weeks ago: <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53073>. In short: the cursor was invisible when using modus-vivendi in an emacsclient with a build that included the --with-pgtk flag. The discussion took place on the GitHub mirror, issue 7: <#7>.
In the meantime, this makes the theme load upon each call to make-frame:
|
Do you think this is necessary? Does the problem with the cursor persist if you do not set that? |
Sorry, I meant until the fix is included in a release (if one is using Emacs 28 with PGTK) |
I see. Thanks! About the
Evaluate:
|
Thanks for the clarification! |
I apologize if I am bumping an old issue, but I am facing the same issue as above and unable to figure out how to sort it out. I am on archlinux with wayland and using the modus-vivendi theme on the emacs AUR package emacs-gcc-wayland-devel-bin (https://aur.archlinux.org/packages/emacs-gcc-wayland-devel-bin). Every time a new frame is launched, the cursor color is black and hence invisible. Manually changing the cursor color works, but the color is fixed and does not match with the font-face color (not sure if this is the terminology), as in modus-operandi. Is it that the specific emacs AUR package I am using does not yet have the above fix, and I should just wait until it gets patched? This seems unlikely, since the version is 28.2.50. |
Hello @iyerkri! I think the PGTK on Emacs 28 is fundamentally problematic. I advise against it. The The way I see it, you have two options: (i) use the EDIT: The official Emacs package with native compilation is With Emacs 30, you can customise your build to include PGTK. I do it this way:
Those granted, my opinion on PGTK is that it offers a minor advantage if you are striving for a pure wayland experience. Otherwise it has major issues when you run Emacs in Xorg. There may be a time you want to switch away from Wayland and which point your Emacs is subject to crashes. As such, I ended up using |
Thank you @protesilaos. I will try out what you recommend. Although it is not necessary, it would be nice to have PGTK, since otherwise the fonts are too blurry. |
You are welcome @iyerkri! I remember the blurry fonts. It no longer exists on Emacs 29+, though it may still do in Emacs 28 with PGTK. |
This bug in Modus Operandi is present in Mituharu's emacs-mac. I have tested with the releases of Emacs 28 and 29.1. PGTK (and Emacs 30, which is not available in the Mac port) won't be much help here. Any suggestions? |
Hello @endter! From what I can tell, the PGTK should not be used on the Mac: it is a Linux-specific thing that only works with the Wayland display protocol. |
When using the modus-vivendi theme, making a new frame renders the cursor invisible in some buffers.
Steps to reproduce:
emacs -Q
M-: (load-theme 'modus-vivendi nil)
Write some text in the scratch buffer. The cursor is visible (although here the window is unfocused for the screenshot).
M-x: make-frame
In the same buffer the cursor is now invisible, despite being positioned on the 'p' of 'Example text':
I cannot reproduce the same issue with modus-operandi.
Info
The text was updated successfully, but these errors were encountered: