Re: set fill 72 issue in Debian

Benno Schulenberg <[email protected]>
Newsgroups gmane.editors.nano.general
Message-ID <[email protected]>
Hello Niels,

On Tue, Jun 28, 2016, at 17:23, Niels ten Oever wrote:
> My .nanorc looks like this (I also added this to /etc/nanorc):

(Putting it in two places is probably not a good idea.  But that
as an aside.)

> [code]
> syntax "mutt"
> color green "^>.*"
> unset nowrap
> set fill 68
> set tabstospaces
> set tabsize 4
> set smarthome
> [/code]

From the arrangements of the settings, I get the impression that
you seem to think that set and unset commands can be specific
to a syntax.  They are not.  They are global.  If there are other
"set fill" or "set nowrap" commands later in your .nanorc file,
they willoverride the above ones.

>  Compiled options: --disable-wrapping-as-root [...]

I am assuming you are not running mutt as root?

> My current fix is calling nano in mutt with:
> 
> set editor="nano -w -$" 

But...  That is not a fix: -w means --nowrap, so effectively you
are telling nano *not* to wrap, no matter what it says in
/etc/nanorc or your .nanorc.

The best is not to try and set things in your .nanorc but set
all the options you want in your .muttrc:

set editor="nano --fill=68 --tabstospaces --tabsize=4 --smarthome"

Does that not work?

(You may need to remove all "set fill" settings from both
/etc/nanorc and .nanorc, because there was a small bug
where a command-line --fill would not override a nanorc
"set fill".  See https://savannah.gnu.org/bugs/?46492.
It is fixed in nano-2.5.0 and later.  Yes, this wrapping/
filling/justifying stuff is quite confusing.)

Benno

-- 
http://www.fastmail.com - Does exactly what it says on the tin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.