From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bruno Tavernier Newsgroups: gmane.emacs.help Subject: Ido & emacs-w3m bookmarks Date: Mon, 21 Jun 2010 11:41:15 +0900 Message-ID: <87hbkxumyc.wl%tavernier.bruno@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1277159525 1211 80.91.229.12 (21 Jun 2010 22:32:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 Jun 2010 22:32:05 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 22 00:32:03 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OQpX6-0004Mv-L0 for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Jun 2010 00:32:00 +0200 Original-Received: from localhost ([127.0.0.1]:38611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQpX6-0000bH-0o for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Jun 2010 18:32:00 -0400 Original-Received: from [140.186.70.92] (port=41908 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQWvF-0004DK-TS for help-gnu-emacs@gnu.org; Sun, 20 Jun 2010 22:39:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQWvE-0004dO-RF for help-gnu-emacs@gnu.org; Sun, 20 Jun 2010 22:39:41 -0400 Original-Received: from mail-px0-f169.google.com ([209.85.212.169]:58917) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQWvE-0004d7-Mo for help-gnu-emacs@gnu.org; Sun, 20 Jun 2010 22:39:40 -0400 Original-Received: by pxi14 with SMTP id 14so3466138pxi.0 for ; Sun, 20 Jun 2010 19:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:message-id:from:to :subject:user-agent:mime-version:content-type; bh=rlssXyE7aDBggepDZIaXs+3GlEWyDcLzBd1qbE26L7Q=; b=hyi8+9X04WAYlX9kE8hxq7UrNAsJ2x4x+Qvml9o901M3rm/3qWvaszrOPWsNSS132p dJufdxU5qE5ssCA3L+AZ4KcWBdTHAMyGtDHgN1axKVPZ6+6I3ejUwZdW7WVb2BMwMf/9 EDpy3A4lwXID/NtFUV4H8W0p5/CROQ/TChWFc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:message-id:from:to:subject:user-agent:mime-version :content-type; b=aPt/zvXPpjRgB3zTYqbbrZxrgcCo5A97xRi/wttr0r6ZEfS22TBLEHBnlr8fNUbb06 c4Zev2y+CI81Q4jZ9N6MQgsSM2l+ZSF5+bNu10OaEAvCvisEBaWu1HcfegJ89CkA81Oz WSBma4V1qhzss10JcWwdf+O7gvMDJr3vJo2U8= Original-Received: by 10.142.119.22 with SMTP id r22mr2922023wfc.191.1277087978619; Sun, 20 Jun 2010 19:39:38 -0700 (PDT) Original-Received: from fc3-b.gmail.com ([150.82.207.104]) by mx.google.com with ESMTPS id f11sm9498312wai.11.2010.06.20.19.39.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 20 Jun 2010 19:39:36 -0700 (PDT) User-Agent: Wanderlust/2.15.9 (Almost Unreal) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Mon, 21 Jun 2010 18:31:17 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:73945 Archived-At: I use ido almost all the time and emacs-w3m a lot. In w3m, I find the opening of bookmark a bit unconvenient, so I wrote a small piece of code to use ido for that. It parses the w3m-bookmark-file for links and their related name. Hope that it could be useful to somes. (defun my-w3m-bookmark-view () "Ido style opening of w3m bookmarks." (interactive) (save-excursion (set-buffer (find-file-noselect w3m-bookmark-file)) (let* ((flag "") (url "") (url-nickname "") (url-list '())) (while flag (search-forward-regexp "href=\"\\(\.*\\)\"" nil t) (setq url (match-string 1)) (search-forward-regexp ">\\(\.*\\)" nil t) (setq url-nickname (match-string 1)) (if (string-match url flag) (setq flag nil) (setq flag url) (add-to-list 'url-list (cons url-nickname url)))) (kill-this-buffer) (w3m-goto-url (cdr (assoc (ido-completing-read "Bookmark: " url-list) url-list)))))) Bruno PS: For an unknown reason, each bookmark is followed by the character ^ in the minibuffer. If anyone as a clue, why?