2

I'm using Emacs in dwm window manager of suckless.org, with the following init.el:

(menu-bar-mode 0)
(scroll-bar-mode 0)
(tool-bar-mode 0)

When I launch Emacs, with the command $ emacs, my scroll bar thumb vanishes, as it should because I have used scroll-bar-mode 0 in my init file. But the scroll-bar space remains, colored black, on the right side of the main window.

I can quickly go into floating mode and back into tiling mode to fix the problem and I don't exit emacs that often. So, it's not a big problem, but it is certainly annoying. I haven't have gotten a chance to test if this also happens in other window managers.

And if I launch Emacs with $ emacs -Q, and evaluate the codes in my init file, similar thing happens. Only this time, instead of the scroll-bar area being blacked out, it just gets messed up.

launching emacs

Does anyone know what is going on there? I have Emacs latest release version 26.1

GNU Emacs 26.1
Copyright (C) 2018 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

Edit

I have just found out that the problem is fixed by putting (scroll-bar-mode 0) after (tool-bar-mode 0) and not before! Why is that?

3N4N
  • 177
  • 1
  • 7
  • 1
    It might be a redisplay problem, and it might be related to your window manager. Please remove as much as possible from your init file (back it up first), and show here only the minimal code you need to reproduce the problem. IOW remove as much as possible that is just noise for the question. – Drew Apr 05 '19 at 17:51
  • Edited the question. Thanks. – 3N4N Apr 05 '19 at 18:34
  • Thanks. That edit helps a lot. Does your recipe start from `emacs -Q` (no init file, other than the code you show)? If so, please state that in the question. If not, please try to do that. – Drew Apr 05 '19 at 22:25
  • So you see the problem if you also start with `emacs -Q` and you evaluate just those 3 sexps in buffer `*scratch*` (using `C-x C-e`)? If so, I don't see that with an MS Windows build of Emacs 26.1, FWIW. – Drew Apr 05 '19 at 22:28
  • I think the scroll bar is still there, it's just completely filled by the thumb or the thumb is missing. Looks like a display problem. – Drew Apr 05 '19 at 22:32
  • 2
    You can post your workaround as an answer, and you can accept your own answer. This sounds like a bug. Please consider reporting it to Emacs developers: `M-x report-emacs-bug`. – Drew Apr 05 '19 at 22:34
  • @Drew, similar but not same thing happens if I launch emacs with -Q flag. I am pretty sure this is because the window doesn't get refreshed quick enough for the window manager to display. And thus gets messed up. – 3N4N Apr 06 '19 at 03:24
  • You might want to try enabling pixelwise resizing of the frame. –  Apr 06 '19 at 23:00

0 Answers0