nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] escaping from restricted mode


From: Benno Schulenberg
Subject: Re: [Nano-devel] escaping from restricted mode
Date: Thu, 30 Jul 2015 17:37:22 +0200

On Sat, Jul 25, 2015, at 09:45, Benno Schulenberg wrote:
> It would seem that very few people are actually using nano's
> restricted mode, or otherwise /someone/ would have reported
> that it isn't fully working.  For example, run 'rnano README'
> and type ^O.  Apart from ^G and ^C no shortcuts are shown, but
> you can type M-D and it will save the file in DOS format, you can
> type M-B and it will make a backup, and when you type ^T it will
> take you to the file browser (where you can't actually select any
> file, but you can browse the entire filesystem).  None of these
> things should be happening, none of these shortcuts should work,
> they should all just beep.

Hmm.  The comment that precedes the disabling of the toggles
in the WriteOut menu says:

    /* If we're using restricted mode, the DOS format, Mac format,
     * append, prepend, and backup toggles are disabled.  The first and
     * second are useless since inserting files is disabled, the third
     * and fourth are disabled because they allow writing to files not
     * specified on the command line, and the fifth is useless since
     * backups are disabled. */

The comment is wrong about the DOS and Mac format toggles: they
have no effect when inserting files, but only when writing out files.

The user can edit the file at will, and save it too, so why not allow
her to change also the format?  She can do it by hand:  M-R  M-R  $
<Enter>  M-V  ^M  <Enter>  A.  Mac format is much more work, but
can also be done.  So why not allow her the convenience of the
toggles?

The comment is also wrong about the append and prepend toggles:
they don't allow writing to other files, they only allow reduplicating
the current file.  This is most likely not what the user wants, so I
think it's good to disable these toggles in restricted mode, but the
comment should be adjusted.

Benno

-- 
http://www.fastmail.com - Or how I learned to stop worrying and
                          love email again




reply via email to

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