christopherjwhite/emacs-twiki-mode

"Wrong number of arguments" when exporting

dowgird opened this issue · 3 comments

Emacs version: 24.1.1, always reproducible.

C-c e produces "wrong number of arguments" error, caused by twiki-export-to-clipboard trying to pass 4 arguments to filter-buffer-substring (in 24.1.1 it has 3 args, last one optional). Removing "nil t" from the offending line fixes the issue.

Btw, great module, thanks for taking the time to publish it! :-)

Looks like 24 introduced an incompatible change to the function "filter-buffer-substring". For some reason, they dropped the 4th argument. This thread indicates some confusion about it:

http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00174.html

The 4th arg in Emacs 23 is NOPROPS, which indicates it should drop text-properties, which is required when someone is using longlines-mode (which another user is...).

I don't have Emacs 24 installed anywhere. Can you try turning on longlines-mode, make sure you have some really long lines that appear to wrap, and then export and see if the output looks right?

Thanks!
...cj

Test conducted. Long lines that wrap in longlines-mode export as ordinary long lines, i.e. the soft returns from longlines seem to have been properly filtered out.

Thank you!