Re: Problem using formatter

Robert Goulding <[email protected]> Sat, 23 Jul 2022 10:59:04 -0400
Newsgroups gmane.editors.nano.general
Message-ID <CACE7msv5gAu5scXPaucU-nSMO7weDBJCJ4J4sg7UqODxkjbjTw@mail.gmail.com>
And I'm guessing this is because pandoc sends the converted text to stdout.
But according to the nanorc manpage, the formatter command sends the buffer
to a temporary file, executes the command on the file, and then replaces
the buffer with the modified file. But of course pandoc does not alter the
file. It could be told to, with the output file option (-o) -- but how
would I do that?

On Sat, Jul 23, 2022 at 10:28 AM Robert Goulding <[email protected]>
wrote:

> Using nano 6.3 on Debian bullseye.
>
> I am trying to use pandoc to tidy up and reformat markdown files. So, I
> have the following two lines at the top of my markdown.nanorc file:
>
> syntax "Markdown" "\.(md|mkd|mkdn|markdown)$"
> formatter pandoc --wrap=none -t
> markdown-simple_tables-pipe_tables-multiline_tables
>
> When I hit M-F, the screen flashes, but the content of the buffer is not
> changed. However, when I quit nano, the properly formatted buffer is
> visible in the terminal.
>
> Attached is a sample file, and what my terminal looks like after I quit
> nano.
>
> Robert.
>
> --
> Robert Goulding
> Director, John J. Reilly Center for Science, Technology, and Values;
> Director, Program in History and Philosophy of Science;
> Assoc. Professor, Program of Liberal Studies,
> Fellow, Medieval Institute,
> University of Notre Dame.
>


-- 
Robert Goulding
Director, John J. Reilly Center for Science, Technology, and Values;
Director, Program in History and Philosophy of Science;
Assoc. Professor, Program of Liberal Studies,
Fellow, Medieval Institute,
University of Notre Dame.