[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pan-users] Re: Changing the Save Article behavior for text only message
From: |
Duncan |
Subject: |
[Pan-users] Re: Changing the Save Article behavior for text only messages. |
Date: |
Mon, 26 Jan 2009 06:08:05 +0000 (UTC) |
User-agent: |
Pan/0.133 (House of Butterflies) |
Eric Tompkins <address@hidden>
posted address@hidden, excerpted below, on Mon,
26 Jan 2009 01:50:52 +0000:
> Is there any way to get the current release of Pan to use the Subject as
> the filename when saving text only messages, instead of the Message ID.
> The old Pan did this, and it worked great for text only groups. When
> reading / saving several posts, trying to figure out the subject later
> involves reading each one. Not very fast.
AFAIK, no, there's no way to save with the subject as the name, not
directly from the GUI, as shipped anyway. There are however several
possible workarounds that may work for you... with the caveat that most
of them use the followup mechanism so you end up with quoted text, not a
direct copy of the message. You can still get the full message including
headers (quoted, however), if you toggle headers on in pan, then select
the full message (or whatever bit you want) before hitting followup to
open the message editor dialog.
What I do, as I've preferred to keep the text messages I want to keep in
one place, my mail client, anyway, is use it. If you've had occasion to
try forwarding or replying off-list via mail, you'll have noted that
(provided you have mail configured to do so) pan now simply hands off to
your mail client instead of handling mail itself. What's more, it
detects whether to mail or to reply via news (or both) by whether the
mailto or newsgroups line is filled in.
Thus, it's real easy to send your mail client a copy of the message
text. Simply hit any of the followup or mail buttons/hotkeys (I always
use the default "f"/followup hotkey, due to years of "muscle memory"),
delete what's in the newsgroups line if necessary, put any old thing (a
single letter is fine) in the mailto, and hit send. Provided you have
pan configured correctly for your mail client, it will open in that, and
you can do what you wish (forward it, save it as a mail message, etc)
from there. If you have a decent mail client it works quite well, with
the quote-caveat above.
There are two other alternatives also using the message editor dialog.
One, use the "draft" feature pan has now. That gives you a conventional
save-as dialog and you can name it whatever you want. Of course you
still have that quote-caveat since you're going thru the message editor
window.
Two, use the external editor feature. That actually gives you a
reasonable amount of flexibility, depending on what you setup as your
"external editor" (hint, it does NOT have to be a real "editor", it can
be a shell script or whatever). If you use a text editor, you can of
course use its save dialog or do whatever else you might do with an
ordinary text file. Instead of an editor, I actually invoke a script
here that I can use to attach UUE encoded binaries to the message with,
giving me a way to post binary attachments using pan! =:^) (I won't
bother detailing it in this reply but ask about it if you want.) You
could obviously do something similar with a message-saver script of some
sort, but you're still working with no headers unless selected, and the
quote-caveat above.
Talking about scripts, as you ask below about sources, I imagine you can
handle scripting as well (or make a C/C++ executable to do it if you
wish). It should be reasonably simple to create a script that takes a
the existing message-id filename as a parameter, does a grep for the
subject header, and renames the file accordingly. You could even get
fancy and associate the script with *.msg files in your file manager of
choice, so clicking on them "magically" renames them by subject! =:^) As
should be obvious from the script I mentioned in the above paragraph,
I've gotten creative with scripting myself, so have a decent idea what it
takes.
> If it cant be changed in a configuration file, could it be changed in
> the source and a new binary built from that?
Of course. With the sources you can do anything! =:^) It's even quite
likely Charles would take a patch if you submit one, tho he hasn't been
working much with pan lately so it might be awhile before it got merged.
If you do create such a patch, please attach it to a bug and post the
link to it here, as I'd love to have it too, and I'm already running the
Gentoo "live-svn" pan ebuild (which I helped create, BTW) and routinely
apply various patches. Unfortunately I'm not a C++ coder myself so I
can't create my own, =:^( or there'd be several more I'd have submitted
and be applying if they weren't yet merged.
The catch is that as pan uses the message-id for its cache files, I
expect it's using the same mechanism (or simply copying the cached file)
to save the message as text. That being the case, making available the
subject as filename option might be more complex than it would look
initially as that data might not be exposed to the message-as-text-saver
functionality as currently implemented.
> Would this be better asked in gmane.comp.gnome.apps.pan.devel ?
I'd personally post follow-up questions there if you decide to try it,
just to keep the non-dev users from having to read the real technical
stuff, but the question was fine here, too, as will be followups if you
prefer. We're not as strict about keeping developer threads off user as
some lists might be, and the devel list tends to be very low traffic.
Whichever list you wish will be just fine. If you decide to code up a
patch, however, posting the bug link here is useful, as there are likely
folks here willing/wanting to test that aren't subscribed there as they
can't code. (I can't either, but find dev discussions interesting enough
that I'm subscribed there anyway, but as I said, it's low traffic.)
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman