* bug#5975: 24.0.50; [PATCH]Feature request: bookmarking from gnus article buffer
@ 2010-04-19 17:07 ` Thierry Volpiatto
2010-05-17 14:14 ` Thierry Volpiatto
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Thierry Volpiatto @ 2010-04-19 17:07 UTC (permalink / raw)
To: 5975
[-- Attachment #1: Type: text/plain, Size: 11995 bytes --]
Hi,
actually we can bookmark a gnus mail/news only from summary buffer.
It is useful to be able to bookmark from article buffer and retrieve
position.
Find here a patch attached that fix that.
It is tested i already use it here.
In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.18.9)
of 2010-04-17 on tux
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
configured using `configure '--prefix=/usr' '--build=i686-pc-linux-gnu' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--program-suffix=-emacs-24' '--infodir=/usr/share/info/emacs-24' '--with-sound' '--with-x' '--without-gconf' '--without-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--with-xft' '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=gtk' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-march=i686 -pipe -O2' 'LDFLAGS=-Wl,-O1''
Important settings:
value of $LC_ALL: C
value of $LC_COLLATE: C
value of $LC_CTYPE: fr_FR.UTF-8
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: fr_FR.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
global-undo-tree-mode: t
undo-tree-mode: t
eldoc-mode: t
delete-selection-mode: t
minibuffer-depth-indicate-mode: t
auto-image-file-mode: t
shell-dirtrack-mode: t
show-paren-mode: t
display-battery-mode: t
display-time-mode: t
diff-auto-refine-mode: t
savehist-mode: t
desktop-save-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> C-z p <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <down>
<down> <down> <down> <down> <left> <left> <left> C-z
n <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <f5> a q <tab> <down> <down>
<down> <down> <return> <down> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> p a t c h - 1 0 7 9 6 3 <left>
<left> <left> <left> <left> <left> r <right> <right>
<right> <right> <right> <right> . p a t c h <return>
C-z 5 <up> <up> <up> C-z n <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> M-x r e p o r t <ret
urn>
Recent messages:
[2 times]
Mark set
Quit [2 times]
[2 times]
qpush -> applying Initial-patch
now at: Initial-patch
Revert buffer from file /home/thierry/labo/emacs-hg-qp/lisp/gnus/gnus-sum.el? (y or n)
Exported revision 107963 to /home/thierry/labo/emacs-hg-qp/patch-r107963.patch.
Load-path shadows:
/home/thierry/elisp/lua-mode/lua-mode hides /usr/share/emacs/site-lisp/lua-mode/lua-mode
~/elisp/g-client/json hides /usr/share/emacs/24.0.50/lisp/json
/usr/share/emacs/site-lisp/flim/hex-util hides /usr/share/emacs/24.0.50/lisp/hex-util
/usr/share/emacs/site-lisp/flim/sha1 hides /usr/share/emacs/24.0.50/lisp/sha1
/usr/share/emacs/site-lisp/flim/md4 hides /usr/share/emacs/24.0.50/lisp/md4
/usr/share/emacs/site-lisp/flim/ntlm hides /usr/share/emacs/24.0.50/lisp/net/ntlm
/usr/share/emacs/site-lisp/flim/hmac-def hides /usr/share/emacs/24.0.50/lisp/net/hmac-def
/usr/share/emacs/site-lisp/flim/sasl-digest hides /usr/share/emacs/24.0.50/lisp/net/sasl-digest
/usr/share/emacs/site-lisp/flim/sasl hides /usr/share/emacs/24.0.50/lisp/net/sasl
/usr/share/emacs/site-lisp/flim/hmac-md5 hides /usr/share/emacs/24.0.50/lisp/net/hmac-md5
/usr/share/emacs/site-lisp/flim/sasl-cram hides /usr/share/emacs/24.0.50/lisp/net/sasl-cram
/usr/share/emacs/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/24.0.50/lisp/net/sasl-ntlm
/home/thierry/elisp/emms/lisp/tq hides /usr/share/emacs/24.0.50/lisp/emacs-lisp/tq
Features:
(shadow emacsbug xgit-dvc xgit xgit-annotate dvc-annotate xgit-log
dvc-bookmarks canlock sha1 sha1-el hex-util em-unix em-script em-prompt
em-ls em-hist em-pred em-glob em-dirs em-cmpl em-basic esh-opt em-banner
em-alias esh-var esh-io esh-cmd esh-ext esh-proc esh-groups eshell
esh-module esh-mode help-mode view hl-line flyspell ispell epa-mail
gnus-fun smiley gnus-ml w3m-cookie sb-emacswiki sb-rss url-cache
url-handlers nnrss parse-time nnfolder nndraft nnmh bbdb-gnus bbdb-snarf
nnml starttls mailalias smtpmail qp gnus-agent gnus-srvr gnus-score
score-mode nnvirtual gnus-cache gnus-cite gnus-demon gnus-namazu
gnus-dired nnshimbun shimbun luna eword-encode eword-decode std11 mel
path-util mime-def mcharset mcs-20 mcs-e20 pces pces-e20 pces-20 broken
pcustom poe gnus-bcklg spam spam-stat gnus-uu yenc gnus-alias mail-extr
gnus-msg align conf-mode newcomment vc-rcs xhg-dvc xhg xhg-annotate
xhg-mq xhg-log bzr-core cg-core xdarcs-core xgit-core xhg-core
xmtn-minimal tla smerge-mode dvc-state dvc-config dvc-diff dvc-fileinfo
diff dvc-cmenu dvc-about dvc-version dvc-revlist uniquify align-let
server el-expectations el-mock csv2org iedit eieio zop-to-char wave-list
wave-display wave-client json netrc g g-cus-load elscreen-server
elscreen-dired elscreen-w3m mule-util alist pym static apel-ver product
elscreen undo-tree smallurl mm-url xml-weather rectangle-utils windmove
sdcv woof screenshot auto-document eiv tv-utils eldoc pcvs pcvs-parse
pcvs-info pcvs-defs showtip delsel init-anything-thierry
descbinds-anything anything-ipython ipython executable anything-grep
grep anything-dabbrev-expand dabbrev shell-history anything-complete
anything-show-completion anything-etags anything-match-plugin etags
anything-traverse anything-delicious anything-mercurial anything-config
w3m-bookmark rx anything firefox-protocol bookmark-firefox-handler
bookmark-extensions bookmark install-elisp find-func mb-depth autodoc
ioccur traverselisp thumb-page moz stumpwm-mode cl-info slime-banner
slime-tramp slime-asdf slime-fancy slime-fontifying-fu slime-package-fu
slime-references slime-xref-browser slime-scratch slime-presentations
slime-highlight-edits slime-fuzzy slime-fancy-inspector slime-c-p-c
slime-editing-commands slime-autodoc slime-parse slime-repl slime
apropos hideshow hyperspec thingatpt slime-autoloads bbdb-autoloads
bbdb-gui bbdb-com bbdb boxquote rect image-file tramp-imap tramp-gw
tramp-fish tramp-smb tramp-cache tramp-ftp tramp-cmds tramp shell
tramp-compat trampver newsticker newst-treeview tree-widget
newst-plainview newst-reader newst-ticker newst-backend ledger pcomplete
esh-arg esh-util extview lpr woman man assoc two-column shell-command
em-term term ehelp electric esh-toggle em-xtra dirtrack flymake pdbtrack
pycomplete python-mode info-look ansi-color pymacs no-word regex-tool
whitespace htmlfontify text-translator-load paren battery time dired-tar
compile comint dired-extension image-dired dired-details yaoddmuse
skeleton sgml-mode emms-mpd-config emms-playlist-limit emms-volume
emms-volume-amixer emms-i18n emms-history emms-score emms-stream-info
emms-metaplaylist-mode emms-bookmarks emms-lastfm-client emms-cue
emms-mode-line-icon emms-browser sort emms-playlist-sort
emms-last-played emms-player-xine emms-player-mpd tq emms-playing-time
emms-lyrics emms-url emms-tag-editor emms-mark emms-mode-line emms-cache
emms-info-ogginfo emms-info-mp3info emms-playlist-mode emms-player-vlc
emms-player-mplayer emms-info emms-streams later-do emms-source-playlist
emms-source-file emms-player-simple emms-setup emms emms-compat winner
dvc-init bzr-gnus tla-gnus xgit-gnus xhg-gnus gnus-art mm-uu mml2015
mm-view smime password-cache dig dvc-gnus tla-core pp tla-autoconf
tla-defs dvc-log vc vc-dispatcher dvc-unified dvc-tips dired-x dired-aux
ffap ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult
ediff-init ediff dvc-autoloads dvc-core dvc-lisp dvc-buffers dvc-ui
dvc-register dvc-utils dvc-emacs ewoc dvc-defs dvc-site psvn log-edit
ring pcvs-util add-log diff-mode lisppaste-extension lisppaste xml-rpc
url-http tls url-auth url-gw xml htmlize-hack htmlize muse-colors
muse-docbook muse-texinfo texnfo-upd texinfo muse-latex muse-html
muse-xml-common muse-wiki cus-edit cus-start cus-load muse-publish
muse-project muse-protocols muse-regexps muse muse-nested-tags muse-mode
muse-autoloads org-config-thierry cal-china lunar solar cal-dst
cal-bahai cal-islam cal-hebrew holidays hol-loaddefs vc-hg org-wl
org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs
org-html org-exp org-exp-blocks org-info org-gnus org-docview org-bibtex
org-bbdb org-agenda appt diary-lib diary-loaddefs cal-menu calendar
cal-loaddefs org-annotation-helper url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-util url-parse url-vars mailcap
remember org-remember org-datetree org byte-opt bytecomp byte-compile
org-footnote org-src org-list org-faces org-compat org-entities org-macs
noutline outline config-w3m w3m browse-url doc-view jka-compr image-mode
timezone w3m-hist w3m-fb w3m-ems w3m-ccl ccl w3m-favicon w3m-image
w3m-proc w3m-util mime-w3m w3m-load savehist epa-file epa derived epg
epg-config auth-source dired gnus-async nntp gnus-sum nnoo gnus-group
time-date gnus-undo nnmail mail-source format-spec gnus-start gnus-spec
gnus-int gnus-range message sendmail regexp-opt rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems
nnheader gnus-util mail-utils mm-util mail-prsvr wid-edit info easymenu
usage-memo desktop midnight punycode idna mybest-theme edmacro kmacro
eev-thierry iterator eev-all eev-mini-steps eev-browse-url eev-langs
eev-compose eev-glyphs disp-table eev-insert eev-steps eev-bounded eev
easy-mmode advice help-fns advice-preload cl cl-19 site-gentoo w3m-wget
preview-latex tex-site auto-loads tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset
image fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process dbusbind
font-render-setting gtk x-toolkit x multi-tty emacs)
--
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch-r107963.patch --]
[-- Type: text/x-patch, Size: 6253 bytes --]
# HG changeset patch
# User Thierry Volpiatto <thierry.volpiatto@gmail.com>
# Date 1271696126 -7200
# Node ID 450b24a81b9dd4f91e50b2f82cb0fcc81503f70f
# Parent 00b16f9f52adab5048a905c78953c49bdfa2e9a2
Allow to bookmark a mail from a Gnus article buffer and retrieve position.
* lisp/bookmark.el (bookmark-make-record-default) Avoid recording *-context-string when not needed.
* lisp/gnus/gnus-art.el set `bookmark-make-record-function' local.
* lisp/gnus/gnus-sum.el (gnus-summary-bookmark-make-record) allow recording from article buffer.
(gnus-summary-bookmark-jump) maybe jump to article buffer.
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -528,26 +528,30 @@
(setq bookmark-current-bookmark stripped-name)
(bookmark-bmenu-surreptitiously-rebuild-list)))
-(defun bookmark-make-record-default (&optional point-only)
+(defun bookmark-make-record-default (&optional point-only pos read-only)
"Return the record describing the location of a new bookmark.
Must be at the correct position in the buffer in which the bookmark is
being set.
If POINT-ONLY is non-nil, then only return the subset of the
-record that pertains to the location within the buffer."
+record that pertains to the location within the buffer.
+If READ-ONLY is non-nil that's mean buffer is read-only and
+there is no need to record front/rear-context-string, position is enough."
`(,@(unless point-only `((filename . ,(bookmark-buffer-file-name))))
- (front-context-string
- . ,(if (>= (- (point-max) (point)) bookmark-search-size)
- (buffer-substring-no-properties
- (point)
- (+ (point) bookmark-search-size))
- nil))
- (rear-context-string
- . ,(if (>= (- (point) (point-min)) bookmark-search-size)
- (buffer-substring-no-properties
- (point)
- (- (point) bookmark-search-size))
- nil))
- (position . ,(point))))
+ ,@(unless read-only `((front-context-string
+ . ,(if (>= (- (point-max) (point))
+ bookmark-search-size)
+ (buffer-substring-no-properties
+ (point)
+ (+ (point) bookmark-search-size))
+ nil))))
+ ,@(unless read-only `((rear-context-string
+ . ,(if (>= (- (point) (point-min))
+ bookmark-search-size)
+ (buffer-substring-no-properties
+ (point)
+ (- (point) bookmark-search-size))
+ nil))))
+ (position . ,(or pos (point)))))
\f
;;; File format stuff
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -4446,6 +4446,8 @@
(make-local-variable 'gnus-article-image-alist)
(make-local-variable 'gnus-article-charset)
(make-local-variable 'gnus-article-ignored-charsets)
+ (set (make-local-variable 'bookmark-make-record-function)
+ 'gnus-summary-bookmark-make-record)
;; Prevent Emacs 22 from displaying non-break space with `nobreak-space'
;; face.
(set (make-local-variable 'nobreak-char-display) nil)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -12648,18 +12648,24 @@
(defun gnus-summary-bookmark-make-record ()
"Make a bookmark entry for a Gnus summary buffer."
- (unless (and (derived-mode-p 'gnus-summary-mode) gnus-article-current)
- (error "Please retry from the Gnus summary buffer")) ;[1]
- (let* ((subject (elt (gnus-summary-article-header) 1))
- (grp (car gnus-article-current))
- (art (cdr gnus-article-current))
- (head (gnus-summary-article-header art))
- (id (mail-header-id head)))
- `(,subject
- ,@(bookmark-make-record-default 'point-only)
- (location . ,(format "Gnus %s:%d:%s" grp art id))
- (group . ,grp) (article . ,art)
- (message-id . ,id) (handler . gnus-summary-bookmark-jump))))
+ (let (pos buf)
+ (unless (and (derived-mode-p 'gnus-summary-mode) gnus-article-current)
+ (save-restriction ; FIXME is it necessary to widen?
+ (widen) (setq pos (point))) ; Set position in gnus-article buffer.
+ (setq buf "art") ; We are recording bookmark from article buffer.
+ (gnus-article-show-summary)) ; Go back in summary buffer.
+ ;; We are now recording bookmark from summary buffer.
+ (unless buf (setq buf "sum"))
+ (let* ((subject (elt (gnus-summary-article-header) 1))
+ (grp (car gnus-article-current))
+ (art (cdr gnus-article-current))
+ (head (gnus-summary-article-header art))
+ (id (mail-header-id head)))
+ `(,subject
+ ,@(bookmark-make-record-default 'point-only pos 'read-only)
+ (location . ,(format "Gnus-%s %s:%d:%s" buf grp art id))
+ (group . ,grp) (article . ,art)
+ (message-id . ,id) (handler . gnus-summary-bookmark-jump)))))
;;;###autoload
(defun gnus-summary-bookmark-jump (bookmark)
@@ -12667,10 +12673,18 @@
BOOKMARK is a bookmark name or a bookmark record."
(let ((group (bookmark-prop-get bookmark 'group))
(article (bookmark-prop-get bookmark 'article))
- (id (bookmark-prop-get bookmark 'message-id)))
+ (id (bookmark-prop-get bookmark 'message-id))
+ (buf (car (split-string (bookmark-prop-get bookmark 'location)))))
(gnus-fetch-group group (list article))
(gnus-summary-insert-cached-articles)
(gnus-summary-goto-article id nil 'force)
+ ;; FIXME we have to wait article buffer is ready (only large buffer)
+ ;; Is there a better solution to know that?
+ ;; If we don't wait `bookmark-default-handler' will have no chance
+ ;; to set position. However there is no error, just wrong pos.
+ (sit-for 1)
+ (when (string= buf "Gnus-art")
+ (other-window 1))
(bookmark-default-handler
`(""
(buffer . ,(current-buffer))
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#5975: 24.0.50; [PATCH]Feature request: bookmarking from gnus article buffer
2010-04-19 17:07 ` bug#5975: 24.0.50; [PATCH]Feature request: bookmarking from gnus article buffer Thierry Volpiatto
@ 2010-05-17 14:14 ` Thierry Volpiatto
2010-07-13 21:46 ` bug#5975: Bazaar branch where this is being fixed Karl Fogel
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Thierry Volpiatto @ 2010-05-17 14:14 UTC (permalink / raw)
To: bug-gnu-emacs
In the patch sent here, C-w is not working, i have fixed that here.
See bookmark-extensions.el
http://mercurial.intuxication.org/hg/emacs-bookmark-extension/
I can send another patch if somebody is interested, in this case contact
me.
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
> Hi,
> actually we can bookmark a gnus mail/news only from summary buffer.
> It is useful to be able to bookmark from article buffer and retrieve
> position.
> Find here a patch attached that fix that.
> It is tested i already use it here.
>
>
> In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.18.9)
> of 2010-04-17 on tux
> Windowing system distributor `The X.Org Foundation', version 11.0.10706000
> configured using `configure '--prefix=/usr' '--build=i686-pc-linux-gnu' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--program-suffix=-emacs-24' '--infodir=/usr/share/info/emacs-24' '--with-sound' '--with-x' '--without-gconf' '--without-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--with-xft' '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=gtk' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-march=i686 -pipe -O2' 'LDFLAGS=-Wl,-O1''
>
> Important settings:
> value of $LC_ALL: C
> value of $LC_COLLATE: C
> value of $LC_CTYPE: fr_FR.UTF-8
> value of $LC_MESSAGES: nil
> value of $LC_MONETARY: nil
> value of $LC_NUMERIC: nil
> value of $LC_TIME: nil
> value of $LANG: fr_FR.UTF-8
> value of $XMODIFIERS: nil
> locale-coding-system: utf-8-unix
> default enable-multibyte-characters: t
>
> Major mode: Emacs-Lisp
>
> Minor modes in effect:
> global-undo-tree-mode: t
> undo-tree-mode: t
> eldoc-mode: t
> delete-selection-mode: t
> minibuffer-depth-indicate-mode: t
> auto-image-file-mode: t
> shell-dirtrack-mode: t
> show-paren-mode: t
> display-battery-mode: t
> display-time-mode: t
> diff-auto-refine-mode: t
> savehist-mode: t
> desktop-save-mode: t
> tooltip-mode: t
> mouse-wheel-mode: t
> file-name-shadow-mode: t
> global-font-lock-mode: t
> font-lock-mode: t
> auto-encryption-mode: t
> auto-compression-mode: t
> line-number-mode: t
> transient-mark-mode: t
>
> Recent input:
> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
> <up> <up> <up> C-z p <up> <up> <up> <up> <up> <up>
> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <down>
> <down> <down> <down> <down> <left> <left> <left> C-z
> n <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <up> <up> <up> <up> <up> <up> <up> <up> <up>
> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
> <up> <up> <up> <up> <up> <f5> a q <tab> <down> <down>
> <down> <down> <return> <down> <right> <right> <right>
> <right> <right> <right> <right> <right> <right> <right>
> <right> <right> <right> <right> <right> <right> <right>
> <right> <right> <right> <right> <right> <right> <right>
> <right> <right> <right> <right> <right> <right> <right>
> <right> <right> <right> <right> <right> <right> <right>
> <right> <right> <right> <right> <right> <right> <backspace>
> <backspace> <backspace> <backspace> <backspace> <backspace>
> <backspace> <backspace> <backspace> <backspace> <backspace>
> <backspace> <backspace> p a t c h - 1 0 7 9 6 3 <left>
> <left> <left> <left> <left> <left> r <right> <right>
> <right> <right> <right> <right> . p a t c h <return>
> C-z 5 <up> <up> <up> C-z n <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <up> <up> <up> <up>
> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
> <up> <up> <up> <up> <up> <up> M-x r e p o r t <ret
> urn>
>
> Recent messages:
> [2 times]
> Mark set
> Quit [2 times]
> [2 times]
> qpush -> applying Initial-patch
> now at: Initial-patch
> Revert buffer from file /home/thierry/labo/emacs-hg-qp/lisp/gnus/gnus-sum.el? (y or n)
>
> Exported revision 107963 to /home/thierry/labo/emacs-hg-qp/patch-r107963.patch.
>
>
> Load-path shadows:
> /home/thierry/elisp/lua-mode/lua-mode hides /usr/share/emacs/site-lisp/lua-mode/lua-mode
> ~/elisp/g-client/json hides /usr/share/emacs/24.0.50/lisp/json
> /usr/share/emacs/site-lisp/flim/hex-util hides /usr/share/emacs/24.0.50/lisp/hex-util
> /usr/share/emacs/site-lisp/flim/sha1 hides /usr/share/emacs/24.0.50/lisp/sha1
> /usr/share/emacs/site-lisp/flim/md4 hides /usr/share/emacs/24.0.50/lisp/md4
> /usr/share/emacs/site-lisp/flim/ntlm hides /usr/share/emacs/24.0.50/lisp/net/ntlm
> /usr/share/emacs/site-lisp/flim/hmac-def hides /usr/share/emacs/24.0.50/lisp/net/hmac-def
> /usr/share/emacs/site-lisp/flim/sasl-digest hides /usr/share/emacs/24.0.50/lisp/net/sasl-digest
> /usr/share/emacs/site-lisp/flim/sasl hides /usr/share/emacs/24.0.50/lisp/net/sasl
> /usr/share/emacs/site-lisp/flim/hmac-md5 hides /usr/share/emacs/24.0.50/lisp/net/hmac-md5
> /usr/share/emacs/site-lisp/flim/sasl-cram hides /usr/share/emacs/24.0.50/lisp/net/sasl-cram
> /usr/share/emacs/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/24.0.50/lisp/net/sasl-ntlm
> /home/thierry/elisp/emms/lisp/tq hides /usr/share/emacs/24.0.50/lisp/emacs-lisp/tq
>
> Features:
> (shadow emacsbug xgit-dvc xgit xgit-annotate dvc-annotate xgit-log
> dvc-bookmarks canlock sha1 sha1-el hex-util em-unix em-script em-prompt
> em-ls em-hist em-pred em-glob em-dirs em-cmpl em-basic esh-opt em-banner
> em-alias esh-var esh-io esh-cmd esh-ext esh-proc esh-groups eshell
> esh-module esh-mode help-mode view hl-line flyspell ispell epa-mail
> gnus-fun smiley gnus-ml w3m-cookie sb-emacswiki sb-rss url-cache
> url-handlers nnrss parse-time nnfolder nndraft nnmh bbdb-gnus bbdb-snarf
> nnml starttls mailalias smtpmail qp gnus-agent gnus-srvr gnus-score
> score-mode nnvirtual gnus-cache gnus-cite gnus-demon gnus-namazu
> gnus-dired nnshimbun shimbun luna eword-encode eword-decode std11 mel
> path-util mime-def mcharset mcs-20 mcs-e20 pces pces-e20 pces-20 broken
> pcustom poe gnus-bcklg spam spam-stat gnus-uu yenc gnus-alias mail-extr
> gnus-msg align conf-mode newcomment vc-rcs xhg-dvc xhg xhg-annotate
> xhg-mq xhg-log bzr-core cg-core xdarcs-core xgit-core xhg-core
> xmtn-minimal tla smerge-mode dvc-state dvc-config dvc-diff dvc-fileinfo
> diff dvc-cmenu dvc-about dvc-version dvc-revlist uniquify align-let
> server el-expectations el-mock csv2org iedit eieio zop-to-char wave-list
> wave-display wave-client json netrc g g-cus-load elscreen-server
> elscreen-dired elscreen-w3m mule-util alist pym static apel-ver product
> elscreen undo-tree smallurl mm-url xml-weather rectangle-utils windmove
> sdcv woof screenshot auto-document eiv tv-utils eldoc pcvs pcvs-parse
> pcvs-info pcvs-defs showtip delsel init-anything-thierry
> descbinds-anything anything-ipython ipython executable anything-grep
> grep anything-dabbrev-expand dabbrev shell-history anything-complete
> anything-show-completion anything-etags anything-match-plugin etags
> anything-traverse anything-delicious anything-mercurial anything-config
> w3m-bookmark rx anything firefox-protocol bookmark-firefox-handler
> bookmark-extensions bookmark install-elisp find-func mb-depth autodoc
> ioccur traverselisp thumb-page moz stumpwm-mode cl-info slime-banner
> slime-tramp slime-asdf slime-fancy slime-fontifying-fu slime-package-fu
> slime-references slime-xref-browser slime-scratch slime-presentations
> slime-highlight-edits slime-fuzzy slime-fancy-inspector slime-c-p-c
> slime-editing-commands slime-autodoc slime-parse slime-repl slime
> apropos hideshow hyperspec thingatpt slime-autoloads bbdb-autoloads
> bbdb-gui bbdb-com bbdb boxquote rect image-file tramp-imap tramp-gw
> tramp-fish tramp-smb tramp-cache tramp-ftp tramp-cmds tramp shell
> tramp-compat trampver newsticker newst-treeview tree-widget
> newst-plainview newst-reader newst-ticker newst-backend ledger pcomplete
> esh-arg esh-util extview lpr woman man assoc two-column shell-command
> em-term term ehelp electric esh-toggle em-xtra dirtrack flymake pdbtrack
> pycomplete python-mode info-look ansi-color pymacs no-word regex-tool
> whitespace htmlfontify text-translator-load paren battery time dired-tar
> compile comint dired-extension image-dired dired-details yaoddmuse
> skeleton sgml-mode emms-mpd-config emms-playlist-limit emms-volume
> emms-volume-amixer emms-i18n emms-history emms-score emms-stream-info
> emms-metaplaylist-mode emms-bookmarks emms-lastfm-client emms-cue
> emms-mode-line-icon emms-browser sort emms-playlist-sort
> emms-last-played emms-player-xine emms-player-mpd tq emms-playing-time
> emms-lyrics emms-url emms-tag-editor emms-mark emms-mode-line emms-cache
> emms-info-ogginfo emms-info-mp3info emms-playlist-mode emms-player-vlc
> emms-player-mplayer emms-info emms-streams later-do emms-source-playlist
> emms-source-file emms-player-simple emms-setup emms emms-compat winner
> dvc-init bzr-gnus tla-gnus xgit-gnus xhg-gnus gnus-art mm-uu mml2015
> mm-view smime password-cache dig dvc-gnus tla-core pp tla-autoconf
> tla-defs dvc-log vc vc-dispatcher dvc-unified dvc-tips dired-x dired-aux
> ffap ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult
> ediff-init ediff dvc-autoloads dvc-core dvc-lisp dvc-buffers dvc-ui
> dvc-register dvc-utils dvc-emacs ewoc dvc-defs dvc-site psvn log-edit
> ring pcvs-util add-log diff-mode lisppaste-extension lisppaste xml-rpc
> url-http tls url-auth url-gw xml htmlize-hack htmlize muse-colors
> muse-docbook muse-texinfo texnfo-upd texinfo muse-latex muse-html
> muse-xml-common muse-wiki cus-edit cus-start cus-load muse-publish
> muse-project muse-protocols muse-regexps muse muse-nested-tags muse-mode
> muse-autoloads org-config-thierry cal-china lunar solar cal-dst
> cal-bahai cal-islam cal-hebrew holidays hol-loaddefs vc-hg org-wl
> org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs
> org-html org-exp org-exp-blocks org-info org-gnus org-docview org-bibtex
> org-bbdb org-agenda appt diary-lib diary-loaddefs cal-menu calendar
> cal-loaddefs org-annotation-helper url url-proxy url-privacy url-expand
> url-methods url-history url-cookie url-util url-parse url-vars mailcap
> remember org-remember org-datetree org byte-opt bytecomp byte-compile
> org-footnote org-src org-list org-faces org-compat org-entities org-macs
> noutline outline config-w3m w3m browse-url doc-view jka-compr image-mode
> timezone w3m-hist w3m-fb w3m-ems w3m-ccl ccl w3m-favicon w3m-image
> w3m-proc w3m-util mime-w3m w3m-load savehist epa-file epa derived epg
> epg-config auth-source dired gnus-async nntp gnus-sum nnoo gnus-group
> time-date gnus-undo nnmail mail-source format-spec gnus-start gnus-spec
> gnus-int gnus-range message sendmail regexp-opt rfc822 mml mml-sec
> mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
> ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems
> nnheader gnus-util mail-utils mm-util mail-prsvr wid-edit info easymenu
> usage-memo desktop midnight punycode idna mybest-theme edmacro kmacro
> eev-thierry iterator eev-all eev-mini-steps eev-browse-url eev-langs
> eev-compose eev-glyphs disp-table eev-insert eev-steps eev-bounded eev
> easy-mmode advice help-fns advice-preload cl cl-19 site-gentoo w3m-wget
> preview-latex tex-site auto-loads tooltip ediff-hook vc-hooks
> lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset
> image fringe lisp-mode register page menu-bar rfn-eshadow timer select
> scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
> frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
> tai-viet lao korean japanese hebrew greek romanian slovak czech european
> ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
> simple abbrev loaddefs button minibuffer faces cus-face files
> text-properties overlay md5 base64 format env code-pages mule custom
> widget hashtable-print-readable backquote make-network-process dbusbind
> font-render-setting gtk x-toolkit x multi-tty emacs)
--
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#5975: Base patch for bug #5975 (bookmarking from Gnus Article buffer).
[not found] ` <87eifpegqx.fsf@tux.homenetwork>
[not found] ` <87k4ozdq6b.fsf_-_@red-bean.com>
@ 2010-07-13 21:31 ` Karl Fogel
1 sibling, 0 replies; 11+ messages in thread
From: Karl Fogel @ 2010-07-13 21:31 UTC (permalink / raw)
To: emacs-devel; +Cc: 5975, Thierry Volpiatto
I have a branch that prepares the way for setting bookmarks in Gnus
Article buffers, based on Thierry's patch in bug #5975.
I'm not sure where to apply this. Is pushing changes to trunk is okay
right now? Starting from [1] and [2], I didn't find any notice that we
are in feature freeze, but I'm pretty sure last time I pushed it turned
out to be a mistake and that I should not have pushed to trunk.
Independently of the above, Thierry, note I made some changes to your
patch. You used (or kept) parameter names `point-only' and `read-only';
I changed those to `no-file' and `no-context', to describe what they are
actually doing (whether the buffer is read-only or not is irrelevant to
whether one wants the front/rear context strings in bookmark record). I
also fixed up the doc string to mention your new POSN parameter, which I
moved to the end of the parameter list. (Don't worry, I will adjust the
gnus-sum.el patch as needed when the time comes.)
I have not (yet) included your changes to gnus/gnus-art.el and
gnus/gnus-sum.el, which finish the new functionality. Two reasons:
1. You said in the bug that you fixed C-w later. Could you provide
that patch, please?
2. I'm not sure whether it's okay to commit significant code changes
under gnus/, since the master is maintained outside the Emacs tree.
If it is okay, then I am happy to apply your change (plus the C-w
fix). I did test it, and it worked, except for C-w of course.
Anyone who has comments or answers re the above, please chime in.
Just for reference, the current (preparatory) patch is below. I will
follow up separately with the gnus/* patch, so it's in the archives.
Thanks for the patch, Thierry. We're getting close.
-Karl
[1] http://www.gnu.org/software/emacs/
[2] http://savannah.gnu.org/projects/emacs
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog 2010-07-13 10:41:49 +0000
+++ lisp/ChangeLog 2010-07-13 21:19:42 +0000
@@ -1,3 +1,26 @@
+2010-07-13 Karl Fogel <kfogel@red-bean.com>
+
+ Prepare the way for setting bookmarks in Gnus article buffers.
+
+ * lisp/bookmark.el (bookmark-make-record-default): Allow unneeded
+ information to be omitted from the record. Based on part of a
+ patch by Thierry Volpiatto (Bug#5975).
+
+ Adjust declarations and calls:
+
+ * info.el (bookmark-make-record-default): Adjust declaration.
+ (Info-bookmark-make-record): Adjust call.
+
+ * woman.el (bookmark-make-record-default): Adjust declaration.
+ (woman-bookmark-make-record): Adjust call.
+
+ * man.el (bookmark-make-record-default): Adjust declaration.
+ (Man-bookmark-make-record): Adjust call.
+
+ * image-mode.el (bookmark-make-record-default): Adjust declaration.
+
+ * doc-view.el (bookmark-make-record-default): Adjust declaration.
+
2010-07-13 Adrian Robert <Adrian.B.Robert@gmail.com>
* term/ns-win.el: Bind M-~ to 'ns-prev-frame (due to Matthew
=== modified file 'lisp/bookmark.el'
--- lisp/bookmark.el 2010-07-10 18:52:53 +0000
+++ lisp/bookmark.el 2010-07-13 21:19:42 +0000
@@ -528,26 +528,36 @@
(setq bookmark-current-bookmark stripped-name)
(bookmark-bmenu-surreptitiously-rebuild-list)))
-(defun bookmark-make-record-default (&optional point-only)
+(defun bookmark-make-record-default (&optional no-file no-context posn)
"Return the record describing the location of a new bookmark.
-Must be at the correct position in the buffer in which the bookmark is
-being set.
-If POINT-ONLY is non-nil, then only return the subset of the
-record that pertains to the location within the buffer."
- `(,@(unless point-only `((filename . ,(bookmark-buffer-file-name))))
- (front-context-string
- . ,(if (>= (- (point-max) (point)) bookmark-search-size)
- (buffer-substring-no-properties
- (point)
- (+ (point) bookmark-search-size))
- nil))
- (rear-context-string
- . ,(if (>= (- (point) (point-min)) bookmark-search-size)
- (buffer-substring-no-properties
- (point)
- (- (point) bookmark-search-size))
- nil))
- (position . ,(point))))
+Point should be at the buffer in which the bookmark is being set,
+and normally should be at the position where the bookmark is desired,
+but see the optional arguments for other possibilities.
+
+If NO-FILE is non-nil, then only return the subset of the
+record that pertains to the location within the buffer, leaving off
+the part that records the filename.
+
+If NO-CONTEXT is non-nil, do not include the front- and rear-context
+strings in the record -- the position is enough.
+
+If POSN is non-nil, record POSN as the point instead of `(point)'."
+ `(,@(unless no-file `((filename . ,(bookmark-buffer-file-name))))
+ ,@(unless no-context `((front-context-string
+ . ,(if (>= (- (point-max) (point))
+ bookmark-search-size)
+ (buffer-substring-no-properties
+ (point)
+ (+ (point) bookmark-search-size))
+ nil))))
+ ,@(unless no-context `((rear-context-string
+ . ,(if (>= (- (point) (point-min))
+ bookmark-search-size)
+ (buffer-substring-no-properties
+ (point)
+ (- (point) bookmark-search-size))
+ nil))))
+ (position . ,(or posn (point)))))
\f
;;; File format stuff
=== modified file 'lisp/doc-view.el'
--- lisp/doc-view.el 2010-02-16 14:35:45 +0000
+++ lisp/doc-view.el 2010-07-13 21:19:42 +0000
@@ -1349,8 +1349,8 @@
;;;; Bookmark integration
-(declare-function bookmark-make-record-default "bookmark"
- (&optional point-only))
+(declare-function bookmark-make-record-default
+ "bookmark" (&optional no-file no-context posn))
(declare-function bookmark-prop-get "bookmark" (bookmark prop))
(declare-function bookmark-default-handler "bookmark" (bmk))
=== modified file 'lisp/gnus/ChangeLog'
--- lisp/gnus/ChangeLog 2010-06-22 16:48:53 +0000
+++ lisp/gnus/ChangeLog 2010-07-13 21:19:42 +0000
@@ -1,3 +1,8 @@
+2010-07-13 Karl Fogel <kfogel@red-bean.com>
+
+ * gnus/gnus-sum.el (bookmark-make-record-default): Adjust
+ declaration, based on changes in bookmark.el.
+
2010-06-22 Mark A. Hershberger <mah@everybody.org>
* mm-url.el (mm-url-encode-multipart-form-data): New function to handle
=== modified file 'lisp/gnus/gnus-sum.el'
--- lisp/gnus/gnus-sum.el 2010-06-10 00:30:13 +0000
+++ lisp/gnus/gnus-sum.el 2010-07-13 21:19:42 +0000
@@ -12621,7 +12621,8 @@
(gnus-summary-position-point)))
;;; Bookmark support for Gnus.
-(declare-function bookmark-make-record-default "bookmark" (&optional pos-only))
+(declare-function bookmark-make-record-default
+ "bookmark" (&optional no-file no-context posn))
(declare-function bookmark-prop-get "bookmark" (bookmark prop))
(declare-function bookmark-default-handler "bookmark" (bmk))
(declare-function bookmark-get-bookmark-record "bookmark" (bmk))
=== modified file 'lisp/image-mode.el'
--- lisp/image-mode.el 2010-06-14 03:19:46 +0000
+++ lisp/image-mode.el 2010-07-13 21:19:42 +0000
@@ -516,8 +516,8 @@
\f
;;; Support for bookmark.el
-(declare-function bookmark-make-record-default "bookmark"
- (&optional point-only))
+(declare-function bookmark-make-record-default
+ "bookmark" (&optional no-file no-context posn))
(declare-function bookmark-prop-get "bookmark" (bookmark prop))
(declare-function bookmark-default-handler "bookmark" (bmk))
=== modified file 'lisp/info.el'
--- lisp/info.el 2010-06-17 20:56:17 +0000
+++ lisp/info.el 2010-07-13 21:19:42 +0000
@@ -4901,7 +4901,8 @@
'(Info-mode . Info-restore-desktop-buffer))
;;;; Bookmark support
-(declare-function bookmark-make-record-default "bookmark" (&optional pos-only))
+(declare-function bookmark-make-record-default
+ "bookmark" (&optional no-file no-context posn))
(declare-function bookmark-prop-get "bookmark" (bookmark prop))
(declare-function bookmark-default-handler "bookmark" (bmk))
(declare-function bookmark-get-bookmark-record "bookmark" (bmk))
@@ -4910,7 +4911,7 @@
"This implements the `bookmark-make-record-function' type (which see)
for Info nodes."
`(,Info-current-node
- ,@(bookmark-make-record-default 'point-only)
+ ,@(bookmark-make-record-default 'no-file)
(filename . ,Info-current-file)
(info-node . ,Info-current-node)
(handler . Info-bookmark-jump)))
=== modified file 'lisp/man.el'
--- lisp/man.el 2010-06-01 02:34:49 +0000
+++ lisp/man.el 2010-07-13 21:19:42 +0000
@@ -1674,7 +1674,8 @@
complete-path))
;;; Bookmark Man Support
-(declare-function bookmark-make-record-default "bookmark" (&optional pos-only))
+(declare-function bookmark-make-record-default
+ "bookmark" (&optional no-file no-context posn))
(declare-function bookmark-prop-get "bookmark" (bookmark prop))
(declare-function bookmark-default-handler "bookmark" (bmk))
(declare-function bookmark-get-bookmark-record "bookmark" (bmk))
@@ -1691,7 +1692,7 @@
(defun Man-bookmark-make-record ()
"Make a bookmark entry for a Man buffer."
`(,(Man-default-bookmark-title)
- ,@(bookmark-make-record-default 'point-only)
+ ,@(bookmark-make-record-default 'no-file)
(location . ,(concat "man " Man-arguments))
(man-args . ,Man-arguments)
(handler . Man-bookmark-jump)))
=== modified file 'lisp/woman.el'
--- lisp/woman.el 2010-05-25 02:11:08 +0000
+++ lisp/woman.el 2010-07-13 21:19:42 +0000
@@ -4521,7 +4521,8 @@
nil) ; for woman-file-readable-p etc.
;;; Bookmark Woman support.
-(declare-function bookmark-make-record-default "bookmark" (&optional pos-only))
+(declare-function bookmark-make-record-default
+ "bookmark" (&optional no-file no-context posn))
(declare-function bookmark-prop-get "bookmark" (bookmark prop))
(declare-function bookmark-default-handler "bookmark" (bmk))
(declare-function bookmark-get-bookmark-record "bookmark" (bmk))
@@ -4532,7 +4533,7 @@
(defun woman-bookmark-make-record ()
"Make a bookmark entry for a Woman buffer."
`(,(Man-default-bookmark-title)
- ,@(bookmark-make-record-default 'point-only)
+ ,@(bookmark-make-record-default 'no-file)
(location . ,(concat "woman " woman-last-file-name))
;; Use the same form as man's bookmarks, as much as possible.
(man-args . ,woman-last-file-name)
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#5975: Base patch for bug #5975 (bookmarking from Gnus Article buffer).
[not found] ` <87k4ozdq6b.fsf_-_@red-bean.com>
2010-04-19 17:07 ` bug#5975: 24.0.50; [PATCH]Feature request: bookmarking from gnus article buffer Thierry Volpiatto
@ 2010-07-13 21:41 ` Karl Fogel
[not found] ` <vi7hkzx8mj.fsf@fencepost.gnu.org>
2 siblings, 0 replies; 11+ messages in thread
From: Karl Fogel @ 2010-07-13 21:41 UTC (permalink / raw)
To: emacs-devel; +Cc: 5975, Thierry Volpiatto
Karl Fogel <kfogel@red-bean.com> writes:
>Just for reference, the current (preparatory) patch is below. I will
>follow up separately with the gnus/* patch, so it's in the archives.
Here's that patch (still needs the C-w fix referred to in the bug, though).
=== modified file 'lisp/gnus/ChangeLog'
--- lisp/gnus/ChangeLog 2010-07-13 21:20:34 +0000
+++ lisp/gnus/ChangeLog 2010-07-13 21:39:19 +0000
@@ -1,5 +1,16 @@
2010-07-13 Karl Fogel <kfogel@red-bean.com>
+ Allow bookmarks to be set from Gnus Article buffers.
+ Based on a patch by Thierry Volpiatto (Bug #5975).
+
+ * gnus-art.el (bookmark-make-record-function): New local variable.
+
+ * gnus-sum.el (gnus-summary-bookmark-make-record): Allow setting
+ from article buffer.
+ (gnus-summary-bookmark-jump): Maybe jump to article buffer.
+
+2010-07-13 Karl Fogel <kfogel@red-bean.com>
+
* gnus/gnus-sum.el (bookmark-make-record-default): Adjust
declaration, based on changes in bookmark.el.
=== modified file 'lisp/gnus/gnus-art.el'
--- lisp/gnus/gnus-art.el 2010-06-10 05:33:55 +0000
+++ lisp/gnus/gnus-art.el 2010-07-13 21:39:19 +0000
@@ -4452,6 +4452,8 @@
(make-local-variable 'gnus-article-image-alist)
(make-local-variable 'gnus-article-charset)
(make-local-variable 'gnus-article-ignored-charsets)
+ (set (make-local-variable 'bookmark-make-record-function)
+ 'gnus-summary-bookmark-make-record)
;; Prevent Emacs 22 from displaying non-break space with `nobreak-space'
;; face.
(set (make-local-variable 'nobreak-char-display) nil)
=== modified file 'lisp/gnus/gnus-sum.el'
--- lisp/gnus/gnus-sum.el 2010-07-13 21:20:34 +0000
+++ lisp/gnus/gnus-sum.el 2010-07-13 21:39:19 +0000
@@ -12629,18 +12629,24 @@
(defun gnus-summary-bookmark-make-record ()
"Make a bookmark entry for a Gnus summary buffer."
- (unless (and (derived-mode-p 'gnus-summary-mode) gnus-article-current)
- (error "Please retry from the Gnus summary buffer")) ;[1]
- (let* ((subject (elt (gnus-summary-article-header) 1))
- (grp (car gnus-article-current))
- (art (cdr gnus-article-current))
- (head (gnus-summary-article-header art))
- (id (mail-header-id head)))
- `(,subject
- ,@(bookmark-make-record-default 'point-only)
- (location . ,(format "Gnus %s:%d:%s" grp art id))
- (group . ,grp) (article . ,art)
- (message-id . ,id) (handler . gnus-summary-bookmark-jump))))
+ (let (pos buf)
+ (unless (and (derived-mode-p 'gnus-summary-mode) gnus-article-current)
+ (save-restriction ; FIXME is it necessary to widen?
+ (widen) (setq pos (point))) ; Set position in gnus-article buffer.
+ (setq buf "art") ; We are recording bookmark from article buffer.
+ (gnus-article-show-summary)) ; Go back in summary buffer.
+ ;; We are now recording bookmark from summary buffer.
+ (unless buf (setq buf "sum"))
+ (let* ((subject (elt (gnus-summary-article-header) 1))
+ (grp (car gnus-article-current))
+ (art (cdr gnus-article-current))
+ (head (gnus-summary-article-header art))
+ (id (mail-header-id head)))
+ `(,subject
+ ,@(bookmark-make-record-default 'no-file 'no-context pos)
+ (location . ,(format "Gnus-%s %s:%d:%s" buf grp art id))
+ (group . ,grp) (article . ,art)
+ (message-id . ,id) (handler . gnus-summary-bookmark-jump)))))
;;;###autoload
(defun gnus-summary-bookmark-jump (bookmark)
@@ -12648,10 +12654,18 @@
BOOKMARK is a bookmark name or a bookmark record."
(let ((group (bookmark-prop-get bookmark 'group))
(article (bookmark-prop-get bookmark 'article))
- (id (bookmark-prop-get bookmark 'message-id)))
+ (id (bookmark-prop-get bookmark 'message-id))
+ (buf (car (split-string (bookmark-prop-get bookmark 'location)))))
(gnus-fetch-group group (list article))
(gnus-summary-insert-cached-articles)
(gnus-summary-goto-article id nil 'force)
+ ;; FIXME we have to wait article buffer is ready (only large buffer)
+ ;; Is there a better solution to know that?
+ ;; If we don't wait `bookmark-default-handler' will have no chance
+ ;; to set position. However there is no error, just wrong pos.
+ (sit-for 1)
+ (when (string= buf "Gnus-art")
+ (other-window 1))
(bookmark-default-handler
`(""
(buffer . ,(current-buffer))
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#5975: Bazaar branch where this is being fixed.
2010-04-19 17:07 ` bug#5975: 24.0.50; [PATCH]Feature request: bookmarking from gnus article buffer Thierry Volpiatto
2010-05-17 14:14 ` Thierry Volpiatto
@ 2010-07-13 21:46 ` Karl Fogel
2010-07-13 23:30 ` bug#5975: Base patch for bug #5975 (bookmarking from Gnus Article buffer) Glenn Morris
2010-07-14 19:48 ` bug#5975: [PATCH] Allow using C-w (bookmark-yank-word) when bookmarking from a gnus article buffer Thierry Volpiatto
3 siblings, 0 replies; 11+ messages in thread
From: Karl Fogel @ 2010-07-13 21:46 UTC (permalink / raw)
To: 5975
Just for reference, the public reflection of the Bazaar branch where I
am fixing this is:
https://code.launchpad.net/~kfogel/emacs/bug-5975
-Karl
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#5975: Base patch for bug #5975 (bookmarking from Gnus Article buffer).
2010-04-19 17:07 ` bug#5975: 24.0.50; [PATCH]Feature request: bookmarking from gnus article buffer Thierry Volpiatto
2010-05-17 14:14 ` Thierry Volpiatto
2010-07-13 21:46 ` bug#5975: Bazaar branch where this is being fixed Karl Fogel
@ 2010-07-13 23:30 ` Glenn Morris
2010-07-14 19:48 ` bug#5975: [PATCH] Allow using C-w (bookmark-yank-word) when bookmarking from a gnus article buffer Thierry Volpiatto
3 siblings, 0 replies; 11+ messages in thread
From: Glenn Morris @ 2010-07-13 23:30 UTC (permalink / raw)
To: Karl Fogel; +Cc: emacs-devel, 5975, Thierry Volpiatto
Karl Fogel wrote:
> I'm not sure where to apply this.
Do you think it (for any value of "it") is safe for Emacs 23.3?
Is it very unlikely to introduce a regression with respect to Emacs 23.2?
If so, apply "it" only to the emacs-23 branch. It will get merged to
the trunk at some point.
If not, or if you aren't sure, or think it needs more testing, apply
"it" to the trunk.
Also, note that rather than saying "patch by X", you should make the
ChangeLog entry in X's name.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#5975: Base patch for bug #5975 (bookmarking from Gnus Article buffer).
[not found] ` <vi7hkzx8mj.fsf@fencepost.gnu.org>
@ 2010-07-14 0:33 ` Karl Fogel
2010-07-14 8:55 ` Andreas Schwab
[not found] ` <m3wrsyxx20.fsf@hase.home>
2 siblings, 0 replies; 11+ messages in thread
From: Karl Fogel @ 2010-07-14 0:33 UTC (permalink / raw)
To: Glenn Morris; +Cc: emacs-devel, 5975, Thierry Volpiatto
Glenn Morris <rgm@gnu.org> writes:
>> I'm not sure where to apply this.
>
>Do you think it (for any value of "it") is safe for Emacs 23.3?
>Is it very unlikely to introduce a regression with respect to Emacs 23.2?
>
>If so, apply "it" only to the emacs-23 branch. It will get merged to
>the trunk at some point.
>
>If not, or if you aren't sure, or think it needs more testing, apply
>"it" to the trunk.
My goal is to get stuff into whatever line of Emacs will be a permanent
part of all future major release lines (not necessarily including minor
or "point" releases along an already-released line). Usually trunk
serves this purpose, and my assumption had been that trunk is always a
safe place for a change (where as X.Y branch *might* be a safe place).
But I admit, I'm not really sure how we do this. Is there policy
documentation somewhere on it? I looked on the project pages and in the
tree and didn't see anything obvious. (etc/CONTRIBUTE isn't quite it.)
>Also, note that rather than saying "patch by X", you should make the
>ChangeLog entry in X's name.
Thanks for the reminder! I can fix the ChangeLogs to be that way. (It
should be both of us, really; I've seen that style before.)
-Karl
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#5975: Base patch for bug #5975 (bookmarking from Gnus Article buffer).
[not found] ` <vi7hkzx8mj.fsf@fencepost.gnu.org>
2010-07-14 0:33 ` Karl Fogel
@ 2010-07-14 8:55 ` Andreas Schwab
[not found] ` <m3wrsyxx20.fsf@hase.home>
2 siblings, 0 replies; 11+ messages in thread
From: Andreas Schwab @ 2010-07-14 8:55 UTC (permalink / raw)
To: Glenn Morris; +Cc: Karl Fogel, Thierry Volpiatto, 5975, emacs-devel
Glenn Morris <rgm@gnu.org> writes:
> Also, note that rather than saying "patch by X", you should make the
> ChangeLog entry in X's name.
And also the author of the commit.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#5975: Base patch for bug #5975 (bookmarking from Gnus Article buffer).
[not found] ` <m3wrsyxx20.fsf@hase.home>
@ 2010-07-14 15:29 ` Karl Fogel
0 siblings, 0 replies; 11+ messages in thread
From: Karl Fogel @ 2010-07-14 15:29 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Thierry Volpiatto, 5975, emacs-devel
Andreas Schwab <schwab@linux-m68k.org> writes:
>Glenn Morris <rgm@gnu.org> writes:
>> Also, note that rather than saying "patch by X", you should make the
>> ChangeLog entry in X's name.
>
>And also the author of the commit.
You mean with 'bzr commit --author' ?
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#5975: [PATCH] Allow using C-w (bookmark-yank-word) when bookmarking from a gnus article buffer.
[not found] <87630icytd.fsf@tux.homenetwork>
@ 2010-07-14 16:44 ` Karl Fogel
0 siblings, 0 replies; 11+ messages in thread
From: Karl Fogel @ 2010-07-14 16:44 UTC (permalink / raw)
To: Thierry Volpiatto; +Cc: 5975-done
I've committed the C-w patch to trunk. I examined it and tested it, and
it seems to work fine here. Please check it over to make sure!
Below are all the relevant bzr revisions, including the precedents.
Best,
-Karl
------------------------------------------------------------
revno: 100821
revision-id: kfogel@red-bean.com-20100714164140-v2fdq4b6r45zpxev
parent: kfogel@red-bean.com-20100714160253-bbfda9e1g7myj1o8
author: Thierry Volpiatto <thierry.volpiatto@gmail.com>
committer: Karl Fogel <kfogel@red-bean.com>
branch nick: trunk
timestamp: Wed 2010-07-14 12:41:40 -0400
message:
Allow C-w when setting a bookmark in a Gnus Article buffer (Bug#5975).
* lisp/bookmark.el (bookmark-set): Don't set `bookmark-yank-point' and
`bookmark-current-buffer' if they have been already set in another
buffer (e.g gnus-art).
* lisp/gnus/gnus-sum.el (gnus-summary-bookmark-make-record): Set
`bookmark-yank-point' and `bookmark-current-buffer' to allow C-w.
------------------------------------------------------------
revno: 100820
revision-id: kfogel@red-bean.com-20100714160253-bbfda9e1g7myj1o8
parent: kfogel@red-bean.com-20100714155754-n3k71gay91l4vetv
committer: Karl Fogel <kfogel@red-bean.com>
branch nick: trunk
timestamp: Wed 2010-07-14 12:02:53 -0400
message:
Allow bookmarks to be set from Gnus Article buffers (Bug #5975).
Patch applied (with minor tweaks) by Karl Fogel. Note this leaves
C-w still not working correctly from Article buffers; Thierry's
patch to fix that will be applied after this.
* lisp/gnus/gnus-art.el (bookmark-make-record-function): New local variable.
* lisp/gnus/gnus-sum.el (gnus-summary-bookmark-make-record): Allow setting
from article buffer.
(gnus-summary-bookmark-jump): Maybe jump to article buffer.
------------------------------------------------------------
revno: 100819
revision-id: kfogel@red-bean.com-20100714155754-n3k71gay91l4vetv
parent: kfogel@red-bean.com-20100714155426-vnlagemntoe30nu6
committer: Karl Fogel <kfogel@red-bean.com>
branch nick: trunk
timestamp: Wed 2010-07-14 11:57:54 -0400
message:
Preparation for setting bookmarks in Gnus article buffers (Bug#5975).
* lisp/bookmark.el (bookmark-make-record-default): Allow unneeded
information to be omitted from the record.
Adjust declarations and calls:
* lisp/info.el (bookmark-make-record-default): Adjust declaration.
(Info-bookmark-make-record): Adjust call.
* lisp/woman.el (bookmark-make-record-default): Adjust declaration.
(woman-bookmark-make-record): Adjust call.
* lisp/man.el (bookmark-make-record-default): Adjust declaration.
(Man-bookmark-make-record): Adjust call.
* lisp/image-mode.el (bookmark-make-record-default): Adjust declaration.
* lisp/doc-view.el (bookmark-make-record-default): Adjust declaration.
* lisp/gnus/gnus-sum.el (bookmark-make-record-default): Adjust declaration.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#5975: [PATCH] Allow using C-w (bookmark-yank-word) when bookmarking from a gnus article buffer.
2010-04-19 17:07 ` bug#5975: 24.0.50; [PATCH]Feature request: bookmarking from gnus article buffer Thierry Volpiatto
` (2 preceding siblings ...)
2010-07-13 23:30 ` bug#5975: Base patch for bug #5975 (bookmarking from Gnus Article buffer) Glenn Morris
@ 2010-07-14 19:48 ` Thierry Volpiatto
3 siblings, 0 replies; 11+ messages in thread
From: Thierry Volpiatto @ 2010-07-14 19:48 UTC (permalink / raw)
To: bug-gnu-emacs
Hi Karl,
Karl Fogel <kfogel@red-bean.com> writes:
> I've committed the C-w patch to trunk. I examined it and tested it, and
> it seems to work fine here. Please check it over to make sure!
Thanks for your work for commiting patch, i am very happy you separate
patchs (e.g without C-w, with C-w etc..), that's very clear for further look.
Just tested now and work fine.:-)
--
Thierry Volpiatto
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-07-14 19:48 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <87y6dydn6q.fsf@tux.homenetwork>
[not found] ` <201006292126.15409.tassilo@member.fsf.org>
[not found] ` <87iq51ehnv.fsf@tux.homenetwork>
[not found] ` <201006292210.43121.tassilo@member.fsf.org>
[not found] ` <87eifpegqx.fsf@tux.homenetwork>
[not found] ` <87k4ozdq6b.fsf_-_@red-bean.com>
2010-04-19 17:07 ` bug#5975: 24.0.50; [PATCH]Feature request: bookmarking from gnus article buffer Thierry Volpiatto
2010-05-17 14:14 ` Thierry Volpiatto
2010-07-13 21:46 ` bug#5975: Bazaar branch where this is being fixed Karl Fogel
2010-07-13 23:30 ` bug#5975: Base patch for bug #5975 (bookmarking from Gnus Article buffer) Glenn Morris
2010-07-14 19:48 ` bug#5975: [PATCH] Allow using C-w (bookmark-yank-word) when bookmarking from a gnus article buffer Thierry Volpiatto
2010-07-13 21:41 ` bug#5975: Base patch for bug #5975 (bookmarking from Gnus Article buffer) Karl Fogel
[not found] ` <vi7hkzx8mj.fsf@fencepost.gnu.org>
2010-07-14 0:33 ` Karl Fogel
2010-07-14 8:55 ` Andreas Schwab
[not found] ` <m3wrsyxx20.fsf@hase.home>
2010-07-14 15:29 ` Karl Fogel
2010-07-13 21:31 ` Karl Fogel
[not found] <87630icytd.fsf@tux.homenetwork>
2010-07-14 16:44 ` bug#5975: [PATCH] Allow using C-w (bookmark-yank-word) when bookmarking from a gnus article buffer Karl Fogel
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).