help-nano
[Top][All Lists]
Advanced

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

Re: Alt+Insert does not work, and nohelp gives too little help


From: Benno Schulenberg
Subject: Re: Alt+Insert does not work, and nohelp gives too little help
Date: Sat, 15 Aug 2020 12:38:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hi Sébastien,

Op 14-08-2020 om 11:50 schreef Seb:
> I had also missed ^T then |<cmd> from an earlier release, for which I have a
> remark: when doing this while no text is selected, I would expect the result 
> to
> be inserted in the file, not to replace the whole file (which seems crazy to 
> me).

Hmmm...  When text is selected, you think it is okay to replace the selected
text with what comes out of the command?  But when *no* text is selected, the
result of the command should be inserted?  The latter seems very strange to me:
you process the entire buffer through a command and then insert the processed
result into the unprocessed original?

> I would use it for instance to check the results of numerical computations 
> from
> within a TeX file, by copy-pasting the TeX code and calling a homegrown 
> script.

If I understand correctly: you have some TeX file with a numerical computation
and you want to compute its result with a script and then insert this result
after the computation?  What I would do: duplicate the computation in the
original file (select it, then M-6 and ^U), then select the duplicate and run
it through the script, so that it gets replaced with the result.

The purpose of the |command construct is to filter / process / format /
manipulate / knead the selected text (or entire buffer) into a different
shape, replacing the original.

>>> Alt+Insert shows a white-on-red error message "Unknown sequence".
>> 
>> What does M-V M-Ins put in an empty buffer?  (You would probably
>> need to type: Esc V M-Ins.)
> 
> This:
>     ^[[2þ

When I type ^V M-Ins at a shell prompt, that is indeed what I get.
But when typing M-V M-Ins in nano, a space is shown instead of "þ".
(But looking at a hex dump of the result the "space" is actually
0xFE, which would be "þ".  Somehow nano is hiding it.  Apparently
my configuration in still different from yours.)

Anyhow, nano is correct in reporting that the escape sequence (in
your case: ^[[2þ) is invalid, because after an ESC only characters
in printable ASCII range may follow:

  https://en.wikipedia.org/wiki/ANSI_escape_code#Escape_sequences

If you put the following in your nanorc:

  bind M-' anchor main

does typing <Esc> ' then place an anchor?

I'm guessing yes, as it works for me on urxvt.  But just being
able to place an anchor is useless when Alt+PgUp and Alt+PgDn
don't work.  So, I guess nano will have to recognize these
deviant escape sequences from urxvt.  :|  Please report the
"[ Unknown sequence ]" message for Alt+Ins and Alt+PgUp/PgDn
as a bug on Savannah.

> URxvt.meta8: True

This was enough to get ^V M-Ins to show ^[[2þ at a shell prompt.
I don't have the time to figure out what else I need to get
ISO8859 characters to show up inside nano.

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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