Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Re: Re: Re: Re: Re: Reply

by John M. Dlugosz (Monsignor)
on Jun 08, 2001 at 00:34 UTC ( #86738=monkdiscuss: print w/replies, xml ) Need Help??

When replying to a node, the default Title adds a "Re: " prefix. I think it would be simple to have the code detect that it already says /^Re:/ and have it not repeat that or use "Re[n]:" convention. So why isn't it?


Replies are listed 'Best First'.
Auto Re:^n Reply
by footpad (Abbot) on Jun 08, 2001 at 02:12 UTC

    Um, because it's just as easy to edit the title yourself, as many have done?

    Also, there's kudra's post naming convention to consider.

    Finally, some folks shorten the long titles in their replies or change the title completely (I've done both on occasion).

    It's not a bad idea, per se, but it might limit more personal or creative styles of node naming.

    Not everything needs to be automated, y'know. Some personal thought and effort is generally encouraged. :-)


      Supplying a different default title would not limit anyone's personal style of node naming. The default simply appears in an input field in the reply form, and a monk would still be free to edit it, whatever the default happened to be.

      Personally, I like the Re: Re: Re:... titles, because it makes it obvious when looking at Newest Nodes how far down in a thread a given node is.

      Not everything needs to be automated, y'know. Some personal thought and effort is generally encouraged.

      Yeah, I agree. I also like to see that the "preview" and "submit" buttons disappear. Not everything needs to be automated. Some personal thought and telnetting to port 80 is encouraged.

      -- Abigail

Re^7: Reply
by tadman (Prior) on Jun 08, 2001 at 04:38 UTC
    use Perl::Golf; sub re{ $_=pop;s/Re:\s*/\x01/g;s/Re(\d+):\s*/"\x01"x$1/eg;s/(\x01+)/"Re". length($1).": "/e;$_; }
    As in: print re("Re: Re: Re: Re: Re: Re: Reply\n"); Returns: Re6: Reply

      Untested code, for shame... the following is for the simple case only: it breaks on "Re: Re^4: foo". But unfortunately, so does yours ;-)

      sub re {$a=()=pop=~/Re:\s*/g;"Re^$a: $'"}

      Unfortunately, this is short because it completely catipulates on a couple of issues, specifically "Re: Re^3: Foo" and "Re: bar". I've been trying to get the complex case to behave, and it hasn't been.

      Perhaps we should move this over to a more normal place for it?

      If God had meant us to fly, he would *never* have give us the railroads.
          --Michael Flanders

        No it doesn't(break Imean). He uses another format. He could easily include the ^ in his format. But you can't use his format either.
Re: Re: Re: Re: Re: Re: Re: Reply
by srawls (Friar) on Jun 09, 2001 at 01:34 UTC
    Did I hear golf?
    sub a{ $_=pop; $i+=$++1while s/Re:\^?(\d*) *//; "Re:^$i $_" }
    That weighs in at 50 chars, and it handles cases such as: "Re: Re:^3 title" by adding the 2 "Re:"s and the 3, since three "Re:"s have been taken out before, which was denoted by the ^3.

    The 15 year old, freshman programmer,
    Stephen Rawls

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: monkdiscuss [id://86738]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2021-04-18 09:50 GMT
Find Nodes?
    Voting Booth?

    No recent polls found