lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev correct 'subject' in print-to-email (patch)


From: Leonid Pauzner
Subject: lynx-dev correct 'subject' in print-to-email (patch)
Date: Tue, 25 Aug 1998 20:46:20 +0400 (MSD)

There is an old problem: when I print to email I got a letter
with filename as a subject which is not too readable for human,
we print a text, not a binary file.
Instead, we need Title info which is friendly
(bookmark links use the same info).

My personal motivation was follows: I read lynx-dev from WWW at flora.org
and print few interesting postings to my mailbox to see them offline later,
so I got bunch of letters with subject like "msg234.html".
If someone feel any reason to leave filename at this field
I may provide a switch from lynx.cfg but think it is unneccesary complication.

Leonid.



diff -u old/lyprint.c ./lyprint.c
--- old/lyprint.c       Sat Aug 15 14:57:56 1998
+++ ./lyprint.c Tue Aug 25 20:21:04 1998
@@ -536,6 +536,7 @@
                break;

        case MAIL:
+
            if (LYPreparsedSource && first_mail_preparsed &&
                HTisDocumentSource()) {
                _statusline(CONFIRM_MAIL_SOURCE_PREPARSED);
@@ -688,7 +689,7 @@
                     *  For PMDF, put the subject in the
                     *  header file and close it. - FM
                     */
-                   fprintf(hfd, "Subject: %.70s\n\n", sug_filename);
+                   fprintf(hfd, "Subject: %.70s\n\n", newdoc->title);
                    LYCloseTempFP(hfd);
                    /*
                     *  Now set up the command. - FM
@@ -710,7 +711,7 @@
                            "%s %s/subject=\"%.70s\" %s %s",
                            system_mail,
                            system_mail_flags,
-                           sug_filename,
+                           newdoc->title,
                            tempfile,
                            user_response);
                }
@@ -818,9 +819,11 @@

                /*
                 *  Add the To, Subject, and X-URL headers. - FM
+                *  Use newdoc->title as a subject instead of sug_filename:
+                *  MORE readable and 8-bit letters shouldn't be a problem.
                 */
                fprintf(outfile_fp, "To: %s\nSubject: %s\n",
-                                    user_response, sug_filename);
+                                    user_response, newdoc->title);
                fprintf(outfile_fp, "X-URL: %s\n\n", newdoc->address);
                if (LYPrependBaseToSource && HTisDocumentSource()) {
                    /*



reply via email to

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