Skip Menu |

This queue is for tickets about the Org-Parser CPAN distribution.

Report information
The Basics
Id: 82334
Status: rejected
Priority: 0/
Queue: Org-Parser

People
Owner: Nobody in particular
Requestors: bernt.budde [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Org::Element::Link bug in Org-Parser-0.27
Date: Sun, 30 Dec 2012 08:24:58 +0200
To: bug-Org-Parser [...] rt.cpan.org
From: Bernt Budde <bernt.budde [...] gmail.com>
Hi, Thanks for a cool module! There is a small problem in the as_string() code in Org/Element/Link.pm You haven't seen this because as_string() works when called for a whole tree of Org::Element::Headline objects, since O::E::Headline has the '_str' short cut. So as_string() won't be called for any Link.pm in title or body. Present code: sub as_string { my ($self) = @_; return $self->_str if defined $self->_str; join("", "[", "[", $self->link, "]", (defined($self->description) && length($self->description) ? ("[", $self->description, "]") : ()), "]"); } # The problem is that description is an Org::Element::Text. # Change to: ... (defined($self->description) && length($self->description) ? ("[", $self->description->as_string, "]") : ()), ... /Bernt Budde PS Sorry, almost morning here. Too tired to write a test for you. :-( :-) DS PPS The module/version is Org-Parser-0.27 $ uname -a Linux bughem 3.5.0-21-generic #32-Ubuntu SMP Tue Dec 11 18:51:59 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux $ perl -v This is perl 5, version 16, subversion 2 (v5.16.2) built for x86_64-linux Copyright 1987-2012, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. DS
Hi Bernt, Thanks for the report. Fixed and released 0.28. Regards, Steven On Sun Dec 30 01:25:10 2012, bernt.budde@gmail.com wrote: Show quoted text
> Hi, > > Thanks for a cool module! > > There is a small problem in the as_string() code in > Org/Element/Link.pm > > You haven't seen this because as_string() works when called for a > whole tree of Org::Element::Headline objects, since O::E::Headline has > the '_str' short cut. So as_string() won't be called for any Link.pm > in title or body. > > Present code: > > sub as_string { > my ($self) = @_; > return $self->_str if defined $self->_str; > join("", > "[", > "[", $self->link, "]", > (defined($self->description) && length($self->description) ? > ("[", $self->description, "]") : ()), > "]"); > } > > # The problem is that description is an Org::Element::Text. > # Change to: > ... > (defined($self->description) && length($self->description) ? > ("[", $self->description->as_string, "]") : ()), > ... > > > /Bernt Budde > > PS > Sorry, almost morning here. Too tired to write a test for you. :-( :-) > DS > > PPS > The module/version is Org-Parser-0.27 > > $ uname -a > Linux bughem 3.5.0-21-generic #32-Ubuntu SMP Tue Dec 11 18:51:59 UTC > 2012 x86_64 x86_64 x86_64 GNU/Linux > > $ perl -v > > This is perl 5, version 16, subversion 2 (v5.16.2) built for x86_64- > linux > > Copyright 1987-2012, Larry Wall > > Perl may be copied only under the terms of either the Artistic License > or the > GNU General Public License, which may be found in the Perl 5 source > kit. > > Complete documentation for Perl, including FAQ lists, should be found > on > this system using "man perl" or "perldoc perl". If you have access to > the > Internet, point your browser at http://www.perl.org/, the Perl Home > Page. > DS
Subject: Re: [rt.cpan.org #82334] Org::Element::Link bug in Org-Parser-0.27
Date: Sat, 9 Feb 2013 06:22:01 +0200
To: bug-Org-Parser [...] rt.cpan.org
From: Bernt Budde <bernt.budde [...] gmail.com>
Hi again Steven, this isn't an Org::Parser problem, but you still might want to add a fix -- it is Org Mode's error (it probably is legal behaviour; I won't check the RFC). Org Mode store '=' as %3D in links. Doesn't work with all web sites. At least news.ycombinator.com (and probably other web sites) have problems when the '=' is translated. The problem is with links like http://foo.com/bar?a=b (I'd write a patch for Org/Document.pm if I thought you'd apply it. :-) ) Again thanks! Bernt On Mon, Jan 7, 2013 at 5:37 PM, steven haryanto via RT <bug-Org-Parser@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=82334 > > > Hi Bernt, > > Thanks for the report. Fixed and released 0.28. > > Regards, > Steven > > On Sun Dec 30 01:25:10 2012, bernt.budde@gmail.com wrote:
>> Hi, >> >> Thanks for a cool module! >> >> There is a small problem in the as_string() code in >> Org/Element/Link.pm >> >> You haven't seen this because as_string() works when called for a >> whole tree of Org::Element::Headline objects, since O::E::Headline has >> the '_str' short cut. So as_string() won't be called for any Link.pm >> in title or body. >> >> Present code: >> >> sub as_string { >> my ($self) = @_; >> return $self->_str if defined $self->_str; >> join("", >> "[", >> "[", $self->link, "]", >> (defined($self->description) && length($self->description) ? >> ("[", $self->description, "]") : ()), >> "]"); >> } >> >> # The problem is that description is an Org::Element::Text. >> # Change to: >> ... >> (defined($self->description) && length($self->description) ? >> ("[", $self->description->as_string, "]") : ()), >> ... >> >> >> /Bernt Budde >> >> PS >> Sorry, almost morning here. Too tired to write a test for you. :-( :-) >> DS >> >> PPS >> The module/version is Org-Parser-0.27 >> >> $ uname -a >> Linux bughem 3.5.0-21-generic #32-Ubuntu SMP Tue Dec 11 18:51:59 UTC >> 2012 x86_64 x86_64 x86_64 GNU/Linux >> >> $ perl -v >> >> This is perl 5, version 16, subversion 2 (v5.16.2) built for x86_64- >> linux >> >> Copyright 1987-2012, Larry Wall >> >> Perl may be copied only under the terms of either the Artistic License >> or the >> GNU General Public License, which may be found in the Perl 5 source >> kit. >> >> Complete documentation for Perl, including FAQ lists, should be found >> on >> this system using "man perl" or "perldoc perl". If you have access to >> the >> Internet, point your browser at http://www.perl.org/, the Perl Home >> Page. >> DS
> > >
Hello again Bernt, Could you provide a test case and/or patch? Regards, Steven On Fri Feb 08 23:22:13 2013, bernt.budde@gmail.com wrote: Show quoted text
> Hi again Steven, > > this isn't an Org::Parser problem, but you still might want to add a > fix -- it is Org Mode's error (it probably is legal behaviour; I won't > check the RFC). > > Org Mode store '=' as %3D in links. Doesn't work with all web sites. > At least news.ycombinator.com (and probably other web sites) have > problems when the '=' is translated. > > The problem is with links like http://foo.com/bar?a=b > > (I'd write a patch for Org/Document.pm if I thought you'd apply it.
:-) ) Show quoted text
> > Again thanks! > Bernt
Sorry, closing this for now since there is no response from reporter.