Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-article-hide and interactive use ?
@ 1998-02-20 12:02 jari.aalto
  1998-02-20 12:21 ` patch: gnus-article-hide and interactive use jari.aalto
  1998-02-20 21:35 ` gnus-article-hide and interactive use ? Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: jari.aalto @ 1998-02-20 12:02 UTC (permalink / raw)




    Hm, I find that there is confusion in the documentation or coding
    of the gnus-article-hide which says:

        (defun gnus-article-hide (&optional arg force)
          "Hide all the gruft in the current article.
        This means that PGP stuff, signatures, cited text and (some)
        headers will be hidden.
        If given a prefix, show the hidden text instead."
          (interactive (list current-prefix-arg 'force))

    But if I give prefix C-u, it dies with error and If I give prefix 1,
    it doesn't show all text (like ^L and after "--"). Waht seesm to work is
    prefix argument -1.

    Maybe docuemntation should suggest -1 and warn about C-u ?
    Or, should the interactive spec read:

         (interactive (list -1 'force))

    jari


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

* patch: gnus-article-hide and interactive use
  1998-02-20 12:02 gnus-article-hide and interactive use ? jari.aalto
@ 1998-02-20 12:21 ` jari.aalto
  1998-02-20 21:36   ` Lars Magne Ingebrigtsen
  1998-02-20 21:35 ` gnus-article-hide and interactive use ? Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 4+ messages in thread
From: jari.aalto @ 1998-02-20 12:21 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 167 bytes --]

| 98-02-20 <jari.aalto@poboxes.com> list.ding

After thinking this a bit, wouldn't it be nice if this function 
acted like a toggle when called interactively?

jari



[-- Attachment #2: gnus-art.el.diff --]
[-- Type: application/octet-stream, Size: 859 bytes --]

--- gnus-art.el.orig	Fri Feb 20 14:00:21 1998
+++ gnus-art.el	Fri Feb 20 14:18:07 1998
@@ -2398,8 +2398,19 @@
   "Hide all the gruft in the current article.
 This means that PGP stuff, signatures, cited text and (some)
 headers will be hidden.
-If given a prefix, show the hidden text instead."
-  (interactive (list current-prefix-arg 'force))
+If given a prefix, show the hidden text instead.
+
+Interactive note:
+  Calling this function repeatedly toggles hide and show."
+  (interactive
+   (let* ((prefix (get 'gnus-article-hide 'user-prefix)))
+     (setq
+      prefix
+      (if current-prefix-arg
+	  -1
+	(if prefix nil -1))) 	;;  toggle previous state
+     (put  'gnus-article-hide 'user-prefix prefix)
+     (list prefix 'force)))
   (gnus-article-hide-headers arg)
   (gnus-article-hide-pgp arg)
   (gnus-article-hide-citation-maybe arg force)

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

* Re: gnus-article-hide and interactive use ?
  1998-02-20 12:02 gnus-article-hide and interactive use ? jari.aalto
  1998-02-20 12:21 ` patch: gnus-article-hide and interactive use jari.aalto
@ 1998-02-20 21:35 ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-02-20 21:35 UTC (permalink / raw)


<jari.aalto@poboxes.com> writes:

>     Hm, I find that there is confusion in the documentation or coding
>     of the gnus-article-hide which says:

[...]

>     But if I give prefix C-u, it dies with error

Yup.  Fix in Quassia Gnus v0.30.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: patch: gnus-article-hide and interactive use
  1998-02-20 12:21 ` patch: gnus-article-hide and interactive use jari.aalto
@ 1998-02-20 21:36   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-02-20 21:36 UTC (permalink / raw)


<jari.aalto@poboxes.com> writes:

> After thinking this a bit, wouldn't it be nice if this function 
> acted like a toggle when called interactively?

I don't think so.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

end of thread, other threads:[~1998-02-20 21:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-20 12:02 gnus-article-hide and interactive use ? jari.aalto
1998-02-20 12:21 ` patch: gnus-article-hide and interactive use jari.aalto
1998-02-20 21:36   ` Lars Magne Ingebrigtsen
1998-02-20 21:35 ` gnus-article-hide and interactive use ? Lars Magne Ingebrigtsen

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