■掲示板に戻る■ 全部 1- 101- 201- 301- 401- 501- 601- 701- 801- 901- 1001- 最新50
レス数が1000を超えています。残念ながら全部は表示しません。 |
Navi2ch for Emacs (part 5)
- 504 :タカノ :02/04/09 16:26
- 流れの速い板で、タイトルに特定の語句を含むスレッドを一括で板ブックマー
クしたいことがよくあります(僕は)。正規表現クエリでmarkが付けられる機能
と、mark付きのスレッドを一括で板ブックマーク(global bookmarkではなく)
する機能を付けるpatchです。ご意見いかが。
Index: navi2ch-board-misc.el
===================================================================
RCS file: /cvsroot/navi2ch/navi2ch/navi2ch-board-misc.el,v
retrieving revision 1.19
diff -u -r1.19 navi2ch-board-misc.el
--- navi2ch-board-misc.el 2 Apr 2002 13:07:55 -0000 1.19
+++ navi2ch-board-misc.el 9 Apr 2002 07:14:32 -0000
@@ -60,6 +60,8 @@
(define-key map "mi" 'navi2ch-bm-fetch-mark-article)
(define-key map "me" 'navi2ch-bm-textize-mark-article)
(define-key map "mm" 'navi2ch-bm-mark-marks)
+ (define-key map "m?" 'navi2ch-bm-mark-by-query)
+ (define-key map "mb" 'navi2ch-bm-add-bookmark-mark-article)
(setq navi2ch-bm-mode-map map)))
(defvar navi2ch-bm-mode-menu-spec
@@ -595,7 +597,12 @@
(defun navi2ch-bm-add-global-bookmark-mark-article (bookmark-id)
(interactive (list (navi2ch-bookmark-read-id "bookmark id: ")))
(navi2ch-bm-exec-subr 'navi2ch-bm-add-global-bookmark bookmark-id))
-
+
+;;; add marked ones to the board bookmark
+(defun navi2ch-bm-add-bookmark-mark-article ()
+ (interactive)
+ (navi2ch-bm-exec-subr 'navi2ch-board-add-bookmark))
+
(defun navi2ch-bm-mark-region-subr (begin end mark)
(save-excursion
(save-restriction
@@ -630,6 +637,20 @@
(when (looking-at rep)
(navi2ch-bm-mark-subr (if arg " " "*")))
(forward-line)))))
+
+;;; mark by regexp query
+(defun navi2ch-bm-mark-by-query (query &optional arg)
+ (interactive "Mquery (regexp): ")
+ (message (prin1-to-string query))
+ (save-excursion
+ (goto-char (point-min))
+ (while (not (eobp))
+ (let ((end-of-line-point (save-excursion
+ (end-of-line)
+ (point))))
+ (when (re-search-forward query end-of-line-point 'noerror)
+ (navi2ch-bm-mark-subr (if arg " " "*"))))
+ (forward-line))))
;;; sort
(defun navi2ch-bm-sort-subr (rev start-key-fun end-key-fun)
掲示板に戻る 全部 前100 次100 最新50read.cgi ver5.26+ (01/10/21-)