unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7736: 24.0.50; perl-mode infinite loop
@ 2010-12-25 13:41 jidanni
  2011-01-23  1:18 ` Chong Yidong
  2011-01-24 20:13 ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: jidanni @ 2010-12-25 13:41 UTC (permalink / raw)
  To: 7736; +Cc: rfrancoise

[-- Attachment #1: Type: text/plain, Size: 48 bytes --]

Man, you gotta see this. On this attached file,

[-- Attachment #2: test file --]
[-- Type: text/x-perl, Size: 978 bytes --]

#!/usr/bin/perl
# Print all tw.myblog.yahoo.com subscriptions URLs from a given URL
# Copyright       : http://www.fsf.org/copyleft/gpl.html
# Author          : Dan Jacobson -- http://jidanni.org/
# Created On      : Sun Dec 19 21:41:47 2010
# Last Modified On: Sat Dec 25 10:31:18 2010
# Update Count    : 58
use warnings FATAL => 'all';
use strict;
use utf8;
use open qw/:std :encoding(utf8)/;
use WWW::Mechanize;
my $mech = WWW::Mechanize->new( autocheck => 1 );
$mech->get(@ARGV);
my %blogs;
do { get_all_blogs_on_this_page() }
  while ( $mech->find_link( text_regex => qr'下一頁' ) # $ maybe added by my wwwoffle
    && $mech->follow_link( text_regex => qr'下一頁' ) );
print "$_\n" for sort keys %blogs;

sub get_all_blogs_on_this_page {
    for ( $mech->find_all_links( tag => "a", text => '詳全文' ) ) {
	$_->url =~ shttp://tw.myblog.yahoo.com/jw!3tU21_aCAh6NNGlBu.pqLpgW/subscription?fid=3&page=6
        $blogs{ $_->url }++;
    }
}

[-- Attachment #3: Type: text/plain, Size: 747 bytes --]

save in /tmp, and run emacs -Q -nw /tmp/r.pl

Now move the cursor down and attempt to change shttp to s[http .
As you insert the [ an infinite loop begins.
You probably can break out with a C-g, but you might need a
$ killall -HUP emacs

In GNU Emacs 24.0.50.1 (i486-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2010-12-14 on elegiac, modified by Debian
 (emacs-snapshot package, version 1:20101212-2)

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: C
  value of $LC_CTYPE: zh_TW.UTF-8
  value of $LC_MESSAGES: C
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: C
  value of $LANG: zh_TW.UTF-8
  value of $XMODIFIERS: @im=SCIM
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-24 20:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-25 13:41 bug#7736: 24.0.50; perl-mode infinite loop jidanni
2011-01-23  1:18 ` Chong Yidong
2011-01-24  0:53   ` Stefan Monnier
2011-01-24 20:13 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).