ancane / markdown-preview-mode

Minor mode to preview markdown output as you save
GNU General Public License v3.0
166 stars 23 forks source link

error in process filter: Not enough arguments for format string #48

Open jo7ueb opened 2 years ago

jo7ueb commented 2 years ago

Hi, I tried to use markdown-preview-mode but failed. I have installed markdown command with $apt install markdown. So my installation may be correct.

Following is from *Messages* buffer

Markdown-Preview mode enabled in current buffer
Websocket opened
You can run the command ‘markdown-preview-mode’ with M-x ma-p-m RET
Websocket opened
error in process filter: Not enough arguments for format string [2 times]

Thanks.

ancane commented 2 years ago

Hey. I haven't been looking into the mode for quite some time. Probably it just got outdated and something broke around dependencies, but given the "WebSocket open" message got printed there is a hope the server is running, but the opening of the browser is somehow broken. You can try the following:

c0001 commented 11 months ago

This is not only the servelet problem, but also some message usage internally wrong of this package that all of those message wrapper doesn't safety check the first argument whether containing format strings, for example:

In line: 290

:on-error (lambda (websocket type err) (message (format "====> Error: %s" err))) 

;; FIXME: we should fixed as '(message "%s" (format "====> Error: %s" err))'

Hope for fixing, since it's not a feature around case, I've not made a pull-request first, but if needed thus, I'll give one.