unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
@ 2020-08-14 17:38 Sean Whitton
  2020-08-18 13:37 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 30+ messages in thread
From: Sean Whitton @ 2020-08-14 17:38 UTC (permalink / raw)
  To: 42865

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

Tags: patch

Hello,

I want to have a way to suppress swapping point and mark when copying an
inactive region, as I find that distracting.  Here is a patch adding a
new defcustom to achieve that.

-- 
Sean Whitton

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-new-defcustom-copy-region-quietly.patch --]
[-- Type: text/x-diff, Size: 4464 bytes --]

From ffcf36626d75b1f421fef36a79542ac8cacb5991 Mon Sep 17 00:00:00 2001
From: Sean Whitton <spwhitton@spwhitton.name>
Date: Fri, 14 Aug 2020 10:33:54 -0700
Subject: [PATCH] Add new defcustom 'copy-region-quietly'

* lisp/simple.el (copy-region-quietly): Add new defcustom.
* lisp/simple.el (indicate-copied-region): Don't swap point and mark
if copy-region-quietly is no-swap or t.  Don't display a message if
copy-region-quietly is no-message or t.  Document the change.
* etc/NEWS: Document the change.
---
 etc/NEWS       |  4 ++++
 lisp/simple.el | 47 ++++++++++++++++++++++++++++++++++++-----------
 2 files changed, 40 insertions(+), 11 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 2be9743a45..5bd495fd43 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -145,6 +145,10 @@ setting the variable 'auto-save-visited-mode' buffer-locally to nil.
 description of the properties.  Likewise 'button-describe' does the
 same for a button.
 
+** Whether and how the copying of an inactive region is indicated
+visually can now be controlled by customizing the variable
+'copy-region-quietly'.
+
 \f
 * Changes in Specialized Modes and Packages in Emacs 28.1
 
diff --git a/lisp/simple.el b/lisp/simple.el
index 6f72c3b81b..cd1c773f43 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4871,6 +4871,22 @@ kill-read-only-ok
   :type 'boolean
   :group 'killing)
 
