emacs-w3m (Part 2) (662レス)
前次1-
抽出解除 レス栞

リロード規制です。10分ほどで解除するので、他のブラウザへ避難してください。
538
(1): 535 2008/08/16(土) 05:10:03 AAS
(require 'anything)
(require 'anything-migemo nil t)
(defun anything-c-w3m-get-anchors ()
(with-current-buffer anything-current-buffer (save-excursion
(goto-char (point-min))
(loop while (w3m-goto-next-anchor)
when (next-single-property-change (point) 'w3m-anchor-sequence)
collect (cons
(buffer-substring (point) (next-single-property-change (point) 'w3m-anchor-sequence))
(point))))))
(defvar anything-c-source-w3m-anchor
`((name . "a")
(candidates . anything-c-w3m-get-anchors)
(match . ,(list (if (fboundp 'anything-string-match-with-migemo)
'anything-string-match-with-migemo
(lambda (c) (string-match anything-pattern c)))))
(action . (("Goto anchor" . (lambda (p) (goto-char p) (w3m-view-this-url)))
("Goto char" . (lambda (p) (goto-char p)))))))
(defun anything-w3m-anchor ()
(interactive)
(let ((anything-sources (list (if (and (fboundp 'anything-string-match-with-migemo))
(cons (cons 'match '(anything-string-match-with-migemo))
(remove-if (lambda (e) (eq 'match (car e))) anything-c-source-w3m-anchor))
anything-c-source-w3m-anchor)))) (anything)))
;; (define-key w3m-mode-map "f" 'anything-w3m-anchor)
やっぱ面倒だからこれで
539: 534 2008/08/17(日) 00:45:49 AAS
>>537-538
早速、設定しました!
元々、インストールしていたのが古いバージョンの anything.el だったので、
最初、うまくいかなくてアタフタしましたが、
最新の anything.el をインストールしたところ、ばっちり動作しました。

このコードを参考にすると、自分でも、anything.el の使い方がちょっとわかるような気が…

どうもありがとうございました。
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ

ぬこの手 ぬこTOP 0.031s