Hey that's neat! Here's an example for anyone that's watching. I'd never seen occur before and had to try it out.

Typing M-x occur "current_balance" gets me a new pane of info. If I move the cursor to any and hit enter, the source pane will automatically seek there.

5 lines matching "current_balance" in buffer RBCUWatcher2. 23:my $current_balance = eval { 39:exit unless length $current_balance; 41:write_file( BALANCE_FILE, $current_balance ); 43:my $difference = $current_balance - $old_balance; 45: my $message = "\$$current_balance "

~/bin/BankBalanceWatcher

#!... package main; use strict; use warnings; use WWW::Mechanize (); use File::Slurp qw( read_file write_file ); use Mail::Sendmail qw( sendmail ); use constant BALANCE_LOGIN => ...; use constant USERID => ...; use constant USERPIN => ...; use constant BALANCE_FILE => ...; use constant BALANCE_URL => ...; use constant PHONENUMBER => ...; use constant NOTIFY_URL => ...; my $old_balance = eval { return read_file(BALANCE_FILE) }; my $current_balance = eval { my $agent = WWW::Mechanize->new( autocheck => 1 ); $agent->env_proxy(); $agent->get(BALANCE_LOGIN); my $form = $agent->current_form; $form->value( SignOnID => USERID ); $form->value( Password => USERPIN ); $agent->submit(); $agent->get(BALANCE_URL); local ($_) = $agent->content =~ /\$([\d.,]+)/mx; tr/,//d; return $_; }; exit unless length $current_balance; write_file( BALANCE_FILE, $current_balance ); my $difference = $current_balance - $old_balance; if ( 0 != $difference ) { my $message = "\$$current_balance " . ( $difference > 0 ? "+$difference" : $difference ); print "$message\n"; my $agent = WWW::Mechanize->new; $agent->get(NOTIFY_URL); $agent->form_name('composeForm'); my $form = $agent->current_form; $form->value( phoneNumber => PHONENUMBER ); $form->value( message => $message ); $agent->submit(); }

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊


In reply to Re^2: Emacs shows xrefs in code but needs an interface that's good for humans by diotalevi
in thread Emacs shows xrefs in code but needs an interface that's good for humans by diotalevi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.