bugGNU nano - Bugs: bug #56344, when data was read from standard...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #56344: when data was read from standard input, it always uses the default syntax

Submitter:  Benno Schulenberg <bens>
Submitted:  Sat 18 May 2019 10:52:18 AM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Jump to the original submission

Tue 21 May 2019 07:15:27 AM UTC, comment #6: 

Yeah.  But -Werror might interfere with the configure tests.  In current git, it changes the result of just one test:

-#define HAVE_FREXP_IN_LIBC 1
+/* #undef HAVE_FREXP_IN_LIBC */

It doesn't seem important, but who knows what it might influence in future.

So, I've aliased 'mmm' to "make -s" and will use that instead.

Benno Schulenberg <bens>
Group administrator
Mon 20 May 2019 10:08:35 AM UTC, comment #5: 

-Werror turns all warnings into errors, and tcc supports it too.

Brand Huntsman <brand>
Mon 20 May 2019 10:05:19 AM UTC, comment #4: 

(Ow, tcc does warn, but the message drowns in the output.  Will have to see whether I can make it stop on warnings.)

Benno Schulenberg <bens>
Group administrator
Mon 20 May 2019 09:57:30 AM UTC, comment #3: 

Oops.  I'm using tcc nowadays, which is much faster.  But apparently it doesn't warn for things like this.  :|  Thanks.  Added in git, commit 22fc16b2.

Benno Schulenberg <bens>
Group administrator
Mon 20 May 2019 09:24:15 AM UTC, comment #2: 

make_new_buffer() wasn't added to proto.h in that commit.


nano.c: In function 'scoop_stdin':
nano.c:1100:2: warning: implicit declaration of function 'make_new_buffer'; did you mean 'flip_newbuffer'? [-Wimplicit-function-declaration]
  make_new_buffer();
  ^~~~~~~~~~~~~~~

Brand Huntsman <brand>
Sun 19 May 2019 03:54:31 PM UTC, comment #1: 

Fixed in git, commit 53352d0b.

Benno Schulenberg <bens>
Group administrator
Sat 18 May 2019 10:52:18 AM UTC, original submission:  

To reproduce, run:

  cat roll-a-release.sh | src/nano +1 -

Note that the script is colored with the default syntax, even though the first line clearly identifies it as a shell script.

Now type: ^S xxx ^M.  See how the script now does get colored with the shell syntax.

Expected behavior: even though it will be seldom that scripts or programs will be fed into nano over standard input, nano can at least have a look at the header line to see if some other syntax than the default would be more appropriate.

Benno Schulenberg <bens>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by brand (Posted a comment)
  • -email is unavailable- added by bens (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-06-19 bens Open/ClosedOpen Closed
    2019-05-19 bens Summarywhen data is read from standard input, always the default syntax is applied when data was read from standard input, it always uses the default syntax
    2019-05-19 bens StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code