[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] w3m-lnum add highlight
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Wed, 07 Jul 2010 11:00:50 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 11257
- References: <87630wfds0.fsf@xxxxxxxxx> <b4m1vbij0vi.fsf@xxxxxxx> <87k4p9o90q.fsf@xxxxxxxxx> <b4mpqz1s2fg.fsf@xxxxxxx> <87k4p88gbq.fsf@xxxxxxxxx>
In [emacs-w3m : No.11256] Andrey wrote:
(B> Katsumi Yamaoka <yamaoka@xxxxxxx> writes:
(B>> Agreed. I also agree to make the `C-c C-l' key be bound to
(B>> `w3m-linknum-follow' by default. I.e., abolish `w3m-go-to-linknum'
(B>> and make indexing of forms the default.
(B> I find `w3m-go-to-linknum' handy when I want to navigate within
(B> uncomfortable to reach with search areas or just peek url
(B> behind link. I think it must stay (and maybe at a single
(B> We are spoiled with so many ways of navigating within Emacs. I have
(B> `w3m-linknum-follow' bound to "f", it's free within both lynx and info
(B> keymaps and guess what, it's same in Conkeror. Which makes me think of
(B> "F" for `w3m-go-to-linknum'.
(BHm, at least I have no reason to object to the use of `f' and `F'.
(BHowever, I hesitate to use such precious single keystrokes. Has
(Banyone reserved those keys for the future use? Alternatively,
(Bhow about `C-c l' and `C-c C-l'? In short in Japanese:
(B`f' $B%-!<$r(B `w3m-linknum-follow' $B$K!"(B`F' $B%-!<$r(B `w3m-go-to-linknum'
$BBe$o$j$K(B `C-c l' $B$H(B `C-c C-l' $B$G$O(B?
(B>>  I've slightly changed your code. Let me know if there's any
(B> No problems detected. Meanwhile, I've made some refinement/mess and
(B> added things. Having O(1) access over links, form fields and buttons is
(B> great, just one thing left (?), images. So added support for enumerating
(B> images as well and an obvious example action over them - toggling.
(BI just tried the new w3m-lnum.el. Very good!! Maybe the usage
(Bcomment at the beginning of w3m-lnum.el is needless. Instead,
(Bwe will have to mention the features in the Info document.
(B>> Furthermore, I think it's convenient if `w3m-read-int-interactive'
(B>> turns off the `w3m-link-numbering-mode' mode by the `C-c C-l' key
(B>> input. IOW, making the `C-c C-l' key the toggle switch. WDYT?
(B> I think `w3m-read-int-interactive' is ok as is (didn't prepend w3m- in
(B> the first try as it seems nicely decoupled general way to input an
(B> integer). Unless very slow.
(B> I'd like to promote `w3m-with-linknum' which takes care of switching
(B> between different types of enumeration and cleaning after. To be fair,
(B> I see no point in interactively using `w3m-link-numbering-mode'
(B> (actually now things seem to work ok without it as well). Why would you
(B> need the clutter of numbered elements for more than 5 seconds without
(B> useful immediate action (maybe something could be thought). So here
(B> comes `w3m-linknum-get-action' using `w3m-with-linknum' which activates
(B> given type of numbering, reads interactively (showing matches) some
(B> element number, deactivates numbering and keeping position collects a
(B> list of properties of selection (url/action, position, image url if
(B> such) so do what you wish with them. The only user command which does
(B> not use it is `w3m-go-to-linknum' because I wanted to keep good ol'
(B> non-interactive element number selection on prefix argument (for just in
(B> Here's the new set of changes against current cvs w3m-lnum.el.
(BThanks. Er, shouldn't `w3m-linknum-read-url' be as follows?
(B(defun w3m-linknum-read-url (&optional prompt)
(B (let ((link (w3m-linknum-get-action (or prompt "Link number: ") 1)))
(BAnd more, could you provide the ChangeLog entries by yourself?
(BHere's unfinished one. ;-)
(B2010-07-07 Andrey Kotlarski <m00naticus@xxxxxxxxx>
(B * w3m-lnum.el: Update usage comment.
(B (w3m-linknum-remove-overlays): Quit immediately when it finds and
(B deletes temporary match overlay.
(B (w3m-link-numbering-mode): Pass prefix arg, which makes this function
(B index only images if it is 2, to w3m-link-numbering.
(B (w3m-link-numbering, w3m-with-linknum): Vary function according to arg;
(B index only images if it is 2.
(B (w3m-highlight-numbered-anchor): xxx.
(B (w3m-get-anchor-info): New function.
(B (w3m-go-to-linknum): xxx.
(B (w3m-linknum-get-action): xxx.
(B (w3m-linknum-follow): xxx.
(B (w3m-linknum-read-url): xxx.
(B (w3m-linknum-toggle-image): New function.
(BBTW, currently the w3m-lnum features don't work with XEmacs, so
(BI'm going to fix some time. In addition, the `minibuffer-prompt'
(Bface is not available in not only XEmacs but also Emacs 21. Maybe
(Bwe need to provide something like `w3m-linknum-minibuffer-prompt',
(Bthat is a copy of `minibuffer-prompt' if it is available.