Hi David, > > When you say "the file was not new-line terminated", which file? If > > it was your .mh_profile ... I guess that's the fault of m_getfld(). > > Good catch. Fixed.
My quick skim of http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=a0514c9a6f41ea1b0d60553ca578312a9f3bd9ab&context=12 with the whole source at http://git.savannah.gnu.org/cgit/nmh.git/tree/sbr/m_getfld.c?id=a0514c9a6f41ea1b0d60553ca578312a9f3bd9ab#n620 suggests that buf will have a \n at the end of it for Unix-text-file lines but not for the last line of an ITS text file. Whether that may cause problems for any of the users of buf, I've no idea. Some fix was clearly needed to avoid storing EOF in buf but kre's right, we shouldn't be supporting Emacs's brain-damaged insistence of putting ITS text files on Unix. Too many things break with them, despite GNU's efforts, and at best we should just complain about an unterminated line and stop. POSIX says a text file is zero or more lines, each line terminated by a newline. Emacs and Stallman lost. http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 Any Emacs user that doesn't use `(setq require-final-newline t)' in their .emacs or similar and has to suffer because of it has made their bed... :-) The number of wasted hours I've seen over the years due to Emacs's stupidity in this respect and how each user has to discover it, sometimes more than once. Cheers, Ralph. _______________________________________________ Nmh-workers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/nmh-workers
