(require 'w3m-bookmark) (require 'w3m-tabs) (defun localhost () (interactive) (w3m-browse-url-new-tab "http://localhost") ) (defun localhost-blogomatic () (interactive) (w3m-browse-url-new-tab "http://localhost/blogomatic") ) (defun browse-ebc (&optional section) (interactive "P") (let*((ebc-url "http://user.it.uu.se/~embe8573") (url (format "%s/%s" ebc-url (or section ""))) ) (w3m-browse-url-new-tab url) )) (defun browse-ebc-conf () (interactive) (browse-ebc "conf")) (defun browse-ebc-conf-zsh () (interactive) (browse-ebc "conf/.zsh")) (defun browse-ebc-conf-emacs () (interactive) (browse-ebc "conf/emacs-init")) (defun browse-ebc-dumps () (interactive) (browse-ebc "figures")) (defun browse-ebc-blogomatic () (interactive) (browse-ebc "blogomatic")) (defvar w3m-bookmark-url "about://bookmark/") (setq w3m-home-page w3m-bookmark-url) (defun w3m-show-bookmarks () (interactive) (w3m-new-tab "bookmarks") (w3m-bookmark-view t) ) ; RELOAD (defun w3m-bookmark-region-as-title () (let ((title-suggestion (if mark-active (buffer-substring (mark) (point)) w3m-current-title) )) (w3m-bookmark-add w3m-current-url title-suggestion) )) (defun w3m-bookmark-dwim () (interactive) (let ((url-at-point (thing-at-point 'url))) (if url-at-point (w3m-bookmark-add url-at-point) (let ((link-url (w3m-url-valid (w3m-anchor)))) (if link-url (w3m-bookmark-add link-url) (w3m-bookmark-region-as-title) ))))) (defun w3m-edit-url-or-bookmarks () (interactive) (if (string= w3m-current-url w3m-bookmark-url) (w3m-bookmark-edit) (w3m-edit-current-url) )) (provide 'bookmarks)