[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] [PATCH] dropping a feature: remove the ability to use t

From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] dropping a feature: remove the ability to use the 'formatter' command
Date: Thu, 2 Aug 2018 20:03:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Op 02-08-18 om 09:19 schreef Eitan Adler:
> On Wed, 1 Aug 2018 at 10:47, Benno Schulenberg <address@hidden> wrote:
>> No one who has any objections to the removal of the 'formatter' command?
>> Last chance to protest.
> +1 to the removal. I wonder if there something we can do to make it
> clearer for users. I don't know how widely this feature is used, but
> perhaps a line saying "this feature was replaced" if someone tries to
> use it?

Hmm...  I don't want to add a special error message that will be useful
only for a short while.  But instead of removing the formatter thing from
the documentation, we could replace its description with something like:

  This feature has been removed.  It was superseded by a more general
  mechanism: the filtering of the buffer through an external command:
  ^R^X and then precede your formatter command with the pipe symbol.
  It has the added advantage that it can be undone.  If you use this
  formatting regularly, you could assign the series of keystrokes to
  a single key in your nanorc:

    bind M-F "^R^X|yourformatcommand^M" main

  (Note that the ^R, ^X, and ^M are each a single, literal control
  character.  You can enter them by preceding each with M-V.)

When someone uses the formatter feature and our newer nano reports an
error for it, the user most likely will either look at the NEWS file
(where the removal will be mentioned) or at the documentation.  So the
above should be enough.

About how widely used the feature is...  I've just tried to make use
of it, and... it doesn't even work!  I cannot make it work.  I've added
'formatter grep u' to the c.nanorc, opened a C file, invoked the formatter
(^T), the screen flashes and it says the file has changed, but saving it
and diffing it shows zero change.  :|  The formatter seems to be a dead
duck.  What am I doing wrong?  ...  Aaah!  The formatting program has to
modify the file in place (instead of following the usual Unix way: read
standard input, produce result on standard output).  Kack.  Putting in
c.nanorc 'formatter sed -i s/e/aa/' instead does produce the expected
result.  The documentation didn't explain what the formatting program
should do.  :|


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]