[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] w3m-lnum add highlight
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Tue, 06 Jul 2010 12:40:35 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 11255
- References: <87630wfds0.fsf@xxxxxxxxx> <b4m1vbij0vi.fsf@xxxxxxx> <87k4p9o90q.fsf@xxxxxxxxx>
In [emacs-w3m : No.11253] Andrey Kotlarski wrote:
> Hello, Katsumi-san,
> Thanks for feedback and sorry for slight delay.
> I decided to go a step further in emulating Conkeror's behavior.
> There's a function `w3m-linknum-follow' which follows urls, activates
> form fields or pushes buttons depending on what's selected (not sure
> whether done correctly but works where tested).
Excellent! It's easy to use, so you who love the w3m-lnum feature
should try the new behaviors soon. I've already installed your
changes to CVS. `C-c C-l' is what those who have never used
it do first.
> It might be heretic but I changed behavior (along highlighting matches)
> of `w3m-go-to-linknum' allowing it to go to form fields and buttons as
> well, which seems more natural to me as these elements are normally more
> difficult to "isearch".
Agreed. I also agree to make the `C-c C-l' key be bound to
`w3m-linknum-follow' by default. I.e., abolish `w3m-go-to-linknum'
and make indexing of forms the default. Furthermore, I think it's
convenient if `w3m-read-int-interactive' turns off the
`w3m-link-numbering-mode' mode by the `C-c C-l' key input. IOW,
making the `C-c C-l' key the toggle switch. WDYT?
> Added a macro `w3m-with-linknum' which can ease this type of functions
> (and bring old behavior of `w3m-go-to-linknum' with a single digit change).
> Made `w3m-link-numbering-mode' more flexible allowing it 2 types of
> enumeration - only url links (old behaviour and default) and urls along
> with form fields and buttons for conveniences pointed above.
> Also added `w3m-linknum-read-url' for comfortable grabbing of urls and
> allowing for such sort of actions:
> (let ((url (w3m-linknum-read-url "Curl on link: ")))
> (if url (async-shell-command (concat "curl -O " url))))
> A glitch that haven't yet overcome is changing faces of buttons on match.
> Here's the diff against same current cvs w3m-lnum.el and hopefully this
> time will work closer to advertised.
 I've slightly changed your code. Let me know if there's any