jdtsmith / indent-bars

Fast, configurable indentation guide-bars for Emacs
GNU General Public License v3.0
272 stars 7 forks source link

Bars not appearing #4

Closed ahan98 closed 11 months ago

ahan98 commented 11 months ago

The bars don't appear for me at all.

Screenshot 2023-07-30 at 3 14 27 PM

I'm running emacs-plus on MacOS 13.4.1. Output of M-x emacs-version:

GNU Emacs 29.0.91 (build 1, aarch64-apple-darwin22.5.0, NS appkit-2299.60 Version 13.4 (Build 22F66))

Here's what I see when running C-x C-e on the provided snippet to test stipples:

Screenshot 2023-07-30 at 3 06 43 PM

I feel like the above screenshot shows that stipple isn't fully supported because the bars should appear on the buffer as well (not just the borders), right? Perhaps the package would work by switching to emacs-mac, but I'm hoping that won't be necessary.

I don't think this issue is related to theme since the bars don't show even with all theming disabled. Just in case, I'm using the following theme:

(use-package ef-themes
  :init
  (setq ef-themes-mixed-fonts t)
  (setq ef-themes-headings
        '((0 . (variable-pitch light 1.9))
          (1 . (variable-pitch light 1.8))
          (2 . (variable-pitch regular 1.7))
          (3 . (variable-pitch regular 1.6))
          (4 . (variable-pitch regular 1.5))
          (5 . (variable-pitch 1.4))
          (6 . (variable-pitch 1.3))
          (7 . (variable-pitch 1.2))
          (t . (variable-pitch 1.1))))
  :config
  (load-theme 'ef-summer t))

I also don't think this is related to indentation, but here are the relevant indentation settings:

(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)

Below is some miscellaneous info on my setup.

In my init.el:

(use-package indent-bars
  :straight (:host github :repo "jdtsmith/indent-bars")
  :hook ((python-mode emacs-lisp-mode) . indent-bars-mode))

Output of C-h v indent-bars-color-by-depth: (:regexp "outline-\\([0-9]+\\)" :blend 1)

Screenshots of relevant faces from M-x list-faces-display:

Screenshot 2023-07-30 at 3 17 56 PM Screenshot 2023-07-30 at 3 19 08 PM
jdtsmith commented 11 months ago

Please see Compatibility. It's interesting that parts of the frame do stipple correctly. Here's a simplified test to try, in *scratch*:

(let* ((w (window-font-width))
       (stipple `(,w 1 ,(apply #'unibyte-string
                   (append (make-list (1- (/ (+ w 7) 8)) ?\0)
                       '(1))))))
  (insert "\n" (propertize (concat  (make-string 15 ?\s)
                    "THIS IS A TEST"
                    (make-string 15 ?\s))
                           'face `(:background "red" :foreground "blue" :stipple ,stipple))))
ahan98 commented 11 months ago

What is it supposed to look like? Here's what I see:

Screenshot 2023-07-30 at 3 51 10 PM
jdtsmith commented 11 months ago

You are supposed to have bars. Try M-x font-lock-mode to disable font lock and try again.

image

On Mac I recommend emacs-mac (which I use). It supports stipples perfectly.

ahan98 commented 11 months ago

Ok, I'll try switching to emacs-mac then. Thanks.

jdtsmith commented 11 months ago

You might also open an issue with the maintainers of your port. Here is the patch that enabled proper :stipple display on emacs-mac. Shouldn't be hard to get working everywhere.