Gnus development mailing list
 help / color / mirror / Atom feed
* hide citation
@ 2007-10-13 21:36 Leo
  2007-10-15  1:51 ` Katsumi Yamaoka
  2007-11-18 10:14 ` Leo
  0 siblings, 2 replies; 8+ messages in thread
From: Leo @ 2007-10-13 21:36 UTC (permalink / raw)
  To: ding

Hi there,

With the following setting,

--8<---------------cut here---------------start------------->8---
(setq gnus-treat-hide-citation t
      gnus-cited-lines-visible '(3 . 3))
--8<---------------cut here---------------end--------------->8---

articles with inline patch will also be hidden, for example this
article: <jwvfy0g73zg.fsf-monnier+emacs@gnu.org>

Now if I try to apply the patch with 'M-x ediff-patch-file' to apply the
patch in the Article buffer to the file, it will fail because of the
extra [+] or [-].

So what's the solution? is there a command to toggle hidden citation?

HTH,
-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

       Use the most powerful email client -- http://gnus.org/




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: hide citation
  2007-10-13 21:36 hide citation Leo
@ 2007-10-15  1:51 ` Katsumi Yamaoka
  2007-10-15  2:37   ` Katsumi Yamaoka
  2007-11-18 10:14 ` Leo
  1 sibling, 1 reply; 8+ messages in thread
From: Katsumi Yamaoka @ 2007-10-15  1:51 UTC (permalink / raw)
  To: ding

>>>>> Leo wrote:

> With the following setting,

> (setq gnus-treat-hide-citation t
>       gnus-cited-lines-visible '(3 . 3))

> articles with inline patch will also be hidden, for example this
> article: <jwvfy0g73zg.fsf-monnier+emacs@gnu.org>

This is the case where a patch is in the text/plain body.
Because of the value of `gnus-article-treat-types', gnus-treat-*
is performed on it.

> Now if I try to apply the patch with 'M-x ediff-patch-file' to apply the
> patch in the Article buffer to the file, it will fail because of the
> extra [+] or [-].

> So what's the solution? is there a command to toggle hidden citation?

One is to improve `message-cite-prefix-regexp' so that it doesn't
match a single `+' or `-' in the beginning of lines.  (Maybe I've
never seen replies in which a single `+' or `-' is used for the
citation.)  For example:

--8<---------------cut here---------------start------------->8---
(setq message-cite-prefix-regexp
      "[\t ]*\\(?:[[:word:]]+[-._[:word:]]*\\(?:[\t ]*[]+>|}]+\\)+\
\\|\\(?:[]>|}][\t ]+\\|[]+>|}][]+>|}]+[\t ]*\\)\\(?:[]+>|}]+[\t ]*\\)*\\)")
--8<---------------cut here---------------end--------------->8---

Another is to pull "text/x-patch" from `gnus-article-treat-types'
and to make mm-uu.el dissect a patch in the text/plain body as a
text/x-patch part.  I have currently no concrete idea to do that,
though.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: hide citation
  2007-10-15  1:51 ` Katsumi Yamaoka
@ 2007-10-15  2:37   ` Katsumi Yamaoka
  0 siblings, 0 replies; 8+ messages in thread
From: Katsumi Yamaoka @ 2007-10-15  2:37 UTC (permalink / raw)
  To: ding

>>>>> Katsumi Yamaoka wrote:

> For example:
> (setq message-cite-prefix-regexp

Sorry.  It should be:

--8<---------------cut here---------------start------------->8---
(setq message-cite-prefix-regexp
      "[\t ]*\\(?:[[:word:]]+[-._[:word:]]*\\(?:[\t ]*[]+>|}]+\\)+\
\\|\\(?:[]>|}]\\|[]+>|}][]+>|}]+\\)\\(?:[\t ]*[]+>|}]+\\)*\\)")
--8<---------------cut here---------------end--------------->8---



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: hide citation
  2007-10-13 21:36 hide citation Leo
  2007-10-15  1:51 ` Katsumi Yamaoka
@ 2007-11-18 10:14 ` Leo
  2007-11-18 11:36   ` Reiner Steib
  1 sibling, 1 reply; 8+ messages in thread
From: Leo @ 2007-11-18 10:14 UTC (permalink / raw)
  To: ding

On 2007-10-13 22:36 +0100, Leo wrote:
> Hi there,
>
> With the following setting,
>
> (setq gnus-treat-hide-citation t
>       gnus-cited-lines-visible '(3 . 3))
>
> articles with inline patch will also be hidden, for example this
> article: <jwvfy0g73zg.fsf-monnier+emacs@gnu.org>
>
> Now if I try to apply the patch with 'M-x ediff-patch-file' to apply the
> patch in the Article buffer to the file, it will fail because of the
> extra [+] or [-].
>
> So what's the solution? is there a command to toggle hidden citation?
>
> HTH,

Anyone want to address this bug?

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

          Use the best OS -- http://www.fedoraproject.org/



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: hide citation
  2007-11-18 10:14 ` Leo
@ 2007-11-18 11:36   ` Reiner Steib
  2007-12-01  6:03     ` Leo
  2007-12-01  9:28     ` Tassilo Horn
  0 siblings, 2 replies; 8+ messages in thread
From: Reiner Steib @ 2007-11-18 11:36 UTC (permalink / raw)
  To: ding

On Sun, Nov 18 2007, Leo wrote:

> On 2007-10-13 22:36 +0100, Leo wrote:
>> articles with inline patch will also be hidden, for example this
>> article: <jwvfy0g73zg.fsf-monnier+emacs@gnu.org>
>>
>> Now if I try to apply the patch with 'M-x ediff-patch-file' to apply the
>> patch in the Article buffer to the file, it will fail because of the
>> extra [+] or [-].
>>
>> So what's the solution? is there a command to toggle hidden citation?

I would have though that ...

(defun rs-gnus-show-article-inhibit-treatment ()
  "Force redisplaying of the current article without treatment."
  (interactive)
  (let ((gnus-inhibit-treatment t))
    (gnus-summary-select-article nil t)))

... should work, but it doesn't?  Ideas anyone?

> Anyone want to address this bug?

How about removing "+" and "-" from `message-cite-prefix-regexp' as
suggested by Katsumi Yamaoka?

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




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: hide citation
  2007-11-18 11:36   ` Reiner Steib
@ 2007-12-01  6:03     ` Leo
  2007-12-01  9:28     ` Tassilo Horn
  1 sibling, 0 replies; 8+ messages in thread
From: Leo @ 2007-12-01  6:03 UTC (permalink / raw)
  To: ding

On 2007-11-18 11:36 +0000, Reiner Steib wrote:
>> Anyone want to address this bug?
>
> How about removing "+" and "-" from `message-cite-prefix-regexp' as
> suggested by Katsumi Yamaoka?

I vote for this.

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

          Use the best OS -- http://www.fedoraproject.org/




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: hide citation
  2007-11-18 11:36   ` Reiner Steib
  2007-12-01  6:03     ` Leo
@ 2007-12-01  9:28     ` Tassilo Horn
  2007-12-01 17:59       ` Reiner Steib
  1 sibling, 1 reply; 8+ messages in thread
From: Tassilo Horn @ 2007-12-01  9:28 UTC (permalink / raw)
  To: ding

Reiner Steib <reinersteib+gmane@imap.cc> writes:

Hi Reiner,

> I would have though that ...
>
> (defun rs-gnus-show-article-inhibit-treatment ()
>   "Force redisplaying of the current article without treatment."
>   (interactive)
>   (let ((gnus-inhibit-treatment t))
>     (gnus-summary-select-article nil t)))
>
> ... should work, but it doesn't?  Ideas anyone?

I `rgrep'ped the sources, and here are the results:

--8<---------------cut here---------------start------------->8---
./gnus-msg.el:1507:    (let ((gnus-inhibit-treatment t))
./gnus-art.el:1089:(defvar gnus-inhibit-treatment nil
./gnus-uu.el:1265:	(gnus-inhibit-treatment t)
./gnus-sum.el:11810:	  (gnus-inhibit-treatment t))
./spam-wash.el:43:	     (gnus-inhibit-treatment t)
--8<---------------cut here---------------end--------------->8---

So this variable has one definition and is let-bound four times.  But
it's never ever checked. :)

>> Anyone want to address this bug?
>
> How about removing "+" and "-" from `message-cite-prefix-regexp' as
> suggested by Katsumi Yamaoka?

I'd vote for it.  I cannot remember reading an article using + or - for
citation.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: hide citation
  2007-12-01  9:28     ` Tassilo Horn
@ 2007-12-01 17:59       ` Reiner Steib
  0 siblings, 0 replies; 8+ messages in thread
From: Reiner Steib @ 2007-12-01 17:59 UTC (permalink / raw)
  To: ding

On Sat, Dec 01 2007, Tassilo Horn wrote:

> Reiner Steib <reinersteib+gmane@imap.cc> writes:
>> How about removing "+" and "-" from `message-cite-prefix-regexp' as
>> suggested by Katsumi Yamaoka?
>
> I'd vote for it.  I cannot remember reading an article using + or - for
> citation.

On Sat, Dec 01 2007, Leo wrote:
> I vote for this.

I removed `-' and `+' from `message-cite-prefix-regexp'.  I hope I got
it right.  Please try.

Katsumi, if your suggestion seem more appropriate, feel free to
install yours.  I was to lazy to figure out what how your regexp is
different.

--8<---------------cut here---------------start------------->8---
--- message.el	1 Dec 2007 11:55:23 -0000	7.229
+++ message.el	1 Dec 2007 17:50:27 -0000	7.230
@@ -585,21 +585,21 @@
   :type 'regexp)
 
 (defcustom message-cite-prefix-regexp
-  (if (string-match "[[:digit:]]" "1") ;; support POSIX?
-      "\\([ \t]*[-_.[:word:]]+>+\\|[ \t]*[]>|}+]\\)+"
+  (if (string-match "[[:digit:]]" "1")
+      ;; Support POSIX?  XEmacs 21.5.27 doesn't.
+      "\\([ \t]*[_.[:word:]]+>+\\|[ \t]*[]>|}]\\)+"
     ;; ?-, ?_ or ?. MUST NOT be in syntax entry w.
     (let (non-word-constituents)
       (with-syntax-table text-mode-syntax-table
 	(setq non-word-constituents
 	      (concat
-	       (if (string-match "\\w" "-")  "" "-")
 	       (if (string-match "\\w" "_")  "" "_")
 	       (if (string-match "\\w" ".")  "" "."))))
       (if (equal non-word-constituents "")
-	  "\\([ \t]*\\(\\w\\)+>+\\|[ \t]*[]>|}+]\\)+"
+	  "\\([ \t]*\\(\\w\\)+>+\\|[ \t]*[]>|}]\\)+"
 	(concat "\\([ \t]*\\(\\w\\|["
 		non-word-constituents
-		"]\\)+>+\\|[ \t]*[]>|}+]\\)+"))))
+		"]\\)+>+\\|[ \t]*[]>|}]\\)+"))))
   "*Regexp matching the longest possible citation prefix on a line."
   :version "22.1"
   :group 'message-insertion
--8<---------------cut here---------------end--------------->8---

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




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-12-01 17:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-13 21:36 hide citation Leo
2007-10-15  1:51 ` Katsumi Yamaoka
2007-10-15  2:37   ` Katsumi Yamaoka
2007-11-18 10:14 ` Leo
2007-11-18 11:36   ` Reiner Steib
2007-12-01  6:03     ` Leo
2007-12-01  9:28     ` Tassilo Horn
2007-12-01 17:59       ` Reiner Steib

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).