Re: Help-nano Digest, Vol 181, Issue 1

Calvin Smith <[email protected]> Mon, 5 Jun 2023 16:17:12 +0000 (UTC)
Newsgroups gmane.editors.nano.general
Message-ID <[email protected]>
There is a way to change nano's default save and backup directories, but I personally have never wanted to do this as one of the main advantages of nano is that you operate it from the command line. Also, if a file is genuinely important, I generally want the backup to besaved on something else other than my personal computer.

https://www.nano-editor.org/dist/v2.1/nano.html
On Monday, June 5, 2023 at 12:02:46 PM EDT, [email protected] <[email protected]> wrote: 
 
 Send Help-nano mailing list submissions to
    [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
    https://lists.gnu.org/mailman/listinfo/help-nano
or, via email, send a message with subject or body 'help' to
    [email protected]

You can reach the person managing the list at
    [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Help-nano digest..."


Today's Topics:

  1. Choosing directory to save file to, inside nano (Find Marbles)
  2. Re: Choosing directory to save file to, inside nano
      (Chris Allegretta)
  3. Re: Choosing directory to save file to, inside nano (Find Marbles)
  4. Re: Choosing directory to save file to, inside nano
      (Benno Schulenberg)
  5. Re: Choosing directory to save file to, inside nano (Find Marbles)


----------------------------------------------------------------------

Message: 1
Date: Mon, 5 Jun 2023 10:37:48 +0200
From: Find Marbles <[email protected]>
To: [email protected]
Subject: Choosing directory to save file to, inside nano
Message-ID:
    <CAK+dMbq9XbErzdG0v8RpCxRV9KxVK0Skq4M4JhvOX5Awm+gdxw@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hello,
is there a way to choose/change the directory to which I can save a file
to, inside nano, without having to manually type it out?
The reason I'm asking is because I have a script which pipes the text
output to nano -
After doing some editing of the text, I want to give the file a new name
and save it to a directory of my choosing.
Thank you in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnu.org/archive/html/help-nano/attachments/20230605/db19d7f5/attachment.htm>

------------------------------

Message: 2
Date: Mon, 05 Jun 2023 08:54:06 -0400
From: Chris Allegretta <[email protected]>
To: [email protected]
Subject: Re: Choosing directory to save file to, inside nano
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"

Hello. Don't think so, as nano's default concept of where to save files is based on either its working directory, or the path of the file. For stdin there is of course no path to start from, and working dir is just where it is invoked. I believe if you wanted to get closer, albeit outside nano, you could pipe the output to:

(cd somedirectory && nano -) 

Nano would then start from there for saving the output to a relative path. 


On June 5, 2023 4:37:48 AM EDT, Find Marbles <[email protected]> wrote:
>Hello,
>is there a way to choose/change the directory to which I can save a file
>to, inside nano, without having to manually type it out?
>The reason I'm asking is because I have a script which pipes the text
>output to nano -
>After doing some editing of the text, I want to give the file a new name
>and save it to a directory of my choosing.
>Thank you in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnu.org/archive/html/help-nano/attachments/20230605/b565e993/attachment.htm>

------------------------------

Message: 3
Date: Mon, 5 Jun 2023 16:54:12 +0200
From: Find Marbles <[email protected]>
To: [email protected], [email protected]
Subject: Re: Choosing directory to save file to, inside nano
Message-ID:
    <CAK+dMbqpvbwY1fw7iQTPE1V3Jh-Ng=Nt4_14bjrBO0H5XAHoAQ@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi thanks for answering,
I was kind of fearing that, but isn't there maybe a possibility of a key
binding combination that could call an external script doing all or part of
the necessary work? Making a shell script with fzf navigating through the
directories and saving the user choice into clipboard is easy achievable.
How to call such a script then in nano through a key binding? If at all
possible, of course.
Thank you anyway.

Am Mo., 5. Juni 2023 um 14:54 Uhr schrieb Chris Allegretta <[email protected]
>:

> Hello. Don't think so, as nano's default concept of where to save files is
> based on either its working directory, or the path of the file. For stdin
> there is of course no path to start from, and working dir is just where it
> is invoked. I believe if you wanted to get closer, albeit outside nano, you
> could pipe the output to:
>
> (cd somedirectory && nano -)
>
> Nano would then start from there for saving the output to a relative path.
>
>
> On June 5, 2023 4:37:48 AM EDT, Find Marbles <[email protected]>
> wrote:
>
>> Hello,
>> is there a way to choose/change the directory to which I can save a file
>> to, inside nano, without having to manually type it out?
>> The reason I'm asking is because I have a script which pipes the text
>> output to nano -
>> After doing some editing of the text, I want to give the file a new name
>> and save it to a directory of my choosing.
>> Thank you in advance
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnu.org/archive/html/help-nano/attachments/20230605/6085bce1/attachment.htm>

------------------------------

Message: 4
Date: Mon, 5 Jun 2023 17:05:22 +0200
From: Benno Schulenberg <[email protected]>
To: [email protected]
Subject: Re: Choosing directory to save file to, inside nano
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"; Format="flowed"


Op 05-06-2023 om 10:37 schreef Find Marbles:
> is there a way to choose/change the directory to which I can save a file to, 
> inside nano, without having to manually type it out?

The file browser (^O^T) is not what you mean, right?

But maybe --operatingdir (short: -o) is what you're looking for?

  yourscript | nano - -o /path/to/your/saving/folder

After ^S you then have to type just the name of the file, and
nano will save it in the folder passed with -o.

Benno
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.gnu.org/archive/html/help-nano/attachments/20230605/0a17743c/attachment.sig>

------------------------------

Message: 5
Date: Mon, 5 Jun 2023 17:18:59 +0200
From: Find Marbles <[email protected]>
To: [email protected], [email protected]
Subject: Re: Choosing directory to save file to, inside nano
Message-ID:
    <CAK+dMbrrZdPuy_mf6fKSVpAsSv0JtzV814Oox6+jbdi6SdG_jg@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

The file browser would indeed be ideal, but it seems I'm too stupid to
utilize it. Could you walk me through it? Text has been inputted into nano
and nano has been opened. ^O opens save menu and ^T the file browser, I
navigate to the directory I want and then what?


Am Mo., 5. Juni 2023 um 17:05 Uhr schrieb Benno Schulenberg <
[email protected]>:

>
> But maybe --operatingdir (short: -o) is what you're looking for?
>
>    yourscript | nano - -o /path/to/your/saving/folder
>
> After ^S you then have to type just the name of the file, and
> nano will save it in the folder passed with -o.
>
> Benno
>
Unfortunately no. The saving folder is not set. It changes from text to
text.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnu.org/archive/html/help-nano/attachments/20230605/dab57f6c/attachment.htm>

------------------------------

Subject: Digest Footer

_______________________________________________
Help-nano mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-nano


------------------------------

End of Help-nano Digest, Vol 181, Issue 1
*****************************************