unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#54598: 27.2; Bad interraction between modus-theme and hs-minor-mode
@ 2022-03-27 16:17 Pierre Téchoueyres
  2022-03-29 13:06 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 22+ messages in thread
From: Pierre Téchoueyres @ 2022-03-27 16:17 UTC (permalink / raw)
  To: 54598

[-- Attachment #1: Type: text/plain, Size: 933 bytes --]

Hi everybody,

I'm facing a strange behaviour.  With the following receipe I'm 
unable
to go to to the end of buffer with C-End (nor with M-x 
end-of-buffer).

First You should have modus installed from elpa somewhere. I've 
mine in
~/.emacs.d/elpa-27/

Then evalutate the code below :
  #+begin_src elisp
(let ((modus-theme-install-path (expand-file-name 
"~/.emacs.d/elpa-27/modus-themes-20220323.801/")))
  (setq display-fill-column-indicator-character 9474)
  (add-to-list 'load-path modus-theme-install-path)
  (load (expand-file-name "modus-themes-autoloads.el" 
  modus-theme-install-path))
  (modus-themes-load-vivendi)
  (find-file (expand-file-name "modus-themes.el" 
  modus-theme-install-path))
  (display-fill-column-indicator-mode)
  (hs-minor-mode)
  (hs-hide-all))
  #+end_src

Then try to jump at the end of buffer with C-end or M-x 
end-of-buffer.
The point isn't at end of buffer. See the snapshot.1.png attached.

[-- Attachment #2: snapshot.1.png --]
[-- Type: image/png, Size: 60317 bytes --]

[-- Attachment #3: Type: text/plain, Size: 424 bytes --]


What I've found is that the following conditions are mandatory to
reproduce the error :
- Use a build for Windows (There is no problem on my Gnu/Linux 
  platform)
- Use a version of modus past f76fc911 where the :height property 
  was
added to the fill-column-indicator face.
- Use hs-minor-mode and hide all regions

On my Gnu/Linux (see Screenshot_20220327_183833.png) there is no 
problems to reach the end of buffer.

[-- Attachment #4: Screenshot_20220327_183833.png --]
[-- Type: image/png, Size: 124015 bytes --]

[-- Attachment #5: Type: text/plain, Size: 8189 bytes --]


You could also see that the behaviour of the fill column isn't the 
same
(I prefer the one on Gnu/Linux)

I've tried to change the behaviour of the face like descrived in 
the
manual with the code bellow :

  #+begin_src elisp
(modus-themes-with-colors
  (custom-set-faces
   `(fill-column-indicator ((,class :foreground ,bg-active)))))
  #+end_src

But I caught the following error :

  #+begin_src 
Debugger entered--Lisp error: (error "’org-beautify’ is not a 
Modus theme")
  signal(error ("’org-beautify’ is not a Modus theme"))
  error("'%s' is not a Modus theme" org-beautify)
  modus-themes--palette(org-beautify)
  modus-themes-current-palette()
  (let* ((class '((class color) (min-colors 89))) (g1663 
  (modus-themes-current-palette)) (bg-main (alist-get 'bg-main 
  g1663)) (fg-main (alist-get 'fg-main g1663)) (bg-dim (alist-get 
  'bg-dim g1663)) (fg-dim (alist-get 'fg-dim g1663)) (bg-alt 
  (alist-get 'bg-alt g1663)) (fg-alt (alist-get 'fg-alt g1663)) 
  (bg-active (alist-get 'bg-active g1663)) (fg-active (alist-get 
  'fg-active g1663)) (bg-inactive (alist-get 'bg-inactive g1663)) 
  (fg-inactive (alist-get 'fg-inactive g1663)) (bg-active-accent 
  (alist-get 'bg-active-accent g1663)) (bg-special-cold (alist-get 
  'bg-special-cold g1663)) (bg-special-faint-cold (alist-get 
  'bg-special-faint-cold g1663)) (fg-special-cold (alist-get 
  'fg-special-cold g1663)) (bg-special-mild (alist-get 
  'bg-special-mild g1663)) (bg-special-faint-mild (alist-get 
  'bg-special-faint-mild g1663)) (fg-special-mild (alist-get 
  'fg-special-mild g1663)) (bg-special-warm (alist-get 
  'bg-special-warm g1663)) (bg-special-faint-warm (alist-get 
  'bg-special-faint-warm g1663)) (fg-special-warm (alist-get 
  'fg-special-warm g1663)) (bg-special-calm (alist-get 
  'bg-special-calm g1663)) (bg-special-faint-calm (alist-get 
  'bg-special-faint-calm g1663)) (fg-special-calm (alist-get 
  'fg-special-calm g1663)) (red (alist-get 'red g1663)) (red-alt 
  (alist-get 'red-alt g1663)) (red-alt-other (alist-get 
  'red-alt-other g1663)) (red-faint (alist-get 'red-faint g1663)) 
  (red-alt-faint (alist-get 'red-alt-faint g1663)) 
  (red-alt-other-faint (alist-get 'red-alt-other-faint g1663)) 
  (green (alist-get 'green g1663)) (green-alt (alist-get 
  'green-alt g1663)) (green-alt-other (alist-get 'green-alt-other 
  g1663)) (green-faint (alist-get 'green-faint g1663)) 
  (green-alt-faint (alist-get 'green-alt-faint g1663)) 
  (green-alt-other-faint (alist-get 'green-alt-other-faint g1663)) 
  (yellow (alist-get 'yellow g1663)) (yellow-alt (alist-get 
  'yellow-alt g1663)) (yellow-alt-other (alist-get 
  'yellow-alt-other g1663)) (yellow-faint (alist-get 'yellow-faint 
  g1663)) (yellow-alt-faint (alist-get 'yellow-alt-faint g1663)) 
  (yellow-alt-other-faint (alist-get 'yellow-alt-other-faint 
  g1663)) (blue (alist-get 'blue g1663)) (blue-alt (alist-get 
  'blue-alt g1663)) (blue-alt-other (alist-get 'blue-alt-other 
  g1663)) (blue-faint (alist-get 'blue-faint g1663)) 
  (blue-alt-faint (alist-get 'blue-alt-faint g1663)) 
  (blue-alt-other-faint (alist-get 'blue-alt-other-faint g1663)) 
  (magenta (alist-get 'magenta g1663)) ...) (ignore class bg-main 
  fg-main bg-dim fg-dim bg-alt fg-alt bg-active fg-active 
  bg-inactive fg-inactive bg-active-accent bg-special-cold 
  bg-special-faint-cold fg-special-cold bg-special-mild 
  bg-special-faint-mild fg-special-mild bg-special-warm 
  bg-special-faint-warm fg-special-warm bg-special-calm 
  bg-special-faint-calm fg-special-calm red red-alt red-alt-other 
  red-faint red-alt-faint red-alt-other-faint green green-alt 
  green-alt-other green-faint green-alt-faint 
  green-alt-other-faint yellow yellow-alt yellow-alt-other 
  yellow-faint yellow-alt-faint yellow-alt-other-faint blue 
  blue-alt blue-alt-other blue-faint blue-alt-faint 
  blue-alt-other-faint magenta ...) (custom-set-faces (list 
  'fill-column-indicator (list (list class ':foreground 
  bg-active)))))
  eval((let* ((class '((class color) (min-colors 89))) (g1663 
  (modus-themes-current-palette)) (bg-main (alist-get 'bg-main 
  g1663)) (fg-main (alist-get 'fg-main g1663)) (bg-dim (alist-get 
  'bg-dim g1663)) (fg-dim (alist-get 'fg-dim g1663)) (bg-alt 
  (alist-get 'bg-alt g1663)) (fg-alt (alist-get 'fg-alt g1663)) 
  (bg-active (alist-get 'bg-active g1663)) (fg-active (alist-get 
  'fg-active g1663)) (bg-inactive (alist-get 'bg-inactive g1663)) 
  (fg-inactive (alist-get 'fg-inactive g1663)) (bg-active-accent 
  (alist-get 'bg-active-accent g1663)) (bg-special-cold (alist-get 
  'bg-special-cold g1663)) (bg-special-faint-cold (alist-get 
  'bg-special-faint-cold g1663)) (fg-special-cold (alist-get 
  'fg-special-cold g1663)) (bg-special-mild (alist-get 
  'bg-special-mild g1663)) (bg-special-faint-mild (alist-get 
  'bg-special-faint-mild g1663)) (fg-special-mild (alist-get 
  'fg-special-mild g1663)) (bg-special-warm (alist-get 
  'bg-special-warm g1663)) (bg-special-faint-warm (alist-get 
  'bg-special-faint-warm g1663)) (fg-special-warm (alist-get 
  'fg-special-warm g1663)) (bg-special-calm (alist-get 
  'bg-special-calm g1663)) (bg-special-faint-calm (alist-get 
  'bg-special-faint-calm g1663)) (fg-special-calm (alist-get 
  'fg-special-calm g1663)) (red (alist-get 'red g1663)) (red-alt 
  (alist-get 'red-alt g1663)) (red-alt-other (alist-get 
  'red-alt-other g1663)) (red-faint (alist-get 'red-faint g1663)) 
  (red-alt-faint (alist-get 'red-alt-faint g1663)) 
  (red-alt-other-faint (alist-get 'red-alt-other-faint g1663)) 
  (green (alist-get 'green g1663)) (green-alt (alist-get 
  'green-alt g1663)) (green-alt-other (alist-get 'green-alt-other 
  g1663)) (green-faint (alist-get 'green-faint g1663)) 
  (green-alt-faint (alist-get 'green-alt-faint g1663)) 
  (green-alt-other-faint (alist-get 'green-alt-other-faint g1663)) 
  (yellow (alist-get 'yellow g1663)) (yellow-alt (alist-get 
  'yellow-alt g1663)) (yellow-alt-other (alist-get 
  'yellow-alt-other g1663)) (yellow-faint (alist-get 'yellow-faint 
  g1663)) (yellow-alt-faint (alist-get 'yellow-alt-faint g1663)) 
  (yellow-alt-other-faint (alist-get 'yellow-alt-other-faint 
  g1663)) (blue (alist-get 'blue g1663)) (blue-alt (alist-get 
  'blue-alt g1663)) (blue-alt-other (alist-get 'blue-alt-other 
  g1663)) (blue-faint (alist-get 'blue-faint g1663)) 
  (blue-alt-faint (alist-get 'blue-alt-faint g1663)) 
  (blue-alt-other-faint (alist-get 'blue-alt-other-faint g1663)) 
  (magenta (alist-get 'magenta g1663)) ...) (ignore class bg-main 
  fg-main bg-dim fg-dim bg-alt fg-alt bg-active fg-active 
  bg-inactive fg-inactive bg-active-accent bg-special-cold 
  bg-special-faint-cold fg-special-cold bg-special-mild 
  bg-special-faint-mild fg-special-mild bg-special-warm 
  bg-special-faint-warm fg-special-warm bg-special-calm 
  bg-special-faint-calm fg-special-calm red red-alt red-alt-other 
  red-faint red-alt-faint red-alt-other-faint green green-alt 
  green-alt-other green-faint green-alt-faint 
  green-alt-other-faint yellow yellow-alt yellow-alt-other 
  yellow-faint yellow-alt-faint yellow-alt-other-faint blue 
  blue-alt blue-alt-other blue-faint blue-alt-faint 
  blue-alt-other-faint magenta ...) (custom-set-faces (list 
  'fill-column-indicator (list (list class ':foreground 
  bg-active))))) nil)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)
  #+end_src

  I've tracked it down to modus-themes--current-theme
  #+begin_src elisp
(defun modus-themes--current-theme ()
  "Return current theme."
  (car custom-enabled-themes))
  #+end_src

  I think those function should filter on symbols and take the 
  first
  occurence of a modus-* theme. Maybe something like :
  #+begin_src elisp
(defun modus-themes--current-theme ()
  "Return current theme."
  (car (seq-filter (lambda (arg) (string-match-p "^modus" 
  (symbol-name arg))) custom-enabled-themes)))
  #+end_src

  Thanks in advance for your help.

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

end of thread, other threads:[~2022-04-07 14:25 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-27 16:17 bug#54598: 27.2; Bad interraction between modus-theme and hs-minor-mode Pierre Téchoueyres
2022-03-29 13:06 ` Lars Ingebrigtsen
2022-03-29 21:05   ` Pierre Téchoueyres
2022-03-31 11:49     ` Lars Ingebrigtsen
2022-03-31 13:08       ` Protesilaos Stavrou
2022-03-31 19:24         ` Pierre Téchoueyres
2022-03-31 19:57           ` Protesilaos Stavrou
2022-03-31 20:19             ` Pierre Téchoueyres
2022-04-01  6:05             ` Eli Zaretskii
2022-04-02 17:53               ` Pierre Téchoueyres
2022-04-02 18:58                 ` Eli Zaretskii
2022-04-02 19:48                   ` Pierre Téchoueyres
2022-04-03  4:18                     ` Protesilaos Stavrou
2022-04-03  5:14                     ` Eli Zaretskii
2022-04-06 18:57                       ` Pierre Téchoueyres
2022-04-07  5:51                         ` Eli Zaretskii
2022-04-07  6:51                           ` Protesilaos Stavrou
2022-04-07  7:31                             ` Eli Zaretskii
2022-04-07  8:00                               ` Protesilaos Stavrou
2022-04-07  8:27                                 ` Eli Zaretskii
2022-04-07 12:44                                   ` Protesilaos Stavrou
2022-04-07 14:25                                     ` Eli Zaretskii

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