* lisp/gnus: Use lexical-binding in all the files
* lisp/gnus/gnus-group.el (features): Use `dlet`.
(gnus-tmp-level, gnus-tmp-marked, gnus-tmp-group): Declare vars.
(gnus-group-insert-group-line): Bind dynbound vars via `let` rather
than as formal args. Bind `number` as dynbound.
(gnus-visual, gnus-score-find-score-files-function)
(gnus-home-score-file, gnus-apply-kill-hook)
(gnus-summary-expunge-below): Declare vars.
(gnus-group-restart, gnus-group-list-plus): Fix `interactive` spec
since the arg is unused.
* lisp/gnus/mail-source.el (mail-source-bind, mail-source-bind-common):
Use `dlet` and suppress the warnings about the non-prefixed dynbound vars.
(mail-source-set-1): Remove unused var `auth-info`.
(mail-source-call-script): Remove unused var `background`.
(mail-source-fetch-pop, mail-source-check-pop): Bind pop3 vars with `dlet`.
* lisp/gnus/gnus-int.el (mail-source-plugged, gnus-inhibit-demon):
Declare vars.
(gnus-server-opened, gnus-status-message)
(gnus-open-server, gnus-close-server, gnus-request-list)
(gnus-finish-retrieve-group-infos, gnus-retrieve-group-data-early)
(gnus-request-list-newsgroups, gnus-request-newgroups)
(gnus-request-regenerate, gnus-request-compact, gnus-request-group)
(gnus-retrieve-groups, gnus-request-post, gnus-request-expunge-group)
(gnus-request-scan, gnus-request-update-info, gnus-request-marks)
(gnus-request-accept-article, gnus-request-create-group)
(gnus-asynchronous-p, gnus-remove-denial):
Bind `gnus-command-method` via `let` rather than as formal args.
* lisp/gnus/gnus-topic.el (gnus-topic-insert-topic-line):
Pass documented vars to eval for `gnus-topic-line-format-spec`.
* lisp/gnus/message.el (message-yank-original): Use `cl-progv` rather
than `eval` to bind the vars from `message-cite-style`.
* lisp/gnus/mml.el (mml-parse-1): Use `apply` instead of `eval`.
(gnus-newsgroup-name, gnus-displaying-mime, gnus-newsgroup-name)
(gnus-article-prepare-hook, gnus-newsgroup-charset)
(gnus-original-article-buffer, gnus-message-buffer)
(message-this-is-news, message-this-is-mail): Declare vars.
* lisp/gnus/deuglify.el (gnus-outlook-rearrange-article): Remove unused
var `cite-marks`.
* lisp/gnus/gnus-art.el (ansi-color-context-region): Declare var.
(gnus-mime-display-attachment-buttons-in-header): Move declaration
before first use.
(gnus-mime-display-alternative): Remove unused var `from`.
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-list): Remove unused
var `start` `end`.
* lisp/gnus/gnus-cache.el (gnus-article-decode-hook)
(nnml-generate-active-function): Declare var.
* lisp/gnus/gnus-cite.el (gnus-message-citation-mode): Remove unused
var `keywords`.
* lisp/gnus/gnus-cloud.el (gnus-cloud-encode-data): Remove unused var
`cipher`.
(gnus-cloud-ensure-cloud-group): Remove unused var `method`.
* lisp/gnus/gnus-delay.el (gnus-delay-article): Remove unused var `days`.
* lisp/gnus/gnus-html.el (gnus-html-wash-images): Remove unused vars
`tag`, `string`, and `images`.
(gnus-html-wash-tags): Remove unused vars `string` and `images`.
* lisp/gnus/gnus-msg.el (gnus-msg-mail): Remove unused var `group-name`.
(gnus-group-mail, gnus-group-news, gnus-summary-mail-other-window)
(gnus-summary-news-other-window):
Remove unused vars `group` and `buffer`.
(gnus-configure-posting-styles): Remove unused vars `style` and `attribute`.
* lisp/gnus/gnus-picon.el (gnus-picon-find-face): Remove unused vars
`database`, `directory`, and `instance`.
(gnus-picon-transform-newsgroups): Remove unused var `point`.
* lisp/gnus/gnus-range.el (gnus-range-difference): Remove unused var `safe`.
* lisp/gnus/gnus-score.el (gnus-score-load-file): Remove unused var
`score-fn`.
* lisp/gnus/gnus-sum.el (message-options-set-recipient): Declare var.
* lisp/gnus/gnus-undo.el (gnus-undo): Fix docstring lie.
* lisp/gnus/gnus-util.el (print-string-length)
(iswitchb-make-buflist-hook): Declare vars.
(gnus-emacs-version): Remove unused var `codename`.
(gnus-rename-file): Remove unused vars `old-name` and `new-name`.
* lisp/gnus/gnus-uu.el (gnus-uu-yenc-article): Remove unused var
`start-char`.
(gnus-asynchronous): Declare var.
* lisp/gnus/mm-partial.el (gnus-displaying-mime): Declare var.
(mm-inline-partial): Remove unused var `buffer`.
* lisp/gnus/mm-view.el (w3m-force-redisplay, w3m-safe-url-regexp)
(gnus-displaying-mime, gnus-original-article-buffer)
(gnus-article-prepare-hook): Declare vars.
* lisp/gnus/mml-smime.el (mml-smime-epg-encrypt): Remove unused var
`boundary`.
(mml-smime-epg-verify): Remove unused vars `plain` and `signature-file`.
* lisp/gnus/mml1991.el (pgg-text-mode): Declare var.
* lisp/gnus/mml2015.el (pgg-text-mode): Declare var.
(mml2015-pgg-decrypt): Remove unused var `result`.
(mml2015-epg-key-image-to-string): Remove unused var `error`.
(mml2015-epg-decrypt): Remove unused var `result`.
(mml2015-epg-verify): Remove unused vars `plain` and `signature-file`.
* lisp/gnus/nnbabyl.el (nnml-current-directory): Declare var.
* lisp/gnus/nndiary.el (nndiary-files): Move declaration before first use.
* lisp/gnus/nnfolder.el (nnfolder-request-accept-article):
Remove unused var `buf`.
* lisp/gnus/nnmail.el (nnmail-parse-active): Remove unused var `err`.
* lisp/gnus/nnmairix.el (nnmairix-request-group): Remove unused var `args`.
(nnmairix-request-create-group): Remove unused var `info`.
(nnmairix-request-list): Remove unused var `folder`.
(nnmairix-request-set-mark): Remove unused var `propto`.
(nnmairix-request-set-mark): Remove unused vars `number` and `method`.
(nnmairix-close-group): Remove unused var `method`.
(nnmairix-create-search-group-from-message): Remove unused var `cq`.
(nnmairix-create-server-and-default-group): Remove unused var `create`.
(nnmairix-purge-old-groups): Remove unused var `folder`.
(nnmairix-remove-tick-mark-original-article, nnmairix-get-valid-servers):
Remove unused var `cur`.
(nnmairix-replace-group-and-numbers): Remove unused var `header`.
(nnmairix-goto-original-article): Remove unused var `rval`.
(nnmairix-widget-create-query): Remove unused var `allwidgets`.
* lisp/gnus/nnmbox.el (nnml-current-directory): Declare var.
* lisp/gnus/nnmh.el (nnmh-toplev): Move declaration before first use.
(nnmh-request-list-1): Remove unused var `rdir`.
* lisp/gnus/nnml.el (nnml-generate-nov-file): Remove unused var `file`.
* lisp/gnus/nnrss.el (nnrss-request-article): Remove unused var `post`.
(nnrss-request-article): Remove unused var `fn`.
(nnrss-check-group): Remove unused var `rdf-ns`.
* lisp/gnus/nnweb.el (nnweb-request-article): Remove unused var `active`.
(nnweb-google-parse-1): Remove unused var `Score`.
* lisp/gnus/spam-stat.el (spam-stat-error-holder): Remove var.
(spam-stat-buffer-words-with-scores): Remove unused var `word`.
(spam-stat-score-buffer): Remove unused var `spam-stat-error-holder`.
(spam-stat-split-fancy): Use `err` instead of `spam-stat-error-holder`.
* lisp/gnus/spam-wash.el (spam-wash): Remove unused var `handle`.
* lisp/gnus/spam.el (spam-copy-or-move-routine): Remove unused vars
`article` and `mark`.
(spam-register-routine): Remove unused var `article`.
(spam-log-undo-registration): Remove unused var `found`.
(spam-ifile-register-with-ifile): Remove unused var `parameters`.
(spam-check-stat): Remove unused vars `category` and `return`.
(spam-parse-list): Remove unused var `found`.
(spam-filelist-register-routine): Remove unused var `from`.
2021-01-30 18:44:00 -05:00
|
|
|
;;; gnus-bookmark.el --- Bookmarks in Gnus -*- lexical-binding: t; -*-
|
2007-10-28 09:18:39 +00:00
|
|
|
|
2024-01-02 09:47:10 +08:00
|
|
|
;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
;; Author: Bastien Guerry <bzg AT altern DOT org>
|
|
|
|
;; Keywords: news
|
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
2008-05-06 03:56:49 +00:00
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
2007-10-28 09:18:39 +00:00
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 03:56:49 +00:00
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2008-05-06 03:56:49 +00:00
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2007-10-28 09:18:39 +00:00
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2017-09-13 15:52:52 -07:00
|
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
;; This file implements real bookmarks for Gnus, closely following the way
|
|
|
|
;; `bookmark.el' handles bookmarks. Most of the code comes from
|
|
|
|
;; `bookmark.el'.
|
|
|
|
;;
|
|
|
|
;; Set a Gnus bookmark:
|
|
|
|
;; M-x `gnus-bookmark-set' from the summary buffer.
|
|
|
|
;;
|
|
|
|
;; Jump to a Gnus bookmark:
|
|
|
|
;; M-x `gnus-bookmark-jump'.
|
|
|
|
;;
|
|
|
|
;; Display a list of bookmarks
|
|
|
|
;; M-x `gnus-bookmark-bmenu-list'.
|
|
|
|
;;
|
|
|
|
|
|
|
|
;;; Todo:
|
|
|
|
|
|
|
|
;; - add tags to bookmarks
|
|
|
|
;; - don't write file each time a bookmark is created
|
|
|
|
;; - better annotation interactive buffer
|
|
|
|
;; - edit annotation in gnus-bookmark-bmenu
|
|
|
|
;; - sort gnus-bookmark-buffer by author/subject/date/group/message-id
|
|
|
|
;; - auto-bmk-name customizable format
|
|
|
|
;; - renaming bookmarks in gnus-bookmark-bmenu-list
|
|
|
|
;; - better (formatted string) display in bmenu-list
|
|
|
|
|
|
|
|
;; - Integrate the `gnus-summary-*-bookmark' functionality
|
|
|
|
;; - Initialize defcustoms from corresponding `bookmark.el' variables?
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
(require 'gnus-sum)
|
|
|
|
|
|
|
|
;; FIXME: should avoid using C-c (no?)
|
|
|
|
;; (define-key gnus-summary-mode-map "\C-crm" 'gnus-bookmark-set)
|
|
|
|
;; (define-key global-map "\C-crb" 'gnus-bookmark-jump)
|
|
|
|
;; (define-key global-map "\C-crj" 'gnus-bookmark-jump)
|
|
|
|
;; (define-key global-map "\C-crl" 'gnus-bookmark-bmenu-list)
|
|
|
|
|
2008-03-10 00:50:22 +00:00
|
|
|
;; FIXME: Add keybindings, see
|
2023-10-24 09:37:21 +02:00
|
|
|
;; http://thread.gmane.org/gmane.emacs.gnus.general/63101/focus=63379 [dead link]
|
|
|
|
;; http://thread.gmane.org/v9fxx9fkm4.fsf@marauder.physik.uni-ulm.de [dead link]
|
2008-03-10 00:50:22 +00:00
|
|
|
|
|
|
|
;; FIXME: Check if `gnus-bookmark.el' should use
|
2022-10-27 23:04:37 +02:00
|
|
|
;; `bookmark-make-record-function'.
|
2023-10-24 09:37:21 +02:00
|
|
|
;; Cf. http://article.gmane.org/gmane.emacs.gnus.general/66076 [dead link]
|
2008-03-10 00:50:22 +00:00
|
|
|
|
2007-10-28 09:18:39 +00:00
|
|
|
(defgroup gnus-bookmark nil
|
|
|
|
"Setting, annotation and jumping to Gnus bookmarks."
|
|
|
|
:group 'gnus)
|
|
|
|
|
|
|
|
(defcustom gnus-bookmark-default-file
|
|
|
|
(cond
|
|
|
|
;; Backward compatibility with previous versions:
|
|
|
|
((file-exists-p "~/.gnus.bmk") "~/.gnus.bmk")
|
|
|
|
(t (nnheader-concat gnus-directory "bookmarks.el")))
|
|
|
|
"The default Gnus bookmarks file."
|
2021-01-30 14:27:40 -05:00
|
|
|
:type 'string)
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
(defcustom gnus-bookmark-file-coding-system
|
|
|
|
(if (mm-coding-system-p 'iso-2022-7bit)
|
|
|
|
'iso-2022-7bit)
|
|
|
|
"Coding system used for writing Gnus bookmark files."
|
2021-01-30 14:27:40 -05:00
|
|
|
:type '(symbol :tag "Coding system"))
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
(defcustom gnus-bookmark-sort-flag t
|
|
|
|
"Non-nil means Gnus bookmarks are sorted by bookmark names.
|
|
|
|
Otherwise they will be displayed in LIFO order (that is,
|
|
|
|
most recently set ones come first, oldest ones come last)."
|
2021-01-30 14:27:40 -05:00
|
|
|
:type 'boolean)
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
(defcustom gnus-bookmark-bmenu-toggle-infos t
|
|
|
|
"Non-nil means show details when listing Gnus bookmarks.
|
|
|
|
List of details is defined in `gnus-bookmark-bookmark-inline-details'.
|
|
|
|
This may result in truncated bookmark names. To disable this, put the
|
|
|
|
following in your `.emacs' file:
|
|
|
|
|
2015-09-17 16:08:20 -07:00
|
|
|
\(setq gnus-bookmark-bmenu-toggle-infos nil)"
|
2021-01-30 14:27:40 -05:00
|
|
|
:type 'boolean)
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
(defcustom gnus-bookmark-bmenu-file-column 30
|
|
|
|
"Column at which to display details in a buffer listing Gnus bookmarks.
|
|
|
|
You can toggle whether details are shown with \\<gnus-bookmark-bmenu-mode-map>\\[gnus-bookmark-bmenu-toggle-infos]."
|
2021-01-30 14:27:40 -05:00
|
|
|
:type 'integer)
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
(defcustom gnus-bookmark-use-annotations nil
|
|
|
|
"If non-nil, ask for an annotation when setting a bookmark."
|
2021-01-30 14:27:40 -05:00
|
|
|
:type 'boolean)
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
(defcustom gnus-bookmark-bookmark-inline-details '(author)
|
|
|
|
"Details to be shown with `gnus-bookmark-bmenu-toggle-infos'.
|
2023-10-23 18:04:25 -03:00
|
|
|
The default value is (author)."
|
2007-10-28 09:18:39 +00:00
|
|
|
:type '(list :tag "Gnus bookmark details"
|
|
|
|
(set :inline t
|
|
|
|
(const :tag "Author" author)
|
|
|
|
(const :tag "Subject" subject)
|
|
|
|
(const :tag "Date" date)
|
|
|
|
(const :tag "Group" group)
|
2021-01-30 14:27:40 -05:00
|
|
|
(const :tag "Message-id" message-id))))
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
(defcustom gnus-bookmark-bookmark-details
|
|
|
|
'(author subject date group annotation)
|
|
|
|
"Details to be shown with `gnus-bookmark-bmenu-show-details'.
|
2015-09-17 16:08:20 -07:00
|
|
|
The default value is \(author subject date group annotation)."
|
2007-10-28 09:18:39 +00:00
|
|
|
:type '(list :tag "Gnus bookmark details"
|
|
|
|
(set :inline t
|
|
|
|
(const :tag "Author" author)
|
|
|
|
(const :tag "Subject" subject)
|
|
|
|
(const :tag "Date" date)
|
|
|
|
(const :tag "Group" group)
|
|
|
|
(const :tag "Message-id" message-id)
|
2021-01-30 14:27:40 -05:00
|
|
|
(const :tag "Annotation" annotation))))
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
(defface gnus-bookmark-menu-heading
|
|
|
|
'((t (:inherit font-lock-type-face)))
|
|
|
|
"Face used to highlight the heading in Gnus bookmark menu buffers."
|
2021-01-30 14:27:40 -05:00
|
|
|
:version "23.1") ;; No Gnus
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
(defconst gnus-bookmark-end-of-version-stamp-marker
|
|
|
|
"-*- End Of Bookmark File Format Version Stamp -*-\n"
|
|
|
|
"This string marks the end of the version stamp in a Gnus bookmark file.")
|
|
|
|
|
|
|
|
(defconst gnus-bookmark-file-format-version 0
|
|
|
|
"The current version of the format used by bookmark files.
|
|
|
|
You should never need to change this.")
|
|
|
|
|
|
|
|
(defvar gnus-bookmark-alist ()
|
|
|
|
"Association list of Gnus bookmarks and their records.
|
|
|
|
The format of the alist is
|
|
|
|
|
2015-09-17 16:08:20 -07:00
|
|
|
(BMK1 BMK2 ...)
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
where each BMK is of the form
|
|
|
|
|
|
|
|
\(NAME
|
2015-09-17 16:08:20 -07:00
|
|
|
(group . GROUP)
|
|
|
|
(message-id . MESSAGE-ID)
|
|
|
|
(author . AUTHOR)
|
|
|
|
(date . DATE)
|
|
|
|
(subject . SUBJECT)
|
|
|
|
(annotation . ANNOTATION))
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
So the cdr of each bookmark is an alist too.")
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun gnus-bookmark-set ()
|
|
|
|
"Set a bookmark for this article."
|
2021-02-14 14:14:48 +01:00
|
|
|
(interactive nil gnus-article-mode gnus-summary-mode)
|
2007-10-28 09:18:39 +00:00
|
|
|
(gnus-bookmark-maybe-load-default-file)
|
2013-09-10 23:31:56 -04:00
|
|
|
(if (or (not (derived-mode-p 'gnus-summary-mode))
|
2007-10-28 09:18:39 +00:00
|
|
|
(not gnus-article-current))
|
|
|
|
(error "Please select an article in the Gnus summary buffer")
|
|
|
|
(let* ((group (car gnus-article-current))
|
|
|
|
(article (cdr gnus-article-current))
|
|
|
|
(header (gnus-summary-article-header article))
|
|
|
|
(author (mail-header-from header))
|
|
|
|
(message-id (mail-header-id header))
|
|
|
|
(date (mail-header-date header))
|
|
|
|
(subject (gnus-summary-subject-string))
|
|
|
|
(bmk-name (gnus-bookmark-set-bookmark-name group author subject))
|
|
|
|
;; Maybe ask for annotation
|
|
|
|
(annotation
|
|
|
|
(if gnus-bookmark-use-annotations
|
|
|
|
(read-from-minibuffer
|
|
|
|
(format "Annotation for %s: " bmk-name)) "")))
|
|
|
|
;; Set the bookmark list
|
|
|
|
(setq gnus-bookmark-alist
|
|
|
|
(cons
|
2016-02-10 15:54:52 +11:00
|
|
|
(list (substring-no-properties bmk-name)
|
2008-03-07 05:44:37 +00:00
|
|
|
(gnus-bookmark-make-record
|
2007-10-28 09:18:39 +00:00
|
|
|
group message-id author date subject annotation))
|
|
|
|
gnus-bookmark-alist))))
|
|
|
|
(gnus-bookmark-bmenu-surreptitiously-rebuild-list)
|
|
|
|
(gnus-bookmark-write-file))
|
|
|
|
|
2008-03-07 05:44:37 +00:00
|
|
|
(defun gnus-bookmark-make-record
|
2007-10-28 09:18:39 +00:00
|
|
|
(group message-id author date subject annotation)
|
2021-09-24 14:46:56 +02:00
|
|
|
"Return the record part of a new bookmark.
|
|
|
|
Arguments GROUP MESSAGE-ID AUTHOR DATE SUBJECT and ANNOTATION
|
|
|
|
will be saved in the bookmark."
|
2007-10-28 09:18:39 +00:00
|
|
|
(let ((the-record
|
2016-02-10 15:54:52 +11:00
|
|
|
`((group . ,(substring-no-properties group))
|
|
|
|
(message-id . ,(substring-no-properties message-id))
|
|
|
|
(author . ,(substring-no-properties author))
|
|
|
|
(date . ,(substring-no-properties date))
|
|
|
|
(subject . ,(substring-no-properties subject))
|
|
|
|
(annotation . ,(substring-no-properties annotation)))))
|
2007-10-28 09:18:39 +00:00
|
|
|
the-record))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-set-bookmark-name (group author subject)
|
|
|
|
"Set bookmark name from GROUP AUTHOR and SUBJECT."
|
|
|
|
(let* ((subject (split-string subject))
|
|
|
|
(default-name-0 ;; Should be merged with -1?
|
|
|
|
(concat (car (nreverse (delete "" (split-string group "[\\.:]"))))
|
|
|
|
"-" (car (split-string author))
|
|
|
|
"-" (car subject) "-" (cadr subject)))
|
|
|
|
(default-name-1
|
|
|
|
;; Strip "[]" chars from the bookmark name:
|
2016-02-12 18:24:30 +11:00
|
|
|
(replace-regexp-in-string "[]_[]" "" default-name-0))
|
2007-10-28 09:18:39 +00:00
|
|
|
(name (read-from-minibuffer
|
|
|
|
(format "Set bookmark (%s): " default-name-1)
|
|
|
|
nil nil nil nil
|
|
|
|
default-name-1)))
|
|
|
|
(if (string-equal name "")
|
|
|
|
default-name-1
|
|
|
|
name)))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-write-file ()
|
|
|
|
"Write currently defined Gnus bookmarks into `gnus-bookmark-default-file'."
|
|
|
|
(interactive)
|
|
|
|
(save-excursion
|
|
|
|
(save-window-excursion
|
2014-12-13 23:40:04 -08:00
|
|
|
;; Avoid warnings?
|
2007-10-28 09:18:39 +00:00
|
|
|
;; (message "Saving Gnus bookmarks to file %s..." gnus-bookmark-default-file)
|
2020-01-10 13:34:59 -05:00
|
|
|
(set-buffer (gnus-get-buffer-create " *Gnus bookmarks*"))
|
2007-10-28 09:18:39 +00:00
|
|
|
(erase-buffer)
|
|
|
|
(gnus-bookmark-insert-file-format-version-stamp)
|
|
|
|
(pp gnus-bookmark-alist (current-buffer))
|
|
|
|
(condition-case nil
|
|
|
|
(let ((coding-system-for-write gnus-bookmark-file-coding-system))
|
|
|
|
(write-region (point-min) (point-max)
|
|
|
|
gnus-bookmark-default-file))
|
|
|
|
(file-error (message "Can't write %s"
|
|
|
|
gnus-bookmark-default-file)))
|
|
|
|
(kill-buffer (current-buffer))
|
|
|
|
(message
|
|
|
|
"Saving Gnus bookmarks to file %s...done"
|
|
|
|
gnus-bookmark-default-file))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-insert-file-format-version-stamp ()
|
|
|
|
"Insert text indicating current version of Gnus bookmark file format."
|
|
|
|
(insert
|
|
|
|
(format ";;;; Gnus Bookmark Format Version %d %s;;;;\n"
|
|
|
|
gnus-bookmark-file-format-version
|
|
|
|
(if gnus-bookmark-file-coding-system
|
|
|
|
(concat "-*- coding: "
|
|
|
|
(symbol-name gnus-bookmark-file-coding-system)
|
|
|
|
"; -*- ")
|
|
|
|
"")))
|
|
|
|
(insert ";;; This format is meant to be slightly human-readable;\n"
|
|
|
|
";;; nevertheless, you probably don't want to edit it.\n"
|
|
|
|
";;; "
|
|
|
|
gnus-bookmark-end-of-version-stamp-marker))
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun gnus-bookmark-jump (&optional bmk-name)
|
|
|
|
"Jump to a Gnus bookmark (BMK-NAME)."
|
|
|
|
(interactive)
|
|
|
|
(gnus-bookmark-maybe-load-default-file)
|
|
|
|
(let* ((bookmark (or bmk-name
|
Merge changes made in Gnus trunk.
nndraft.el (nndraft-request-expire-articles): Use the group name instead if "nndraft".
gnus.texi (Using IMAP): Remove the @acronyms from the headings.
nnregistry.el: Added.
nnimap.el (nnimap-insert-partial-structure): Be way more permissive when interpreting the structures.
GNUS-NEWS: Minor error in GNUS-NEWS - password-cache.el.
nnimap.el (nnimap-request-accept-article): Add \r\n to the lines to make this work with Cyrus.
gnus-registry.el: Don't prompt on load, which makes it impossible to build Gnus.
gnus-gravatar.el: Add gnus-gravatar-properties.
gnus-agent.el, gnus-art.el, gnus-bookmark.el, gnus-dired.el, gnus-group.el,\
gnus-int.el, gnus-msg.el, gnus-registry.el, gnus-score.el, gnus-srvr.el,\
gnus-sum.el, gnus-topic.el, gnus-util.el, gnus.el, mm-decode.el, mm-util.el,\
mm-view.el, mml-smime.el, mml.el, nnmairix.el, nnrss.el, smime.el:\
Introduce gnus-completing-read.
gnus-util.el: Make completing-read function configurable.
gnus-util.el: Add requires and fix history for iswitchb.
webmail.el: Remove netscape/my-deja, since they no longer exist.
gnus.el (gnus-local-domain): Declare variable obsolete.
nnimap.el (nnimap-insert-partial-structure): Get the type from the correct slot, too.
pop3.el (pop3-send-streaming-command, pop3-stream-length): New variable.
nnimap.el (nnimap-open-connection): Revert the auto-network->starttls code.
nnimap.el (nnimap-request-set-mark): Erase the buffer before issuing commands.
nnimap.el (nnimap-split-rule): Mark as obsolete.
gnus-sum.el (gnus-valid-move-group-p): Make sure that `group' is a symbol.
nnimap.el (nnimap-split-incoming-mail): Allow `default' as nnimap-split-methods value.
nnimap.el (nnimap-request-article): Downcase the NILs so that they are nil.
nndoc.el (nndoc-retrieve-groups): New function.
gnus.texi: Fix Gravatar documentation.
2010-09-30 08:39:23 +00:00
|
|
|
(gnus-completing-read "Jump to bookmarked article"
|
2021-01-30 00:35:24 -05:00
|
|
|
(mapcar #'car gnus-bookmark-alist))))
|
2008-03-07 05:44:37 +00:00
|
|
|
(bmk-record (cadr (assoc bookmark gnus-bookmark-alist)))
|
|
|
|
(group (cdr (assoc 'group bmk-record)))
|
|
|
|
(message-id (cdr (assoc 'message-id bmk-record))))
|
2007-10-28 09:18:39 +00:00
|
|
|
(when group
|
|
|
|
(unless (get-buffer gnus-group-buffer)
|
|
|
|
(gnus-no-server))
|
|
|
|
(gnus-activate-group group)
|
|
|
|
(gnus-group-quick-select-group 0 group))
|
|
|
|
(if message-id
|
|
|
|
(or (gnus-summary-goto-article message-id nil 'force)
|
|
|
|
(if (fboundp 'gnus-summary-insert-cached-articles)
|
|
|
|
(progn
|
|
|
|
(gnus-summary-insert-cached-articles)
|
|
|
|
(gnus-summary-goto-article message-id nil 'force))
|
|
|
|
(message "Message could not be found."))))))
|
|
|
|
|
|
|
|
(defvar gnus-bookmark-already-loaded nil)
|
|
|
|
|
|
|
|
(defun gnus-bookmark-alist-from-buffer ()
|
|
|
|
"Return a `gnus-bookmark-alist' from the current buffer.
|
|
|
|
The buffer must of course contain Gnus bookmark format information.
|
|
|
|
Does not care from where in the buffer it is called, and does not
|
|
|
|
affect point."
|
|
|
|
(save-excursion
|
|
|
|
(goto-char (point-min))
|
|
|
|
(if (search-forward
|
|
|
|
gnus-bookmark-end-of-version-stamp-marker nil t)
|
|
|
|
(read (current-buffer))
|
|
|
|
;; Else no hope of getting information here.
|
|
|
|
(error "Not Gnus bookmark format"))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-load (file)
|
|
|
|
"Load Gnus bookmarks from FILE (which must be in bookmark format)."
|
|
|
|
(interactive
|
|
|
|
(list (read-file-name
|
2020-09-13 14:58:24 +02:00
|
|
|
(format "Load Gnus bookmarks from: (%s) "
|
|
|
|
gnus-bookmark-default-file)
|
2007-10-28 09:18:39 +00:00
|
|
|
"~/" gnus-bookmark-default-file 'confirm)))
|
|
|
|
(setq file (expand-file-name file))
|
|
|
|
(if (file-readable-p file)
|
|
|
|
(save-excursion
|
|
|
|
(save-window-excursion
|
|
|
|
(set-buffer (let ((enable-local-variables nil))
|
|
|
|
(find-file-noselect file)))
|
|
|
|
(goto-char (point-min))
|
|
|
|
(let ((blist (gnus-bookmark-alist-from-buffer)))
|
|
|
|
(if (listp blist)
|
|
|
|
(progn (setq gnus-bookmark-already-loaded t)
|
|
|
|
(setq gnus-bookmark-alist blist))
|
|
|
|
(error "Not Gnus bookmark format")))))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-maybe-load-default-file ()
|
|
|
|
"Maybe load Gnus bookmarks in `gnus-bookmark-alist'."
|
|
|
|
(and (not gnus-bookmark-already-loaded)
|
|
|
|
(null gnus-bookmark-alist)
|
|
|
|
(file-readable-p (expand-file-name gnus-bookmark-default-file))
|
|
|
|
(gnus-bookmark-load gnus-bookmark-default-file)))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-maybe-sort-alist ()
|
|
|
|
"Return the gnus-bookmark-alist for display.
|
|
|
|
If the gnus-bookmark-sort-flag is non-nil, then return a sorted
|
|
|
|
copy of the alist."
|
|
|
|
(when gnus-bookmark-sort-flag
|
|
|
|
(setq gnus-bookmark-alist
|
|
|
|
(sort (copy-alist gnus-bookmark-alist)
|
2020-11-14 17:04:23 +01:00
|
|
|
(lambda (x y) (string-lessp (car x) (car y)))))))
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun gnus-bookmark-bmenu-list ()
|
|
|
|
"Display a list of existing Gnus bookmarks.
|
|
|
|
The list is displayed in a buffer named `*Gnus Bookmark List*'.
|
|
|
|
The leftmost column displays a D if the bookmark is flagged for
|
|
|
|
deletion, or > if it is flagged for displaying."
|
|
|
|
(interactive)
|
|
|
|
(gnus-bookmark-maybe-load-default-file)
|
2016-02-10 14:56:30 +11:00
|
|
|
(if (called-interactively-p 'any)
|
2020-01-10 13:34:59 -05:00
|
|
|
(switch-to-buffer (gnus-get-buffer-create "*Gnus Bookmark List*"))
|
|
|
|
(set-buffer (gnus-get-buffer-create "*Gnus Bookmark List*")))
|
2007-10-28 09:18:39 +00:00
|
|
|
(let ((inhibit-read-only t)
|
* lisp/gnus: Use lexical-binding in all the files
* lisp/gnus/gnus-group.el (features): Use `dlet`.
(gnus-tmp-level, gnus-tmp-marked, gnus-tmp-group): Declare vars.
(gnus-group-insert-group-line): Bind dynbound vars via `let` rather
than as formal args. Bind `number` as dynbound.
(gnus-visual, gnus-score-find-score-files-function)
(gnus-home-score-file, gnus-apply-kill-hook)
(gnus-summary-expunge-below): Declare vars.
(gnus-group-restart, gnus-group-list-plus): Fix `interactive` spec
since the arg is unused.
* lisp/gnus/mail-source.el (mail-source-bind, mail-source-bind-common):
Use `dlet` and suppress the warnings about the non-prefixed dynbound vars.
(mail-source-set-1): Remove unused var `auth-info`.
(mail-source-call-script): Remove unused var `background`.
(mail-source-fetch-pop, mail-source-check-pop): Bind pop3 vars with `dlet`.
* lisp/gnus/gnus-int.el (mail-source-plugged, gnus-inhibit-demon):
Declare vars.
(gnus-server-opened, gnus-status-message)
(gnus-open-server, gnus-close-server, gnus-request-list)
(gnus-finish-retrieve-group-infos, gnus-retrieve-group-data-early)
(gnus-request-list-newsgroups, gnus-request-newgroups)
(gnus-request-regenerate, gnus-request-compact, gnus-request-group)
(gnus-retrieve-groups, gnus-request-post, gnus-request-expunge-group)
(gnus-request-scan, gnus-request-update-info, gnus-request-marks)
(gnus-request-accept-article, gnus-request-create-group)
(gnus-asynchronous-p, gnus-remove-denial):
Bind `gnus-command-method` via `let` rather than as formal args.
* lisp/gnus/gnus-topic.el (gnus-topic-insert-topic-line):
Pass documented vars to eval for `gnus-topic-line-format-spec`.
* lisp/gnus/message.el (message-yank-original): Use `cl-progv` rather
than `eval` to bind the vars from `message-cite-style`.
* lisp/gnus/mml.el (mml-parse-1): Use `apply` instead of `eval`.
(gnus-newsgroup-name, gnus-displaying-mime, gnus-newsgroup-name)
(gnus-article-prepare-hook, gnus-newsgroup-charset)
(gnus-original-article-buffer, gnus-message-buffer)
(message-this-is-news, message-this-is-mail): Declare vars.
* lisp/gnus/deuglify.el (gnus-outlook-rearrange-article): Remove unused
var `cite-marks`.
* lisp/gnus/gnus-art.el (ansi-color-context-region): Declare var.
(gnus-mime-display-attachment-buttons-in-header): Move declaration
before first use.
(gnus-mime-display-alternative): Remove unused var `from`.
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-list): Remove unused
var `start` `end`.
* lisp/gnus/gnus-cache.el (gnus-article-decode-hook)
(nnml-generate-active-function): Declare var.
* lisp/gnus/gnus-cite.el (gnus-message-citation-mode): Remove unused
var `keywords`.
* lisp/gnus/gnus-cloud.el (gnus-cloud-encode-data): Remove unused var
`cipher`.
(gnus-cloud-ensure-cloud-group): Remove unused var `method`.
* lisp/gnus/gnus-delay.el (gnus-delay-article): Remove unused var `days`.
* lisp/gnus/gnus-html.el (gnus-html-wash-images): Remove unused vars
`tag`, `string`, and `images`.
(gnus-html-wash-tags): Remove unused vars `string` and `images`.
* lisp/gnus/gnus-msg.el (gnus-msg-mail): Remove unused var `group-name`.
(gnus-group-mail, gnus-group-news, gnus-summary-mail-other-window)
(gnus-summary-news-other-window):
Remove unused vars `group` and `buffer`.
(gnus-configure-posting-styles): Remove unused vars `style` and `attribute`.
* lisp/gnus/gnus-picon.el (gnus-picon-find-face): Remove unused vars
`database`, `directory`, and `instance`.
(gnus-picon-transform-newsgroups): Remove unused var `point`.
* lisp/gnus/gnus-range.el (gnus-range-difference): Remove unused var `safe`.
* lisp/gnus/gnus-score.el (gnus-score-load-file): Remove unused var
`score-fn`.
* lisp/gnus/gnus-sum.el (message-options-set-recipient): Declare var.
* lisp/gnus/gnus-undo.el (gnus-undo): Fix docstring lie.
* lisp/gnus/gnus-util.el (print-string-length)
(iswitchb-make-buflist-hook): Declare vars.
(gnus-emacs-version): Remove unused var `codename`.
(gnus-rename-file): Remove unused vars `old-name` and `new-name`.
* lisp/gnus/gnus-uu.el (gnus-uu-yenc-article): Remove unused var
`start-char`.
(gnus-asynchronous): Declare var.
* lisp/gnus/mm-partial.el (gnus-displaying-mime): Declare var.
(mm-inline-partial): Remove unused var `buffer`.
* lisp/gnus/mm-view.el (w3m-force-redisplay, w3m-safe-url-regexp)
(gnus-displaying-mime, gnus-original-article-buffer)
(gnus-article-prepare-hook): Declare vars.
* lisp/gnus/mml-smime.el (mml-smime-epg-encrypt): Remove unused var
`boundary`.
(mml-smime-epg-verify): Remove unused vars `plain` and `signature-file`.
* lisp/gnus/mml1991.el (pgg-text-mode): Declare var.
* lisp/gnus/mml2015.el (pgg-text-mode): Declare var.
(mml2015-pgg-decrypt): Remove unused var `result`.
(mml2015-epg-key-image-to-string): Remove unused var `error`.
(mml2015-epg-decrypt): Remove unused var `result`.
(mml2015-epg-verify): Remove unused vars `plain` and `signature-file`.
* lisp/gnus/nnbabyl.el (nnml-current-directory): Declare var.
* lisp/gnus/nndiary.el (nndiary-files): Move declaration before first use.
* lisp/gnus/nnfolder.el (nnfolder-request-accept-article):
Remove unused var `buf`.
* lisp/gnus/nnmail.el (nnmail-parse-active): Remove unused var `err`.
* lisp/gnus/nnmairix.el (nnmairix-request-group): Remove unused var `args`.
(nnmairix-request-create-group): Remove unused var `info`.
(nnmairix-request-list): Remove unused var `folder`.
(nnmairix-request-set-mark): Remove unused var `propto`.
(nnmairix-request-set-mark): Remove unused vars `number` and `method`.
(nnmairix-close-group): Remove unused var `method`.
(nnmairix-create-search-group-from-message): Remove unused var `cq`.
(nnmairix-create-server-and-default-group): Remove unused var `create`.
(nnmairix-purge-old-groups): Remove unused var `folder`.
(nnmairix-remove-tick-mark-original-article, nnmairix-get-valid-servers):
Remove unused var `cur`.
(nnmairix-replace-group-and-numbers): Remove unused var `header`.
(nnmairix-goto-original-article): Remove unused var `rval`.
(nnmairix-widget-create-query): Remove unused var `allwidgets`.
* lisp/gnus/nnmbox.el (nnml-current-directory): Declare var.
* lisp/gnus/nnmh.el (nnmh-toplev): Move declaration before first use.
(nnmh-request-list-1): Remove unused var `rdir`.
* lisp/gnus/nnml.el (nnml-generate-nov-file): Remove unused var `file`.
* lisp/gnus/nnrss.el (nnrss-request-article): Remove unused var `post`.
(nnrss-request-article): Remove unused var `fn`.
(nnrss-check-group): Remove unused var `rdf-ns`.
* lisp/gnus/nnweb.el (nnweb-request-article): Remove unused var `active`.
(nnweb-google-parse-1): Remove unused var `Score`.
* lisp/gnus/spam-stat.el (spam-stat-error-holder): Remove var.
(spam-stat-buffer-words-with-scores): Remove unused var `word`.
(spam-stat-score-buffer): Remove unused var `spam-stat-error-holder`.
(spam-stat-split-fancy): Use `err` instead of `spam-stat-error-holder`.
* lisp/gnus/spam-wash.el (spam-wash): Remove unused var `handle`.
* lisp/gnus/spam.el (spam-copy-or-move-routine): Remove unused vars
`article` and `mark`.
(spam-register-routine): Remove unused var `article`.
(spam-log-undo-registration): Remove unused var `found`.
(spam-ifile-register-with-ifile): Remove unused var `parameters`.
(spam-check-stat): Remove unused vars `category` and `return`.
(spam-parse-list): Remove unused var `found`.
(spam-filelist-register-routine): Remove unused var `from`.
2021-01-30 18:44:00 -05:00
|
|
|
alist name) ;; start end
|
2007-10-28 09:18:39 +00:00
|
|
|
(erase-buffer)
|
|
|
|
(insert "% Gnus Bookmark\n- --------\n")
|
|
|
|
(add-text-properties (point-min) (point)
|
|
|
|
'(font-lock-face gnus-bookmark-menu-heading))
|
|
|
|
;; sort before displaying
|
|
|
|
(gnus-bookmark-maybe-sort-alist)
|
|
|
|
;; Display gnus bookmarks
|
|
|
|
(setq alist gnus-bookmark-alist)
|
|
|
|
(while alist
|
|
|
|
(setq name (gnus-bookmark-name-from-full-record (pop alist)))
|
|
|
|
;; if a Gnus bookmark has an annotation, prepend a "*"
|
|
|
|
;; in the list of bookmarks.
|
|
|
|
(insert (if (member (gnus-bookmark-get-annotation name) (list nil ""))
|
|
|
|
" "
|
|
|
|
" *"))
|
2016-02-10 15:54:52 +11:00
|
|
|
(if (display-mouse-p)
|
2007-10-28 09:18:39 +00:00
|
|
|
(add-text-properties
|
|
|
|
(prog1
|
|
|
|
(point)
|
|
|
|
(insert name))
|
|
|
|
(let ((end (point)))
|
|
|
|
(prog2
|
|
|
|
(re-search-backward "[^ \t]")
|
|
|
|
(1+ (point))
|
|
|
|
(goto-char end)
|
|
|
|
(insert "\n")))
|
|
|
|
`(mouse-face highlight follow-link t
|
|
|
|
help-echo ,(format "%s: go to this article"
|
2016-02-10 14:42:03 +11:00
|
|
|
'mouse-2)))
|
2007-10-28 09:18:39 +00:00
|
|
|
(insert name "\n")))
|
|
|
|
(goto-char (point-min))
|
|
|
|
(forward-line 2)
|
|
|
|
(gnus-bookmark-bmenu-mode)
|
|
|
|
(if gnus-bookmark-bmenu-toggle-infos
|
|
|
|
(gnus-bookmark-bmenu-toggle-infos t))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-bmenu-surreptitiously-rebuild-list ()
|
|
|
|
"Rebuild the Bookmark List if it exists.
|
|
|
|
Don't affect the buffer ring order."
|
|
|
|
(if (get-buffer "*Gnus Bookmark List*")
|
|
|
|
(save-excursion
|
|
|
|
(save-window-excursion
|
|
|
|
(gnus-bookmark-bmenu-list)))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-get-annotation (bookmark)
|
|
|
|
"Return the annotation of Gnus BOOKMARK, or nil if none."
|
|
|
|
(cdr (assq 'annotation (gnus-bookmark-get-bookmark-record bookmark))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-get-bookmark (bookmark)
|
|
|
|
"Return the full entry for Gnus BOOKMARK in `gnus-bookmark-alist'.
|
|
|
|
If BOOKMARK is not a string, return nil."
|
|
|
|
(when (stringp bookmark)
|
|
|
|
(assoc bookmark gnus-bookmark-alist)))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-get-bookmark-record (bookmark)
|
|
|
|
"Return the guts of the entry for Gnus BOOKMARK in `gnus-bookmark-alist'.
|
|
|
|
That is, all information but the name."
|
|
|
|
(car (cdr (gnus-bookmark-get-bookmark bookmark))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-name-from-full-record (full-record)
|
2015-09-17 16:08:20 -07:00
|
|
|
"Return name of FULL-RECORD (an alist element instead of a string)."
|
2007-10-28 09:18:39 +00:00
|
|
|
(car full-record))
|
|
|
|
|
|
|
|
(defvar gnus-bookmark-bmenu-bookmark-column nil)
|
|
|
|
(defvar gnus-bookmark-bmenu-hidden-bookmarks ())
|
2021-10-04 10:15:04 +02:00
|
|
|
|
2021-10-05 10:34:37 +02:00
|
|
|
(defvar-keymap gnus-bookmark-bmenu-mode-map
|
|
|
|
:full t
|
|
|
|
:suppress 'nodigits
|
2021-10-04 10:15:04 +02:00
|
|
|
"q" #'quit-window
|
2021-11-16 08:18:30 +01:00
|
|
|
"RET" #'gnus-bookmark-bmenu-select
|
2021-10-04 10:15:04 +02:00
|
|
|
"v" #'gnus-bookmark-bmenu-select
|
|
|
|
"d" #'gnus-bookmark-bmenu-delete
|
|
|
|
"k" #'gnus-bookmark-bmenu-delete
|
2021-11-16 08:18:30 +01:00
|
|
|
"C-d" #'gnus-bookmark-bmenu-delete-backwards
|
2021-10-04 10:15:04 +02:00
|
|
|
"x" #'gnus-bookmark-bmenu-execute-deletions
|
2021-11-16 08:18:30 +01:00
|
|
|
"SPC" #'next-line
|
2021-10-04 10:15:04 +02:00
|
|
|
"n" #'next-line
|
|
|
|
"p" #'previous-line
|
2021-11-16 08:18:30 +01:00
|
|
|
"DEL" #'gnus-bookmark-bmenu-backup-unmark
|
2021-10-04 10:15:04 +02:00
|
|
|
"?" #'describe-mode
|
|
|
|
"u" #'gnus-bookmark-bmenu-unmark
|
|
|
|
"m" #'gnus-bookmark-bmenu-mark
|
|
|
|
"l" #'gnus-bookmark-bmenu-load
|
|
|
|
"s" #'gnus-bookmark-bmenu-save
|
|
|
|
"t" #'gnus-bookmark-bmenu-toggle-infos
|
|
|
|
"a" #'gnus-bookmark-bmenu-show-details
|
2021-11-16 08:18:30 +01:00
|
|
|
"<mouse-2>" #'gnus-bookmark-bmenu-select-by-mouse)
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
;; Bookmark Buffer Menu mode is suitable only for specially formatted
|
|
|
|
;; data.
|
|
|
|
(put 'gnus-bookmark-bmenu-mode 'mode-class 'special)
|
|
|
|
|
|
|
|
;; Been to lazy to use gnus-bookmark-save...
|
|
|
|
(defalias 'gnus-bookmark-bmenu-save 'gnus-bookmark-write-file)
|
|
|
|
|
2013-09-10 23:31:56 -04:00
|
|
|
(define-derived-mode gnus-bookmark-bmenu-mode fundamental-mode "Bookmark Menu"
|
2007-10-28 09:18:39 +00:00
|
|
|
"Major mode for editing a list of Gnus bookmarks.
|
|
|
|
Each line describes one of the bookmarks in Gnus.
|
|
|
|
Letters do not insert themselves; instead, they are commands.
|
|
|
|
Gnus bookmarks names preceded by a \"*\" have annotations.
|
|
|
|
\\<gnus-bookmark-bmenu-mode-map>
|
|
|
|
\\[gnus-bookmark-bmenu-mark] -- mark bookmark to be displayed.
|
|
|
|
\\[gnus-bookmark-bmenu-select] -- select bookmark of line point is on.
|
|
|
|
Also show bookmarks marked using m in other windows.
|
|
|
|
\\[gnus-bookmark-bmenu-toggle-infos] -- toggle displaying of details (they may obscure long bookmark names).
|
|
|
|
\\[gnus-bookmark-bmenu-locate] -- display (in minibuffer) location of this bookmark.
|
2015-09-17 16:08:20 -07:00
|
|
|
\\[gnus-bookmark-bmenu-rename] -- rename this bookmark (prompts for new name).
|
2007-10-28 09:18:39 +00:00
|
|
|
\\[gnus-bookmark-bmenu-delete] -- mark this bookmark to be deleted, and move down.
|
|
|
|
\\[gnus-bookmark-bmenu-delete-backwards] -- mark this bookmark to be deleted, and move up.
|
|
|
|
\\[gnus-bookmark-bmenu-execute-deletions] -- delete bookmarks marked with `\\[gnus-bookmark-bmenu-delete]'.
|
|
|
|
\\[gnus-bookmark-bmenu-load] -- load in a file of bookmarks (prompts for file.)
|
|
|
|
\\[gnus-bookmark-bmenu-save] -- load in a file of bookmarks (prompts for file.)
|
|
|
|
\\[gnus-bookmark-bmenu-unmark] -- remove all kinds of marks from current line.
|
|
|
|
With prefix argument, also move up one line.
|
|
|
|
\\[gnus-bookmark-bmenu-backup-unmark] -- back up a line and remove marks.
|
|
|
|
\\[gnus-bookmark-bmenu-show-details] -- show the annotation, if it exists, for the current bookmark
|
|
|
|
in another buffer.
|
|
|
|
\\[gnus-bookmark-bmenu-show-all-annotations] -- show the annotations of all bookmarks in another buffer.
|
|
|
|
\\[gnus-bookmark-bmenu-edit-annotation] -- edit the annotation for the current bookmark."
|
|
|
|
(setq truncate-lines t)
|
2013-09-10 23:31:56 -04:00
|
|
|
(setq buffer-read-only t))
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
;; avoid compilation warnings
|
|
|
|
(defvar gnus-bookmark-bmenu-toggle-infos nil)
|
|
|
|
|
|
|
|
(defun gnus-bookmark-bmenu-toggle-infos (&optional show)
|
|
|
|
"Toggle whether details are shown in the Gnus bookmark list.
|
|
|
|
Optional argument SHOW means show them unconditionally."
|
2021-02-14 14:14:48 +01:00
|
|
|
(interactive nil gnus-bookmark-bmenu-mode)
|
2007-10-28 09:18:39 +00:00
|
|
|
(cond
|
|
|
|
(show
|
|
|
|
(setq gnus-bookmark-bmenu-toggle-infos nil)
|
|
|
|
(gnus-bookmark-bmenu-show-infos)
|
|
|
|
(setq gnus-bookmark-bmenu-toggle-infos t))
|
|
|
|
(gnus-bookmark-bmenu-toggle-infos
|
|
|
|
(gnus-bookmark-bmenu-hide-infos)
|
|
|
|
(setq gnus-bookmark-bmenu-toggle-infos nil))
|
|
|
|
(t
|
|
|
|
(gnus-bookmark-bmenu-show-infos)
|
|
|
|
(setq gnus-bookmark-bmenu-toggle-infos t))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-bmenu-show-infos (&optional force)
|
|
|
|
"Show infos in bmenu, maybe FORCE display of infos."
|
|
|
|
(if (and (not force) gnus-bookmark-bmenu-toggle-infos)
|
|
|
|
nil ;already shown, so do nothing
|
|
|
|
(save-excursion
|
|
|
|
(save-window-excursion
|
|
|
|
(goto-char (point-min))
|
|
|
|
(forward-line 2)
|
|
|
|
(setq gnus-bookmark-bmenu-hidden-bookmarks ())
|
|
|
|
(let ((inhibit-read-only t))
|
|
|
|
(while (< (point) (point-max))
|
|
|
|
(let ((bmrk (gnus-bookmark-bmenu-bookmark)))
|
|
|
|
(setq gnus-bookmark-bmenu-hidden-bookmarks
|
|
|
|
(cons bmrk gnus-bookmark-bmenu-hidden-bookmarks))
|
2022-08-23 04:54:57 +02:00
|
|
|
(let ((start (line-end-position)))
|
2007-10-28 09:18:39 +00:00
|
|
|
(move-to-column gnus-bookmark-bmenu-file-column t)
|
|
|
|
;; Strip off `mouse-face' from the white spaces region.
|
2016-02-10 15:54:52 +11:00
|
|
|
(if (display-mouse-p)
|
2007-10-28 09:18:39 +00:00
|
|
|
(remove-text-properties start (point)
|
|
|
|
'(mouse-face nil help-echo nil))))
|
|
|
|
(delete-region (point) (progn (end-of-line) (point)))
|
|
|
|
(insert " ")
|
|
|
|
;; Pass the NO-HISTORY arg:
|
|
|
|
(gnus-bookmark-insert-details bmrk)
|
|
|
|
(forward-line 1))))))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-insert-details (bmk-name)
|
|
|
|
"Insert the details of the article associated with BMK-NAME."
|
|
|
|
(let ((start (point)))
|
|
|
|
(prog1
|
|
|
|
(insert (gnus-bookmark-get-details
|
|
|
|
bmk-name
|
|
|
|
gnus-bookmark-bookmark-inline-details))
|
2016-02-10 15:54:52 +11:00
|
|
|
(if (display-mouse-p)
|
2007-10-28 09:18:39 +00:00
|
|
|
(add-text-properties
|
|
|
|
start
|
|
|
|
(save-excursion (re-search-backward
|
|
|
|
"[^ \t]")
|
|
|
|
(1+ (point)))
|
|
|
|
`(mouse-face highlight
|
|
|
|
follow-link t
|
|
|
|
help-echo ,(format "%s: go to this article"
|
2016-02-10 14:42:03 +11:00
|
|
|
'mouse-2)))))))
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
(defun gnus-bookmark-kill-line (&optional newline-too)
|
|
|
|
"Kill from point to end of line.
|
|
|
|
If optional arg NEWLINE-TOO is non-nil, delete the newline too.
|
|
|
|
Does not affect the kill ring."
|
2022-08-23 04:54:57 +02:00
|
|
|
(delete-region (point) (line-end-position))
|
Replace end-of-line, save-excursion etc with point-at-eol, point-at-bol.
* lisp/mh-e/mh-seq.el (mh-read-msg-list): Use point-at-eol.
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-show-infos)
(gnus-bookmark-kill-line): Use point-at-eol.
* lisp/cedet/ede/proj-elisp.el (ede-proj-flush-autoconf): Use point-at-bol.
* lisp/emacs-lisp/chart.el (chart-zap-chars):
* lisp/play/decipher.el (decipher-set-map):
* lisp/progmodes/ada-mode.el (ada-get-current-indent)
(ada-search-ignore-string-comment, ada-tab-hard, ada-untab-hard):
* lisp/progmodes/ada-prj.el (ada-prj-load-from-file, ada-prj-display-help):
* lisp/progmodes/ada-xref.el (ada-initialize-runtime-library)
(ada-get-all-references):
* lisp/progmodes/cperl-mode.el (cperl-electric-paren)
(cperl-electric-rparen, cperl-electric-keyword, cperl-electric-else)
(cperl-linefeed, cperl-sniff-for-indent, cperl-to-comment-or-eol)
(cperl-find-pods-heres, cperl-indent-exp, cperl-fix-line-spacing)
(cperl-word-at-point-hard):
* lisp/progmodes/idlw-shell.el (idlwave-shell-move-or-history)
(idlwave-shell-filename-string, idlwave-shell-batch-command)
(idlwave-shell-display-line):
* lisp/progmodes/idlwave.el (idlwave-show-begin, idlwave-fill-paragraph)
(idlwave-calc-hanging-indent, idlwave-auto-fill, idlwave-template):
* lisp/progmodes/js.el (js--re-search-forward-inner)
(js--re-search-backward-inner):
* lisp/progmodes/vhdl-mode.el (vhdl-align-region-1, vhdl-align-region-2)
(vhdl-fix-clause, vhdl-compose-configuration-architecture):
* lisp/progmodes/ruby-mode.el (ruby-parse-partial, eval-when-compile):
* lisp/textmodes/flyspell.el (flyspell-process-localwords):
* lisp/textmodes/ispell.el (ispell-buffer-local-parsing)
(ispell-buffer-local-dict, ispell-buffer-local-words):
Use point-at-bol and point-at-eol.
2010-11-06 18:36:33 -07:00
|
|
|
(if (and newline-too (looking-at "\n"))
|
|
|
|
(delete-char 1)))
|
2007-10-28 09:18:39 +00:00
|
|
|
|
|
|
|
(defun gnus-bookmark-get-details (bmk-name details-list)
|
|
|
|
"Get details for a Gnus BMK-NAME depending on DETAILS-LIST."
|
|
|
|
(let ((details (cadr (assoc bmk-name gnus-bookmark-alist))))
|
|
|
|
(mapconcat
|
|
|
|
(lambda (info)
|
|
|
|
(cdr (assoc info details)))
|
|
|
|
details-list " | ")))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-bmenu-hide-infos (&optional force)
|
|
|
|
"Hide infos in bmenu, maybe FORCE."
|
|
|
|
(if (and (not force) gnus-bookmark-bmenu-toggle-infos)
|
|
|
|
;; nothing to hide if above is nil
|
|
|
|
(save-excursion
|
|
|
|
(save-window-excursion
|
|
|
|
(goto-char (point-min))
|
|
|
|
(forward-line 2)
|
|
|
|
(setq gnus-bookmark-bmenu-hidden-bookmarks
|
|
|
|
(nreverse gnus-bookmark-bmenu-hidden-bookmarks))
|
|
|
|
(save-excursion
|
|
|
|
(goto-char (point-min))
|
|
|
|
(search-forward "Gnus Bookmark")
|
|
|
|
(backward-word 2)
|
|
|
|
(setq gnus-bookmark-bmenu-bookmark-column (current-column)))
|
|
|
|
(save-excursion
|
|
|
|
(let ((inhibit-read-only t))
|
|
|
|
(while gnus-bookmark-bmenu-hidden-bookmarks
|
|
|
|
(move-to-column gnus-bookmark-bmenu-bookmark-column t)
|
|
|
|
(gnus-bookmark-kill-line)
|
|
|
|
(let ((start (point)))
|
|
|
|
(insert (car gnus-bookmark-bmenu-hidden-bookmarks))
|
2016-02-10 15:54:52 +11:00
|
|
|
(if (display-mouse-p)
|
2007-10-28 09:18:39 +00:00
|
|
|
(add-text-properties
|
|
|
|
start
|
|
|
|
(save-excursion (re-search-backward
|
|
|
|
"[^ \t]")
|
|
|
|
(1+ (point)))
|
|
|
|
`(mouse-face highlight
|
|
|
|
follow-link t
|
|
|
|
help-echo
|
|
|
|
,(format "%s: go to this bookmark in other window"
|
2016-02-10 14:42:03 +11:00
|
|
|
'mouse-2)))))
|
2007-10-28 09:18:39 +00:00
|
|
|
(setq gnus-bookmark-bmenu-hidden-bookmarks
|
|
|
|
(cdr gnus-bookmark-bmenu-hidden-bookmarks))
|
|
|
|
(forward-line 1))))))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-bmenu-check-position ()
|
|
|
|
"Return non-nil if on a line with a bookmark.
|
|
|
|
The actual value returned is gnus-bookmark-alist. Else
|
|
|
|
reposition and try again, else return nil."
|
|
|
|
(cond ((< (count-lines (point-min) (point)) 2)
|
|
|
|
(goto-char (point-min))
|
|
|
|
(forward-line 2)
|
|
|
|
gnus-bookmark-alist)
|
|
|
|
((and (bolp) (eobp))
|
|
|
|
(beginning-of-line 0)
|
|
|
|
gnus-bookmark-alist)
|
|
|
|
(t
|
|
|
|
gnus-bookmark-alist)))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-bmenu-bookmark ()
|
|
|
|
"Return a string which is bookmark of this line."
|
|
|
|
(if (gnus-bookmark-bmenu-check-position)
|
|
|
|
(save-excursion
|
|
|
|
(save-window-excursion
|
|
|
|
(goto-char (point-min))
|
|
|
|
(search-forward "Gnus Bookmark")
|
|
|
|
(backward-word 2)
|
|
|
|
(setq gnus-bookmark-bmenu-bookmark-column (current-column)))))
|
|
|
|
(if gnus-bookmark-bmenu-toggle-infos
|
|
|
|
(gnus-bookmark-bmenu-hide-infos))
|
|
|
|
(save-excursion
|
|
|
|
(save-window-excursion
|
|
|
|
(beginning-of-line)
|
|
|
|
(forward-char gnus-bookmark-bmenu-bookmark-column)
|
|
|
|
(prog1
|
|
|
|
(buffer-substring-no-properties (point)
|
|
|
|
(progn
|
|
|
|
(end-of-line)
|
|
|
|
(point)))
|
|
|
|
;; well, this is certainly crystal-clear:
|
|
|
|
(if gnus-bookmark-bmenu-toggle-infos
|
|
|
|
(gnus-bookmark-bmenu-toggle-infos t))))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-show-details (bookmark)
|
|
|
|
"Display the annotation for BOOKMARK in a buffer."
|
|
|
|
(let ((record (gnus-bookmark-get-bookmark-record bookmark))
|
|
|
|
(old-buf (current-buffer))
|
|
|
|
(details gnus-bookmark-bookmark-details)
|
|
|
|
detail)
|
|
|
|
(save-excursion
|
2020-01-10 13:34:59 -05:00
|
|
|
(pop-to-buffer (gnus-get-buffer-create "*Gnus Bookmark Annotation*") t)
|
2007-10-28 09:18:39 +00:00
|
|
|
(erase-buffer)
|
|
|
|
(while details
|
|
|
|
(setq detail (pop details))
|
|
|
|
(unless (equal (cdr (assoc detail record)) "")
|
|
|
|
(insert (symbol-name detail) ": " (cdr (assoc detail record)) "\n")))
|
|
|
|
(goto-char (point-min))
|
|
|
|
(pop-to-buffer old-buf))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-bmenu-show-details ()
|
|
|
|
"Show the annotation for the current bookmark in another window."
|
2021-02-14 14:14:48 +01:00
|
|
|
(interactive nil gnus-bookmark-bmenu-mode)
|
2007-10-28 09:18:39 +00:00
|
|
|
(let ((bookmark (gnus-bookmark-bmenu-bookmark)))
|
|
|
|
(if (gnus-bookmark-bmenu-check-position)
|
|
|
|
(gnus-bookmark-show-details bookmark))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-bmenu-mark ()
|
|
|
|
"Mark bookmark on this line to be displayed by \\<gnus-bookmark-bmenu-mode-map>\\[gnus-bookmark-bmenu-select]."
|
2021-02-14 14:14:48 +01:00
|
|
|
(interactive nil gnus-bookmark-bmenu-mode)
|
2007-10-28 09:18:39 +00:00
|
|
|
(beginning-of-line)
|
|
|
|
(if (gnus-bookmark-bmenu-check-position)
|
|
|
|
(let ((inhibit-read-only t))
|
|
|
|
(delete-char 1)
|
|
|
|
(insert ?>)
|
|
|
|
(forward-line 1)
|
|
|
|
(gnus-bookmark-bmenu-check-position))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-bmenu-unmark (&optional backup)
|
|
|
|
"Cancel all requested operations on bookmark on this line and move down.
|
|
|
|
Optional BACKUP means move up."
|
2021-02-14 14:14:48 +01:00
|
|
|
(interactive "P" gnus-bookmark-bmenu-mode)
|
2007-10-28 09:18:39 +00:00
|
|
|
(beginning-of-line)
|
|
|
|
(if (gnus-bookmark-bmenu-check-position)
|
|
|
|
(progn
|
|
|
|
(let ((inhibit-read-only t))
|
|
|
|
(delete-char 1)
|
|
|
|
;; any flags to reset according to circumstances? How about a
|
|
|
|
;; flag indicating whether this bookmark is being visited?
|
|
|
|
;; well, we don't have this now, so maybe later.
|
|
|
|
(insert " "))
|
|
|
|
(forward-line (if backup -1 1))
|
|
|
|
(gnus-bookmark-bmenu-check-position))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-bmenu-backup-unmark ()
|
|
|
|
"Move up and cancel all requested operations on bookmark on line above."
|
2021-02-14 14:14:48 +01:00
|
|
|
(interactive nil gnus-bookmark-bmenu-mode)
|
2007-10-28 09:18:39 +00:00
|
|
|
(forward-line -1)
|
|
|
|
(if (gnus-bookmark-bmenu-check-position)
|
|
|
|
(progn
|
|
|
|
(gnus-bookmark-bmenu-unmark)
|
|
|
|
(forward-line -1)
|
|
|
|
(gnus-bookmark-bmenu-check-position))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-bmenu-delete ()
|
|
|
|
"Mark Gnus bookmark on this line to be deleted.
|
|
|
|
To carry out the deletions that you've marked, use
|
|
|
|
\\<gnus-bookmark-bmenu-mode-map>\\[gnus-bookmark-bmenu-execute-deletions]."
|
2021-02-14 14:14:48 +01:00
|
|
|
(interactive nil gnus-bookmark-bmenu-mode)
|
2007-10-28 09:18:39 +00:00
|
|
|
(beginning-of-line)
|
|
|
|
(if (gnus-bookmark-bmenu-check-position)
|
|
|
|
(let ((inhibit-read-only t))
|
|
|
|
(delete-char 1)
|
|
|
|
(insert ?D)
|
|
|
|
(forward-line 1)
|
|
|
|
(gnus-bookmark-bmenu-check-position))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-bmenu-delete-backwards ()
|
|
|
|
"Mark bookmark on this line to be deleted, then move up one line.
|
|
|
|
To carry out the deletions that you've marked, use
|
|
|
|
\\<gnus-bookmark-bmenu-mode-map>\\[gnus-bookmark-bmenu-execute-deletions]."
|
2021-02-14 14:14:48 +01:00
|
|
|
(interactive nil gnus-bookmark-bmenu-mode)
|
2007-10-28 09:18:39 +00:00
|
|
|
(gnus-bookmark-bmenu-delete)
|
|
|
|
(forward-line -2)
|
|
|
|
(if (gnus-bookmark-bmenu-check-position)
|
|
|
|
(forward-line 1))
|
|
|
|
(gnus-bookmark-bmenu-check-position))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-bmenu-select ()
|
|
|
|
"Select this line's bookmark; also display bookmarks marked with `>'.
|
|
|
|
You can mark bookmarks with the
|
|
|
|
\\<gnus-bookmark-bmenu-mode-map>\\[gnus-bookmark-bmenu-mark]
|
|
|
|
command."
|
2021-02-14 14:14:48 +01:00
|
|
|
(interactive nil gnus-bookmark-bmenu-mode)
|
2007-10-28 09:18:39 +00:00
|
|
|
(if (gnus-bookmark-bmenu-check-position)
|
|
|
|
(let ((bmrk (gnus-bookmark-bmenu-bookmark))
|
|
|
|
(menu (current-buffer)))
|
|
|
|
(goto-char (point-min))
|
|
|
|
(delete-other-windows)
|
|
|
|
(gnus-bookmark-jump bmrk)
|
|
|
|
(bury-buffer menu))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-bmenu-select-by-mouse (event)
|
2021-02-14 14:14:48 +01:00
|
|
|
(interactive "e" gnus-bookmark-bmenu-mode)
|
2007-10-28 09:18:39 +00:00
|
|
|
(mouse-set-point event)
|
|
|
|
(gnus-bookmark-bmenu-select))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-bmenu-load ()
|
|
|
|
"Load the Gnus bookmark file and rebuild the bookmark menu-buffer."
|
2021-02-14 14:14:48 +01:00
|
|
|
(interactive nil gnus-bookmark-bmenu-mode)
|
2007-10-28 09:18:39 +00:00
|
|
|
(if (gnus-bookmark-bmenu-check-position)
|
|
|
|
(save-excursion
|
|
|
|
(save-window-excursion
|
|
|
|
;; This will call `gnus-bookmark-bmenu-list'
|
|
|
|
(call-interactively 'gnus-bookmark-load)))))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-bmenu-execute-deletions ()
|
|
|
|
"Delete Gnus bookmarks marked with \\<Buffer-menu-mode-map>\\[Buffer-menu-delete] commands."
|
2021-02-14 14:14:48 +01:00
|
|
|
(interactive nil gnus-bookmark-bmenu-mode)
|
2007-10-28 09:18:39 +00:00
|
|
|
(message "Deleting Gnus bookmarks...")
|
|
|
|
(let ((hide-em gnus-bookmark-bmenu-toggle-infos)
|
|
|
|
(o-point (point))
|
|
|
|
(o-str (save-excursion
|
|
|
|
(beginning-of-line)
|
|
|
|
(if (looking-at "^D")
|
|
|
|
nil
|
|
|
|
(buffer-substring
|
|
|
|
(point)
|
|
|
|
(progn (end-of-line) (point))))))
|
|
|
|
(o-col (current-column)))
|
|
|
|
(if hide-em (gnus-bookmark-bmenu-hide-infos))
|
|
|
|
(setq gnus-bookmark-bmenu-toggle-infos nil)
|
|
|
|
(goto-char (point-min))
|
|
|
|
(forward-line 1)
|
|
|
|
(while (re-search-forward "^D" (point-max) t)
|
|
|
|
(gnus-bookmark-delete (gnus-bookmark-bmenu-bookmark) t)) ; pass BATCH arg
|
|
|
|
(gnus-bookmark-bmenu-list)
|
|
|
|
(setq gnus-bookmark-bmenu-toggle-infos hide-em)
|
|
|
|
(if gnus-bookmark-bmenu-toggle-infos
|
|
|
|
(gnus-bookmark-bmenu-toggle-infos t))
|
|
|
|
(if o-str
|
|
|
|
(progn
|
|
|
|
(goto-char (point-min))
|
|
|
|
(search-forward o-str)
|
|
|
|
(beginning-of-line)
|
|
|
|
(forward-char o-col))
|
|
|
|
(goto-char o-point))
|
|
|
|
(beginning-of-line)
|
|
|
|
(gnus-bookmark-write-file)
|
|
|
|
(message "Deleting bookmarks...done")))
|
|
|
|
|
|
|
|
(defun gnus-bookmark-delete (bookmark &optional batch)
|
|
|
|
"Delete BOOKMARK from the bookmark list.
|
|
|
|
Removes only the first instance of a bookmark with that name. If
|
|
|
|
there are one or more other bookmarks with the same name, they will
|
|
|
|
not be deleted. Defaults to the \"current\" bookmark \(that is, the
|
2015-09-17 16:08:20 -07:00
|
|
|
one most recently used in this file, if any).
|
2007-10-28 09:18:39 +00:00
|
|
|
Optional second arg BATCH means don't update the bookmark list buffer,
|
|
|
|
probably because we were called from there."
|
|
|
|
(gnus-bookmark-maybe-load-default-file)
|
|
|
|
(let ((will-go (gnus-bookmark-get-bookmark bookmark)))
|
|
|
|
(setq gnus-bookmark-alist (delq will-go gnus-bookmark-alist)))
|
|
|
|
;; Don't rebuild the list
|
|
|
|
(if batch
|
|
|
|
nil
|
|
|
|
(gnus-bookmark-bmenu-surreptitiously-rebuild-list)))
|
|
|
|
|
|
|
|
(provide 'gnus-bookmark)
|
|
|
|
|
|
|
|
;;; gnus-bookmark.el ends here
|