nano-devel
[Top][All Lists]
Advanced

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

[Nano-devel] Re: [Info-nano] Nano Feature Request?


From: Adam Wysocki via ArcaBit
Subject: [Nano-devel] Re: [Info-nano] Nano Feature Request?
Date: Mon, 27 Jul 2009 08:29:12 +0200 (CEST)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

On Tue, 12 May 2009, Damien Joldersma wrote:

> I would like to have nano, my favorite editor :), to help me handle my
> permission problems.  As in, if I open a file that I can't edit - can there
> be some sort of visual cue letting me know that I can't write out the file
> or possibly not even let me either change just read/view or (extreme) not
> even open the file without prompting an "are you sure want to continue
> editing? you won't be able to save" or possibly even a nifty way to
> temporarily gain privleges via a sudo save or something, anything, just so
> long as I don't loose my trivial edits! :D

Hello,

I decided to investigate it a bit more and made a small patch (attached) 
that will set the view mode if at least one file can't be written to. It 
can be suppressed with (also added) option -y (or --noview).

It's drawbacks however are that:

- flags must be changed to long long (or unsigned long) as there are
  all 31 bits used
- see NOTES in access(2) manpage

Feel free to test and use (and maybe even it will make it's way into the 
nano source tree?).

Kind regards.

-- 
Software Development Department, ArcaBit Sp. z o.o.
Ul. Fortuny 9, 01-339 Warszawa, POLAND

Attachment: nano-autoview.patch.gz
Description: Binary data


reply via email to

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