+(defcustom copy-region-quietly nil
+  "Whether the copying of an inactive region is indicated visually.
+If nil, behave as per the documentation of `indicate-copied-region'.
+`no-swap' means inhibit briefly swapping point and mark.
+`no-message' means inhibit displaying a message.
+Any other value means inhibit both swapping and message-displaying."
+  :type '(choice :tag "Copy region quietly"
+                 (const :tag "Default behavior" nil)
+                 (const :tag "Don't swap point and mark" no-swap)
+                 (const :tag "Don't display a message" no-message)
+                 (const
+                  :tag
+                  "Don't swap point and mark or display a message"
+                  t))
+  :group 'killing)
+
 (defun kill-region (beg end &optional region)
   "Kill (\"cut\") text between point and mark.
 This deletes the text from the buffer and saves it in the kill ring.
@@ -5005,7 +5021,10 @@ indicate-copied-region
 If the mark lies outside the selected window, display an
 informative message containing a sample of the copied text.  The
 optional argument MESSAGE-LEN, if non-nil, specifies the length
-of this sample text; it defaults to 40."
+of this sample text; it defaults to 40.
+
+Both these behaviors can be inhibited by setting `copy-region-quietly',
+which see."
   (let ((mark (mark t))
 	(point (point))
 	;; Inhibit quitting so we can make a quit here
@@ -5014,8 +5033,9 @@ indicate-copied-region
     (if (pos-visible-in-window-p mark (selected-window))
 	;; Swap point-and-mark quickly so as to show the region that
 	;; was selected.  Don't do it if the region is highlighted.
-	(unless (and (region-active-p)
-		     (face-background 'region nil t))
+	(unless (or (memq copy-region-quietly '(t no-swap))
+                    (and (region-active-p)
+		         (face-background 'region nil t)))
 	  ;; Swap point and mark.
 	  (set-marker (mark-marker) (point) (current-buffer))
 	  (goto-char mark)
@@ -5027,14 +5047,19 @@ indicate-copied-region
 	  ;; as C-g would as a command.
 	  (and quit-flag (region-active-p)
 	       (deactivate-mark)))
-      (let ((len (min (abs (- mark point))
-		      (or message-len 40))))
-	(if (< point mark)
-	    ;; Don't say "killed"; that is misleading.
-	    (message "Saved text until \"%s\""
-		     (buffer-substring-no-properties (- mark len) mark))
-	  (message "Saved text from \"%s\""
-		   (buffer-substring-no-properties mark (+ mark len))))))))
+      (unless (memq copy-region-quietly '(t no-message))
+        (let ((len (min (abs (- mark point))
+		        (or message-len 40))))
+	  (if (< point mark)
+	      ;; Don't say "killed"; that is misleading.
+	      (message "Saved text until \"%s\""
+		       (buffer-substring-no-properties
+                        (- mark len)
+                        mark))
+	    (message "Saved text from \"%s\""
+		     (buffer-substring-no-properties
+                      mark
+                      (+ mark len)))))))))
 
 (defun append-next-kill (&optional interactive)
   "Cause following command, if it kills, to add to previous kill.
-- 
2.27.0


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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-14 17:38 bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom Sean Whitton
@ 2020-08-18 13:37 ` Lars Ingebrigtsen
  2020-08-19  1:16   ` Juri Linkov
  2020-08-19 16:32   ` Sean Whitton
  0 siblings, 2 replies; 30+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-18 13:37 UTC (permalink / raw)
  To: Sean Whitton; +Cc: 42865

Sean Whitton <spwhitton@spwhitton.name> writes:

> +(defcustom copy-region-quietly nil
> +  "Whether the copying of an inactive region is indicated visually.
> +If nil, behave as per the documentation of `indicate-copied-region'.
> +`no-swap' means inhibit briefly swapping point and mark.
> +`no-message' means inhibit displaying a message.
> +Any other value means inhibit both swapping and message-displaying."
> +  :type '(choice :tag "Copy region quietly"
> +                 (const :tag "Default behavior" nil)
> +                 (const :tag "Don't swap point and mark" no-swap)
> +                 (const :tag "Don't display a message" no-message)
> +                 (const
> +                  :tag
> +                  "Don't swap point and mark or display a message"
> +                  t))
> +  :group 'killing)

Thanks for the patch.

The change looks reasonable to me, but I'm not quite sure of how useful
this is.  Does many people want to tweak the behaviour of this command
to this extent?

Perhaps somebody else on the bug tracker has opinions here.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-18 13:37 ` Lars Ingebrigtsen
@ 2020-08-19  1:16   ` Juri Linkov
  2020-08-19 10:25     ` Lars Ingebrigtsen
  2020-08-19 16:36     ` Sean Whitton
  2020-08-19 16:32   ` Sean Whitton
  1 sibling, 2 replies; 30+ messages in thread
From: Juri Linkov @ 2020-08-19  1:16 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 42865, Sean Whitton

>> +(defcustom copy-region-quietly nil
>> +  "Whether the copying of an inactive region is indicated visually.
>> +If nil, behave as per the documentation of `indicate-copied-region'.
>> +`no-swap' means inhibit briefly swapping point and mark.
>> +`no-message' means inhibit displaying a message.
>> +Any other value means inhibit both swapping and message-displaying."
>> +  :type '(choice :tag "Copy region quietly"
>> +                 (const :tag "Default behavior" nil)
>> +                 (const :tag "Don't swap point and mark" no-swap)
>> +                 (const :tag "Don't display a message" no-message)
>> +                 (const
>> +                  :tag
>> +                  "Don't swap point and mark or display a message"
>> +                  t))
>> +  :group 'killing)
>
> Thanks for the patch.
>
> The change looks reasonable to me, but I'm not quite sure of how useful
> this is.  Does many people want to tweak the behaviour of this command
> to this extent?
>
> Perhaps somebody else on the bug tracker has opinions here.

When I needed to customize the behaviour of 'indicate-copied-region',
I relied on advice-add like this:

(advice-add 'kill-ring-save :after
            (lambda (&rest _args)
              (let ((text (substring-no-properties (current-kill 0))))
                (message "Copied text \"%s\""
                         ;; Don't show newlines literally
                         (query-replace-descr
                          (if (> (length text) 64)
                              (concat (substring text 0 64) "..." (substring text -16))
                            text)))))
            '((name . indicate-copied-region)))

that tries to fix the problem of multi-line messages that abruptly changes
the window configuration by resizing the echo area after text copying.
This problem is caused by the fact that 'indicate-copied-region' displays
the constant number of copied characters, including newlines.

Regarding a new option to disable such messages at all, it seems this is
a more general question because AFAIR, in the past, users asked for a way
to disable messages for many other commands, such as "Wrote ..." of 'save-buffer',
etc.

Maybe there should be a new feature allowing to disable messages selectively
for different commands?  Maybe just by putting a symbol property on the
command symbol.

Regarding disabling the "swapping point and mark" feature: since
'indicate-copied-region' uses 'blink-matching-delay', shouldn't this
behaviour be disabled by the existing option 'blink-matching-paren-on-screen'
in 'indicate-copied-region' as well (in addition to 'blink-matching-open'
where it's used originally)?





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-19  1:16   ` Juri Linkov
@ 2020-08-19 10:25     ` Lars Ingebrigtsen
  2020-08-20  0:52       ` Juri Linkov
                         ` (2 more replies)
  2020-08-19 16:36     ` Sean Whitton
  1 sibling, 3 replies; 30+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-19 10:25 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 42865, Sean Whitton

Juri Linkov <juri@linkov.net> writes:

> Regarding a new option to disable such messages at all, it seems this
> is a more general question because AFAIR, in the past, users asked for
> a way to disable messages for many other commands, such as "Wrote ..."
> of 'save-buffer', etc.
>
> Maybe there should be a new feature allowing to disable messages selectively
> for different commands?  Maybe just by putting a symbol property on the
> command symbol.

Many commands can issue different messages, while it's normally just the
specific "everything went well" thing users want to disable.  So I think
that may be confusing, interface wise?

But perhaps not?  If the symbol wasn't `silent' but instead
`no-normal-message' or something, then that could be used to disable any
messaging in the command on the "happy path".

> Regarding disabling the "swapping point and mark" feature: since
> 'indicate-copied-region' uses 'blink-matching-delay', shouldn't this
> behaviour be disabled by the existing option 'blink-matching-paren-on-screen'
> in 'indicate-copied-region' as well (in addition to 'blink-matching-open'
> where it's used originally)?

Hm...  I'd think paren blinking and copy-region blinking would be
something people would want to control separately.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-18 13:37 ` Lars Ingebrigtsen
  2020-08-19  1:16   ` Juri Linkov
@ 2020-08-19 16:32   ` Sean Whitton
  2020-08-19 16:49     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 30+ messages in thread
From: Sean Whitton @ 2020-08-19 16:32 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 42865

Hello Lars,

On Tue 18 Aug 2020 at 03:37PM +02, Lars Ingebrigtsen wrote:

> Sean Whitton <spwhitton@spwhitton.name> writes:
>
>> +(defcustom copy-region-quietly nil
>> +  "Whether the copying of an inactive region is indicated visually.
>> +If nil, behave as per the documentation of `indicate-copied-region'.
>> +`no-swap' means inhibit briefly swapping point and mark.
>> +`no-message' means inhibit displaying a message.
>> +Any other value means inhibit both swapping and message-displaying."
>> +  :type '(choice :tag "Copy region quietly"
>> +                 (const :tag "Default behavior" nil)
>> +                 (const :tag "Don't swap point and mark" no-swap)
>> +                 (const :tag "Don't display a message" no-message)
>> +                 (const
>> +                  :tag
>> +                  "Don't swap point and mark or display a message"
>> +                  t))
>> +  :group 'killing)
>
> Thanks for the patch.
>
> The change looks reasonable to me, but I'm not quite sure of how useful
> this is.  Does many people want to tweak the behaviour of this command
> to this extent?
>
> Perhaps somebody else on the bug tracker has opinions here.

I just want to turn off the cursor blinking, but I thought I ought to
try to come up with a slightly more general solution just in case
someone wants it.

Currently I have (fset 'indicate-copied-region #'ignore) in my init file
but this is not a great way to customise something like this, hence my
patch.

It certainly seems plausible to me that others would want to turn off
the cursor blinking, but I'm not sure about how many people care about
the message.  If you think it would be better I could come up with a
simpler patch which only turns off blinking.

-- 
Sean Whitton





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-19  1:16   ` Juri Linkov
  2020-08-19 10:25     ` Lars Ingebrigtsen
@ 2020-08-19 16:36     ` Sean Whitton
  1 sibling, 0 replies; 30+ messages in thread
From: Sean Whitton @ 2020-08-19 16:36 UTC (permalink / raw)
  To: Juri Linkov, Lars Ingebrigtsen; +Cc: 42865

Hello,

On Wed 19 Aug 2020 at 04:16AM +03, Juri Linkov wrote:

> Regarding a new option to disable such messages at all, it seems this is
> a more general question because AFAIR, in the past, users asked for a way
> to disable messages for many other commands, such as "Wrote ..." of 'save-buffer',
> etc.
>
> Maybe there should be a new feature allowing to disable messages selectively
> for different commands?  Maybe just by putting a symbol property on the
> command symbol.

I agree that would be a cool feature.  In my own case, I just want to
get rid of the cursor blinking when copying the region.

> Regarding disabling the "swapping point and mark" feature: since
> 'indicate-copied-region' uses 'blink-matching-delay', shouldn't this
> behaviour be disabled by the existing option 'blink-matching-paren-on-screen'
> in 'indicate-copied-region' as well (in addition to 'blink-matching-open'
> where it's used originally)?

I'd like to have paren blinking turned on (it's too useful even if I
generally dislike blinking) but copy region blinking turned off (not
useful to me and visually distracting).

-- 
Sean Whitton





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-19 16:32   ` Sean Whitton
@ 2020-08-19 16:49     ` Lars Ingebrigtsen
  2020-09-10 16:05       ` Sean Whitton
  0 siblings, 1 reply; 30+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-19 16:49 UTC (permalink / raw)
  To: Sean Whitton; +Cc: 42865

Sean Whitton <spwhitton@spwhitton.name> writes:

> It certainly seems plausible to me that others would want to turn off
> the cursor blinking, but I'm not sure about how many people care about
> the message.  If you think it would be better I could come up with a
> simpler patch which only turns off blinking.

The two behaviours are related (they are both ways of saying "we copied
this region"), so thinking about this a bit more, I think your patch
makes sense as is.

Let's give it a few more days to see whether anybody else has any views
on this before committing, though.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-19 10:25     ` Lars Ingebrigtsen
@ 2020-08-20  0:52       ` Juri Linkov
  2020-08-20 13:01         ` Lars Ingebrigtsen
  2020-08-20  0:55       ` Juri Linkov
  2020-11-15 20:33       ` Juri Linkov
  2 siblings, 1 reply; 30+ messages in thread
From: Juri Linkov @ 2020-08-20  0:52 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 42865, Sean Whitton

>> Regarding a new option to disable such messages at all, it seems this
>> is a more general question because AFAIR, in the past, users asked for
>> a way to disable messages for many other commands, such as "Wrote ..."
>> of 'save-buffer', etc.
>>
>> Maybe there should be a new feature allowing to disable messages selectively
>> for different commands?  Maybe just by putting a symbol property on the
>> command symbol.
>
> Many commands can issue different messages, while it's normally just the
> specific "everything went well" thing users want to disable.  So I think
> that may be confusing, interface wise?
>
> But perhaps not?  If the symbol wasn't `silent' but instead
> `no-normal-message' or something, then that could be used to disable any
> messaging in the command on the "happy path".

Generally, different error levels should specify the message priority
(debug, info, warning, error).  I'm not quite sure what functions
correspond to these levels in Emacs.  Definitely, errors should be raised
by the function 'error', but it seems most messages are informational.

Anyway, here is a patch that allows disabling messages for particular
commands with e.g.

  (put 'kill-ring-save 'inhibit-message t)

diff --git a/src/xdisp.c b/src/xdisp.c
index ad03ac4605..9cbbec61f6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10984,7 +10984,7 @@ message3 (Lisp_Object m)
       message_dolog (buffer, nbytes, true, multibyte);
       SAFE_FREE ();
     }
-  if (! inhibit_message)
+  if (! inhibit_message && NILP (Fget (Vthis_command, Qinhibit_message)))
     message3_nolog (m);
 }
 
@@ -34348,6 +34353,7 @@ syms_of_xdisp (void)
 
   DEFSYM (Qredisplay_internal_xC_functionx, "redisplay_internal (C function)");
 
+  DEFSYM (Qinhibit_message, "inhibit-message");
   DEFVAR_BOOL("inhibit-message", inhibit_message,
               doc:  /* Non-nil means calls to `message' are not displayed.
 They are still logged to the *Messages* buffer.







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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-19 10:25     ` Lars Ingebrigtsen
  2020-08-20  0:52       ` Juri Linkov
@ 2020-08-20  0:55       ` Juri Linkov
  2020-08-20 13:05         ` Lars Ingebrigtsen
  2020-11-15 20:33       ` Juri Linkov
  2 siblings, 1 reply; 30+ messages in thread
From: Juri Linkov @ 2020-08-20  0:55 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 42865, Sean Whitton

>> Regarding disabling the "swapping point and mark" feature: since
>> 'indicate-copied-region' uses 'blink-matching-delay', shouldn't this
>> behaviour be disabled by the existing option 'blink-matching-paren-on-screen'
>> in 'indicate-copied-region' as well (in addition to 'blink-matching-open'
>> where it's used originally)?
>
> Hm...  I'd think paren blinking and copy-region blinking would be
> something people would want to control separately.

Then for consistency with the existing defcustom
'blink-matching-paren-on-screen' the new defcustom's name could be
'blink-copy-region' or something like this.





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-20  0:52       ` Juri Linkov
@ 2020-08-20 13:01         ` Lars Ingebrigtsen
  2020-08-20 23:19           ` Juri Linkov
  0 siblings, 1 reply; 30+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-20 13:01 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 42865, Sean Whitton

Juri Linkov <juri@linkov.net> writes:

> Generally, different error levels should specify the message priority
> (debug, info, warning, error).  I'm not quite sure what functions
> correspond to these levels in Emacs.  Definitely, errors should be raised
> by the function 'error', but it seems most messages are informational.

They are, and it would be nice to allow users to switch them off
individually.  Your patch to implement this is temptingly short and easy:

> +  if (! inhibit_message && NILP (Fget (Vthis_command, Qinhibit_message)))

But I think this isn't flexible enough.  If you have one command calling
another command, and that command is the one with the message you want
to inhibit, you have to inhibit all the callers...  which you may not
want to:

(defun my-command ()
  (interactive)
  (chatty-command)
  (when once-in-a-while-there's-an-important-message
    (message "This is really important")))

there's no way to do that with this.

I think we'd have to introduce a new function, like...

(defun information (name &rest args)
  (when (information-wanted name)
    (apply #'message args)))

that would allow inhibiting messages based on names and or levels, so
copy-region would just have a

  (information 'copy-message ...)

instead of the message call.  (This is basically what Gnus does with
gnus-message, but there it's based on levels and not names.)

This would also allow users to say "switch off all purely informational
messages".

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-20  0:55       ` Juri Linkov
@ 2020-08-20 13:05         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 30+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-20 13:05 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 42865, Sean Whitton

Juri Linkov <juri@linkov.net> writes:

> Then for consistency with the existing defcustom
> 'blink-matching-paren-on-screen' the new defcustom's name could be
> 'blink-copy-region' or something like this.

Probably, if we add a separate functionality to disable the messaging...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-20 13:01         ` Lars Ingebrigtsen
@ 2020-08-20 23:19           ` Juri Linkov
  2020-08-21 11:28             ` Lars Ingebrigtsen
  0 siblings, 1 reply; 30+ messages in thread
From: Juri Linkov @ 2020-08-20 23:19 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 42865, Sean Whitton

> I think we'd have to introduce a new function, like...
>
> (defun information (name &rest args)
>   (when (information-wanted name)
>     (apply #'message args)))
>
> that would allow inhibiting messages based on names and or levels

This looks like the existing function 'user-error' that
doesn't enter the debugger when 'debug-on-error' is t.
Does the name 'user-message' make more sense?

But the problem is that it would be a huge endeavor
to replace all 'message' calls with a new function call.

So maybe a better route is to add a list of ignored messages like
'debug-ignored-errors' contains a list of regexps that match messages
to ignore.

Then this will disable display of the copy-region message:

  (add-to-list 'ignored-messages "^Saved text")





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-20 23:19           ` Juri Linkov
@ 2020-08-21 11:28             ` Lars Ingebrigtsen
  2020-08-23 18:39               ` Juri Linkov
  0 siblings, 1 reply; 30+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-21 11:28 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 42865, Sean Whitton

Juri Linkov <juri@linkov.net> writes:

> This looks like the existing function 'user-error' that
> doesn't enter the debugger when 'debug-on-error' is t.
> Does the name 'user-message' make more sense?

Yeah, that makes sense.

> But the problem is that it would be a huge endeavor
> to replace all 'message' calls with a new function call.

Well, we wouldn't want to do that -- we'd only replace the ones that
somebody thinks outputs a superfluous message.

> So maybe a better route is to add a list of ignored messages like
> 'debug-ignored-errors' contains a list of regexps that match messages
> to ignore.
>
> Then this will disable display of the copy-region message:
>
>   (add-to-list 'ignored-messages "^Saved text")

I'm not in favour of that -- different code can output the same message,
and it may be superfluous only from a specific function. 

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-21 11:28             ` Lars Ingebrigtsen
@ 2020-08-23 18:39               ` Juri Linkov
  2020-08-24 13:14                 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 30+ messages in thread
From: Juri Linkov @ 2020-08-23 18:39 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 42865, Sean Whitton

>> This looks like the existing function 'user-error' that
>> doesn't enter the debugger when 'debug-on-error' is t.
>> Does the name 'user-message' make more sense?
>
> Yeah, that makes sense.

Then like 'signal' uses 'ERROR-SYMBOL' as an error symbol, not string,
'user-message' should use a symbol as well, e.g. in 'indicate-copied-region':

  (user-message
   'indicate-copied-region
   "Saved text until \"%s\"" (buffer-substring-no-properties (- mark len) mark))

then users put a property on that symbol:

  (put 'indicate-copied-region 'inhibit-message t)

to disable the message.





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-23 18:39               ` Juri Linkov
@ 2020-08-24 13:14                 ` Lars Ingebrigtsen
  2020-08-24 13:26                   ` Stefan Kangas
  2020-08-24 18:38                   ` Juri Linkov
  0 siblings, 2 replies; 30+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-24 13:14 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 42865, Sean Whitton

Juri Linkov <juri@linkov.net> writes:

> Then like 'signal' uses 'ERROR-SYMBOL' as an error symbol, not string,
> 'user-message' should use a symbol as well, e.g. in 'indicate-copied-region':
>
>   (user-message
>    'indicate-copied-region
>    "Saved text until \"%s\"" (buffer-substring-no-properties (- mark len) mark))
>
> then users put a property on that symbol:
>
>   (put 'indicate-copied-region 'inhibit-message t)
>
> to disable the message.

Or we could have inhibit-message also be a list of symbols to inhibit?
That would allow easier defcustomizing, perhaps?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-24 13:14                 ` Lars Ingebrigtsen
@ 2020-08-24 13:26                   ` Stefan Kangas
  2020-08-24 14:00                     ` Lars Ingebrigtsen
  2020-08-24 18:38                   ` Juri Linkov
  1 sibling, 1 reply; 30+ messages in thread
From: Stefan Kangas @ 2020-08-24 13:26 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Juri Linkov; +Cc: 42865, Sean Whitton

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Juri Linkov <juri@linkov.net> writes:
>
>> Then like 'signal' uses 'ERROR-SYMBOL' as an error symbol, not string,
>> 'user-message' should use a symbol as well, e.g. in 'indicate-copied-region':
>>
>>   (user-message
>>    'indicate-copied-region
>>    "Saved text until \"%s\"" (buffer-substring-no-properties (- mark len) mark))
>>
>> then users put a property on that symbol:
>>
>>   (put 'indicate-copied-region 'inhibit-message t)
>>
>> to disable the message.
>
> Or we could have inhibit-message also be a list of symbols to inhibit?
> That would allow easier defcustomizing, perhaps?

Maybe it's less messy (and easier to document) if we just introduce a
new defcustom `inhibit-user-message'?





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-24 13:26                   ` Stefan Kangas
@ 2020-08-24 14:00                     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 30+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-24 14:00 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 42865, Juri Linkov, Sean Whitton

Stefan Kangas <stefankangas@gmail.com> writes:

> Maybe it's less messy (and easier to document) if we just introduce a
> new defcustom `inhibit-user-message'?

Yes, probably.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-24 13:14                 ` Lars Ingebrigtsen
  2020-08-24 13:26                   ` Stefan Kangas
@ 2020-08-24 18:38                   ` Juri Linkov
  2020-08-24 19:34                     ` Stefan Kangas
  1 sibling, 1 reply; 30+ messages in thread
From: Juri Linkov @ 2020-08-24 18:38 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 42865, Sean Whitton

>> Then like 'signal' uses 'ERROR-SYMBOL' as an error symbol, not string,
>> 'user-message' should use a symbol as well, e.g. in 'indicate-copied-region':
>>
>>   (user-message
>>    'indicate-copied-region
>>    "Saved text until \"%s\"" (buffer-substring-no-properties (- mark len) mark))
>>
>> then users put a property on that symbol:
>>
>>   (put 'indicate-copied-region 'inhibit-message t)
>>
>> to disable the message.
>
> Or we could have inhibit-message also be a list of symbols to inhibit?

Or a list of regexps for those users who want to inhibit message strings
directly by a regexp instead of messing with an intermediate layer of symbols :)

IOW, I still prefer the simplicity of such regexps as

  (add-to-list 'inhibit-message "^Saved text until")

and can't imagine a situation why I'd want to inhibit such message
for one command but not for another.





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-24 18:38                   ` Juri Linkov
@ 2020-08-24 19:34                     ` Stefan Kangas
  2020-08-25 18:40                       ` Juri Linkov
  0 siblings, 1 reply; 30+ messages in thread
From: Stefan Kangas @ 2020-08-24 19:34 UTC (permalink / raw)
  To: Juri Linkov, Lars Ingebrigtsen; +Cc: 42865, Sean Whitton

Juri Linkov <juri@linkov.net> writes:

> IOW, I still prefer the simplicity of such regexps as
>
>   (add-to-list 'inhibit-message "^Saved text until")
>
> and can't imagine a situation why I'd want to inhibit such message
> for one command but not for another.

One package says: "Saved text until end"

Another one says: "Saved text until end... failed, retry to avoid data
loss"

And then you have the joy when the message text changes...

Best regards,
Stefan Kangas





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-24 19:34                     ` Stefan Kangas
@ 2020-08-25 18:40                       ` Juri Linkov
  2020-08-26  0:36                         ` Stefan Kangas
  0 siblings, 1 reply; 30+ messages in thread
From: Juri Linkov @ 2020-08-25 18:40 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Lars Ingebrigtsen, 42865, Sean Whitton

>> IOW, I still prefer the simplicity of such regexps as
>>
>>   (add-to-list 'inhibit-message "^Saved text until")
>>
>> and can't imagine a situation why I'd want to inhibit such message
>> for one command but not for another.
>
> One package says: "Saved text until end"
>
> Another one says: "Saved text until end... failed, retry to avoid data
> loss"

Then it could match the whole message with $ at the end.

  (add-to-list 'inhibit-message "^Saved text until end$")

> And then you have the joy when the message text changes...

The message text changes not often.  But the symbol approach is much worse
because it takes the freedom from users - in case of symbols the developers
decide whether to allow the users to inhibit messages or not.  When developers
allow to inhibit some messages by adding a new symbol to the message function,
then it takes many years until the users can start using new symbols to
inhibit messages after the next release.

OTOH, in case of regexps, the users decide what text they want to inhibit
without waiting for developers adding new symbols.

For example, in https://debbugs.gnu.org/21893#23
I needed to inhibit the message from view-end-message.
With a regexp this would be very easy:

  (add-to-list 'inhibit-message "^End of buffer")

But currently I use such complicated advice:

  (advice-add 'view-end-message :around
              (lambda (orig-fun &rest args)
                (let ((inhibit-message t))
                  (apply orig-fun args)))
              '((name . non-verbose-view-end-message)))

Also using regexps will obsolete many such ad-hoc options as
'view-inhibit-help-message'.





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-25 18:40                       ` Juri Linkov
@ 2020-08-26  0:36                         ` Stefan Kangas
  2020-08-27 19:08                           ` Juri Linkov
  2020-11-15 20:40                           ` Juri Linkov
  0 siblings, 2 replies; 30+ messages in thread
From: Stefan Kangas @ 2020-08-26  0:36 UTC (permalink / raw)
  To: Juri Linkov; +Cc: Lars Ingebrigtsen, 42865, Sean Whitton

Juri Linkov <juri@linkov.net> writes:

> The message text changes not often.  But the symbol approach is much worse
> because it takes the freedom from users - in case of symbols the developers
> decide whether to allow the users to inhibit messages or not.  When developers
> allow to inhibit some messages by adding a new symbol to the message function,
> then it takes many years until the users can start using new symbols to
> inhibit messages after the next release.

I think you convinced me, thanks.  I still think people will shoot
themselves in the foot, but OTOH we are hardly strangers to that.

Let's hear what others have to say.





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-26  0:36                         ` Stefan Kangas
@ 2020-08-27 19:08                           ` Juri Linkov
  2020-11-15 20:40                           ` Juri Linkov
  1 sibling, 0 replies; 30+ messages in thread
From: Juri Linkov @ 2020-08-27 19:08 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Lars Ingebrigtsen, 42865, Sean Whitton

>> The message text changes not often.  But the symbol approach is much worse
>> because it takes the freedom from users - in case of symbols the developers
>> decide whether to allow the users to inhibit messages or not.  When developers
>> allow to inhibit some messages by adding a new symbol to the message function,
>> then it takes many years until the users can start using new symbols to
>> inhibit messages after the next release.
>
> I think you convinced me, thanks.  I still think people will shoot
> themselves in the foot, but OTOH we are hardly strangers to that.
>
> Let's hear what others have to say.

I'm allowed to have more than one opinion?  Since most 'message' calls
use FORMAT-STRING with ARGS, then like gettext translates FORMAT-STRING,
inhibit-message could also check FORMAT-STRING, instead of matching a regexp
on the formatted string.  So for example just check if "Saved text until \"%s\"",
was added to a user-defined list, and inhibit the message.





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-19 16:49     ` Lars Ingebrigtsen
@ 2020-09-10 16:05       ` Sean Whitton
  2020-09-11 11:57         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 30+ messages in thread
From: Sean Whitton @ 2020-09-10 16:05 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 42865

Hello Lars,

On Wed 19 Aug 2020 at 06:49PM +02, Lars Ingebrigtsen wrote:

> Let's give it a few more days to see whether anybody else has any views
> on this before committing, though.

I think the patch could be applied, because the discussion between you
and Juri about more involved possibilities, if it bears fruit, could
become a different implementation of the new defcustom?

-- 
Sean Whitton





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-09-10 16:05       ` Sean Whitton
@ 2020-09-11 11:57         ` Lars Ingebrigtsen
  2020-09-12 21:22           ` Sean Whitton
  0 siblings, 1 reply; 30+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-11 11:57 UTC (permalink / raw)
  To: Sean Whitton; +Cc: 42865

Sean Whitton <spwhitton@spwhitton.name> writes:

> On Wed 19 Aug 2020 at 06:49PM +02, Lars Ingebrigtsen wrote:
>
>> Let's give it a few more days to see whether anybody else has any views
>> on this before committing, though.
>
> I think the patch could be applied, because the discussion between you
> and Juri about more involved possibilities, if it bears fruit, could
> become a different implementation of the new defcustom?

That's true, but parts of your patch would then become superfluous,
wouldn't it?  So it may be worth it to wait a bit more to see whether
the more general message suppression idea gets any traction...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-09-11 11:57         ` Lars Ingebrigtsen
@ 2020-09-12 21:22           ` Sean Whitton
  2020-09-13 13:09             ` Lars Ingebrigtsen
  0 siblings, 1 reply; 30+ messages in thread
From: Sean Whitton @ 2020-09-12 21:22 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 42865

Hello,

On Fri 11 Sep 2020 at 01:57PM +02, Lars Ingebrigtsen wrote:

> Sean Whitton <spwhitton@spwhitton.name> writes:
>
>> On Wed 19 Aug 2020 at 06:49PM +02, Lars Ingebrigtsen wrote:
>>
>>> Let's give it a few more days to see whether anybody else has any views
>>> on this before committing, though.
>>
>> I think the patch could be applied, because the discussion between you
>> and Juri about more involved possibilities, if it bears fruit, could
>> become a different implementation of the new defcustom?
>
> That's true, but parts of your patch would then become superfluous,
> wouldn't it?  So it may be worth it to wait a bit more to see whether
> the more general message suppression idea gets any traction...

Fair enough, certainly happy to wait.

As I think you realise, We'll still want some version of my patch for
the blinking cursor suppression.

-- 
Sean Whitton





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-09-12 21:22           ` Sean Whitton
@ 2020-09-13 13:09             ` Lars Ingebrigtsen
  2021-06-06  9:20               ` Lars Ingebrigtsen
  0 siblings, 1 reply; 30+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-13 13:09 UTC (permalink / raw)
  To: Sean Whitton; +Cc: 42865

Sean Whitton <spwhitton@spwhitton.name> writes:

> As I think you realise, We'll still want some version of my patch for
> the blinking cursor suppression.

Yes, definitely.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-19 10:25     ` Lars Ingebrigtsen
  2020-08-20  0:52       ` Juri Linkov
  2020-08-20  0:55       ` Juri Linkov
@ 2020-11-15 20:33       ` Juri Linkov
  2 siblings, 0 replies; 30+ messages in thread
From: Juri Linkov @ 2020-11-15 20:33 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 42865, Sean Whitton

>> Regarding disabling the "swapping point and mark" feature: since
>> 'indicate-copied-region' uses 'blink-matching-delay', shouldn't this
>> behaviour be disabled by the existing option 'blink-matching-paren-on-screen'
>> in 'indicate-copied-region' as well (in addition to 'blink-matching-open'
>> where it's used originally)?
>
> Hm...  I'd think paren blinking and copy-region blinking would be
> something people would want to control separately.

Now a separate option 'copy-region-blink-delay' was added together
with a similar option 'delete-pair-blink-delay' from bug#4136.

Inhibiting messages selectively will be implemented an another patch.





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-08-26  0:36                         ` Stefan Kangas
  2020-08-27 19:08                           ` Juri Linkov
@ 2020-11-15 20:40                           ` Juri Linkov
  1 sibling, 0 replies; 30+ messages in thread
From: Juri Linkov @ 2020-11-15 20:40 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Lars Ingebrigtsen, 42865, Sean Whitton

>> The message text changes not often.  But the symbol approach is much worse
>> because it takes the freedom from users - in case of symbols the developers
>> decide whether to allow the users to inhibit messages or not.  When developers
>> allow to inhibit some messages by adding a new symbol to the message function,
>> then it takes many years until the users can start using new symbols to
>> inhibit messages after the next release.
>
> I think you convinced me, thanks.  I still think people will shoot
> themselves in the foot, but OTOH we are hardly strangers to that.

In bug#44629 Eli reminded about set-message-function, and indeed
it's possible to make it safer by checking both the command name
and message regexp.  For example:

  (put 'kill-ring-save 'inhibit-message "^Copied text ")
  (put 'save-buffer 'inhibit-message "^Wrote ")
  (put 'read-only-mode 'inhibit-message "^View mode: type ")

  (defun inhibit-message-function (message)
    (and this-command
         (get this-command 'inhibit-message)
         (string-match-p (get this-command 'inhibit-message) message)))

  (setq set-message-function 'inhibit-message-function)





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2020-09-13 13:09             ` Lars Ingebrigtsen
@ 2021-06-06  9:20               ` Lars Ingebrigtsen
  2021-06-28  2:02                 ` Sean Whitton
  0 siblings, 1 reply; 30+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-06  9:20 UTC (permalink / raw)
  To: Sean Whitton; +Cc: 42865

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Sean Whitton <spwhitton@spwhitton.name> writes:
>
>> As I think you realise, We'll still want some version of my patch for
>> the blinking cursor suppression.
>
> Yes, definitely.

This was added in:

commit 81588748bd85827468e297d3e44a72844438e807
Author:     Juri Linkov <juri@linkov.net>
AuthorDate: Sun Nov 15 22:32:39 2020 +0200
Commit:     Juri Linkov <juri@linkov.net>
CommitDate: Sun Nov 15 22:32:39 2020 +0200

    New user options 'copy-region-blink-delay' and 'delete-pair-blink-delay'

And `set-message-function' is the general facility to allow users to
suppress/alter messaging, so I think everything here is covered now, and
I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
  2021-06-06  9:20               ` Lars Ingebrigtsen
@ 2021-06-28  2:02                 ` Sean Whitton
  0 siblings, 0 replies; 30+ messages in thread
From: Sean Whitton @ 2021-06-28  2:02 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 42865

Hello,

On Sun 06 Jun 2021 at 11:20AM +02, Lars Ingebrigtsen wrote:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> Sean Whitton <spwhitton@spwhitton.name> writes:
>>
>>> As I think you realise, We'll still want some version of my patch for
>>> the blinking cursor suppression.
>>
>> Yes, definitely.
>
> This was added in:
>
> commit 81588748bd85827468e297d3e44a72844438e807
> Author:     Juri Linkov <juri@linkov.net>
> AuthorDate: Sun Nov 15 22:32:39 2020 +0200
> Commit:     Juri Linkov <juri@linkov.net>
> CommitDate: Sun Nov 15 22:32:39 2020 +0200
>
>     New user options 'copy-region-blink-delay' and 'delete-pair-blink-delay'
>
> And `set-message-function' is the general facility to allow users to
> suppress/alter messaging, so I think everything here is covered now, and
> I'm closing this bug report.

Thanks for the notification, and to those who worked on this!

-- 
Sean Whitton





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

end of thread, other threads:[~2021-06-28  2:02 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-14 17:38 bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom Sean Whitton
2020-08-18 13:37 ` Lars Ingebrigtsen
2020-08-19  1:16   ` Juri Linkov
2020-08-19 10:25     ` Lars Ingebrigtsen
2020-08-20  0:52       ` Juri Linkov
2020-08-20 13:01         ` Lars Ingebrigtsen
2020-08-20 23:19           ` Juri Linkov
2020-08-21 11:28             ` Lars Ingebrigtsen
2020-08-23 18:39               ` Juri Linkov
2020-08-24 13:14                 ` Lars Ingebrigtsen
2020-08-24 13:26                   ` Stefan Kangas
2020-08-24 14:00                     ` Lars Ingebrigtsen
2020-08-24 18:38                   ` Juri Linkov
2020-08-24 19:34                     ` Stefan Kangas
2020-08-25 18:40                       ` Juri Linkov
2020-08-26  0:36                         ` Stefan Kangas
2020-08-27 19:08                           ` Juri Linkov
2020-11-15 20:40                           ` Juri Linkov
2020-08-20  0:55       ` Juri Linkov
2020-08-20 13:05         ` Lars Ingebrigtsen
2020-11-15 20:33       ` Juri Linkov
2020-08-19 16:36     ` Sean Whitton
2020-08-19 16:32   ` Sean Whitton
2020-08-19 16:49     ` Lars Ingebrigtsen
2020-09-10 16:05       ` Sean Whitton
2020-09-11 11:57         ` Lars Ingebrigtsen
2020-09-12 21:22           ` Sean Whitton
2020-09-13 13:09             ` Lars Ingebrigtsen
2021-06-06  9:20               ` Lars Ingebrigtsen
2021-06-28  2:02                 ` Sean Whitton

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