hniksic / emacs-htmlize

Convert buffer text and decorations to HTML.
192 stars 45 forks source link

Wrong number of arguments error #38

Closed rhinton closed 2 years ago

rhinton commented 2 years ago

I downloaded the code from: https://github.com/hniksic/emacs-htmlize master branch commit dd27bc3f

I'm running: GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.22.30) of 2018-11-02 on x86-01.bsys.centos.org

When I try to foramt a buffer with M-x htmlize-buffer I get the error: nreverse: Wrong number of arguments: overlays-at, 2

Can you help me? Thanks!

hniksic commented 2 years ago

Thanks for the report. Can you please try C-h f overlays-at and show the output?

Judging by the error message, your overlays-at function doesn't support the second argument. You might need to upgrade your Emacs to a newer version.

rhinton commented 2 years ago

Results:

overlays-at is a built-in function in 'C source code'.

(overlays-at POS)

Return a list of the overlays that contain the character at POS.

hniksic commented 2 years ago

For me it shows an optional argument SORTED, which htmlize needs. Please try upgrading to a newer Emacs - the problem should go away.

rhinton commented 2 years ago

I'm on a shared machine, so upgrading isn't an option for me. Thanks for the diagnosis!

hniksic commented 2 years ago

It occurred to me that you could just download the last version that supported pre-25 Emacs, which is not that old - like version 1.55 here.