Closed martinleduc closed 6 years ago
hm. I am not able to reproduce this on my system (MacOS or Windows) in an org-file. Can you say anymore about what you are doing when this fails?
Thanks for the extra details. Those steps work fine for me. I am not sure what to tell you.
Hi again, I decided to start with a clean emacs configuration, and I still get the same error.
I downloaded the latest version of the required packages from github:
My emacs version is 25.2.2.
Here is the content of my simplified .emacs file:
(add-to-list 'load-path "/home/leduc/.emacs.d/downloaded-packages/hydra/") (add-to-list 'load-path "/home/leduc/.emacs.d/downloaded-packages/ov.el/") (add-to-list 'load-path "/home/leduc/.emacs.d/downloaded-packages/dash.el/") (add-to-list 'load-path "/home/leduc/.emacs.d/downloaded-packages/s.el/") (add-to-list 'load-path "/home/leduc/.emacs.d/downloaded-packages/ov-highlight/") (require 'hydra) (require 'ov) (require 'dash) (require 's) (require 'ov-highlight)
Any idea ? Thanks.
... and I'm running Ubuntu 18.04.1 LTS.
Still no ideas, it works fine for me on a clean emacs and clean scimax. I guess it is happening in the ov-highlight-color macro, which uses completing read. I have ivy setup to do that, which works for me. Maybe it doesn't work with the default completing read?
Does it still work for you with the default completing read ?
Or how can I change it to an ivy setup ?
It looks like it will not work with the default completing read in the current ov-highlight. The way this works is it uses as the collection of strings a propertized list of colors from (list-colors-display), then it gets the actual color from the :background property of the selected string. The default completing read does not appear to show the propertized strings however, so they have no :background property, hence the nil value.
you can change to an ivy-setup I think by just adding (ivy-mode) to your init file, or M-x ivy-mode in the buffer (assuming you have installed ivy from Melpa).
I have added a fix for this that seems to work for me in both the default and with ivy. That might resolve your problem. Thanks for your persistence in explaining the problem!
Many thanks, now it works fine with both ivy and the default completion mode.
Hi,
When trying to choose a color using ov-highlight-color, I get the following message for any color I choose:
"Invalid face attribute :background nil"
However, if I use the same color name to define a highlight, it works well:
(ov-highlight-make "blue" '(:background "CadetBlue1"))
Many thanks for helping.
Martin