On Fri, Jun 26, 2020 at 12:46 PM Zbigniew Jędrzejewski-Szmek <zbyszek@xxxxxxxxx> wrote: > > On Fri, Jun 26, 2020 at 12:38:40PM -0400, Ben Rosser wrote: > > On Fri, Jun 26, 2020 at 12:32 PM Zbigniew Jędrzejewski-Szmek > > <zbyszek@xxxxxxxxx> wrote: > > > > > > On Thu, Jun 25, 2020 at 01:18:59PM -0400, Ben Cotton wrote: > > > > == Scope == > > > > * Proposal owners: > > > > ** Modify comps to include nano Fedora wide. > > > > ** Create a new subpackage of <code>nano</code>, called > > > > <code>nano-editor</code>. > > > > ** <code>nano-editor</code> to include > > > > <code>/usr/lib/environment.d/10-nano.conf</code>, which sets > > > > <code>$EDITOR</code> to <code>nano</code>. > > > > > > There's one nitpick with using nano in 'git commit' and similar: it'll > > > ask about the name to save as: > > > ^X > > > Save modified buffer? Y > > > File Name to Write: /home/zbyszek/src/systemd/.git/worktrees/systemd-work/COMMIT_EDITMSG > > > > > > Would it be possible to skip this last question in those scenarios? > > > It the answer is "no", that's OK, but if it would be easy, it'd make > > > usage a bit nicer. 'vi' and 'emacs -nw' don't ask. > > > > The -t/--tempfile switch for nano (and pico) does exactly this: > > https://linux.die.net/man/1/nano > > Nice! I wonder if we could make EDITOR='nano --tempfile' the default? For git and > similar cases this would work nicely, but I'm not sure about all the other cases > where $EDITOR is used... Yeah, I'm not sure either. My guess is $EDITOR is mostly invoked to edit temporary files/buffers or files that already exist somewhere, but I have no data to back that up. I did just try running "nano -t" on its own to see what happens; if you enter some text and then try to quit, it complains that there's no file name and then, after a short delay, prompts you for one with the normal save dialog. It's not terrible, but the delay (to give you time to read the error message, I guess) is a little annoying. (For what it's worth: this can also apparently be accomplished by a nanorc setting ("set tempfile"), but presumably we wouldn't want to set this there). Ben Rosser _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx