Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
To: Dave Pearson <davep@davep.org>
Cc: ding@gnus.org
Subject: Re: Following boxquote links in a message buffer borkes it!
Date: Sat, 09 May 2009 12:32:00 +0200	[thread overview]
Message-ID: <8763gay3bz.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <873abfteyw.fsf@thinkpad.tsdh.de> (Tassilo Horn's message of "Sat, 09 May 2009 00:19:35 +0200")

On Sat, May 09 2009, Tassilo Horn wrote:

> Reiner Steib <reinersteib+gmane@imap.cc> writes:
>
>> I think `boxquote.el' doesn't do anything WRT this.  It simply copies
>> the text from the *Help* buffer.
>
> But when I kill the text from a *Help* buffer and yank it to *scratch*
> the links aren't clickable anymore; RET just insterts a newline.  Does
> normal `M-< C-SPC M-> C-w' followed by `C-y' not copy the relevant
> properties?  

No, see...

,----[ <f1> v yank-excluded-properties RET ]
| yank-excluded-properties is a variable defined in `simple.el'.
| Its value is 
| (read-only invisible intangible field mouse-face help-echo local-map
| keymap yank-handler follow-link fontified)
| 
| Documentation:
| *Text properties to discard when yanking.
| The value should be a list of text properties to discard or t,
| which means to discard all text properties.
| 
| You can customize this variable.
`----

But `boxquote.el' doesn't use `yank' for `boxquote-describe-variable'.
`boxquote-quote-help-buffer' doesn't exclude properties and
`boxquote-text' does an `insert' (not a `yank') which preserves the
properties.

As `boxquote.el' excludes the properties in other functions, I guess
it is an oversight.  Dave, I'd suggest to add the following patch.

2009-05-09  Reiner Steib  <Reiner.Steib@gmx.de>

	* boxquote.el (boxquote-quote-help-buffer): Strip text properties
	to avoid destroying the target buffer content when clicking on a
	help link.  Reported by Tassilo Horn <tassilo@member.fsf.org>.

--8<---------------cut here---------------start------------->8---
--- boxquote.el.~1.21~	2008-05-21 12:10:13.000000000 +0200
+++ boxquote.el	2009-05-09 12:29:42.000000000 +0200
@@ -1,5 +1,5 @@
 ;;; boxquote.el --- Quote text with a semi-box.
-;; Copyright 1999-2008 by Dave Pearson <davep@davep.org>
+;; Copyright 1999-2009 by Dave Pearson <davep@davep.org>
 ;; $Revision: 1.21 $
 
 ;; boxquote.el is free software distributed under the terms of the GNU
@@ -428,11 +428,13 @@
      (save-window-excursion
        (funcall help-call)
        (with-current-buffer (boxquote-help-buffer-name (funcall item))
-         (buffer-string))))
+	 ;; Strip text properties to avoid destroying the target buffer
+	 ;; content when clicking on a help link.
+	 (buffer-substring-no-properties (point-min) (point-max)))))
     (boxquote-title (format title-format (funcall item)))
     (when one-window-p
       (delete-other-windows))))
-  
+
 ;;;###autoload
 (defun boxquote-describe-function ()
   "Call `describe-function' and boxquote the output into the current buffer."

--8<---------------cut here---------------end--------------->8---

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



  reply	other threads:[~2009-05-09 10:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-08 11:42 Tassilo Horn
2009-05-08 17:10 ` Reiner Steib
2009-05-08 18:16   ` Tassilo Horn
2009-05-08 20:53     ` Reiner Steib
2009-05-08 22:19       ` Tassilo Horn
2009-05-09 10:32         ` Reiner Steib [this message]
2009-05-09 12:14         ` Andreas Schwab
2009-05-10 20:07       ` Dave Pearson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8763gay3bz.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    --cc=davep@davep.org \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).