nano-devel
[Top][All Lists]
Advanced

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

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


From: Chris Allegretta
Subject: Re: [Nano-devel] Re: [Info-nano] Nano Feature Request?
Date: Mon, 27 Jul 2009 12:29:25 -0400

Hmm, I don't know how to feel about this.  It would not be entirely
obvious to the casual user why they are suddenly thrust into view mode
when the issue is actually permissions.  When you write and write the
file and get permission denied, it's very obvious what the problem is,
and you have at least two options:
- Write the file somewhere else (i.e. $HOME or /tmp)
- Suspend nano and fix permissions

Also, consider if you're editing a file which you don't actually own
but have every intention of writing to a different location if you can
get something useful done with it, but not before.  I can't be the
only person who does this.  The workflow change here would be to copy
somewhere else first, but that habit is too formed by now for me :-)

Anyway this option seems to break workflow which I understand is by
design, it's anticipating a problem.  I think I'd probably accept it
if the default were off instead of on.

The bigger problem, which I've been trying to solve myself while
experimenting with soft line wrapping, is that long long (and unsigned
long long) will cause warnings with -pedantic which will make other
folks unhappy as it makes nano less portable.  We need to figure out a
way to fix that long term anyway to add other features, so I think
it's worth figuring out a way to do this regardless.

On Mon, Jul 27, 2009 at 2:29 AM, Adam Wysocki via
ArcaBit<address@hidden> wrote:
> 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
> _______________________________________________
> Nano-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/nano-devel
>
>




reply via email to

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