unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "J.P." <jp@neverwas.me>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-erc@gnu.org, 62833@debbugs.gnu.org
Subject: bug#62833: 30.0.50; ERC 5.6: Rethink buffer-display options and behavior
Date: Sun, 04 Jun 2023 07:52:20 -0700	[thread overview]
Message-ID: <877csje0uz.fsf__19768.6912653566$1685890409$gmane$org@neverwas.me> (raw)
In-Reply-To: <87leiuy3cv.fsf@neverwas.me> (J. P.'s message of "Fri, 14 Apr 2023 06:56:16 -0700")

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

Hi Eli,

This is regarding a small prospective change to ERC on Emacs 29 that's
been discussed here and there over the past few months [1]. Basically,
ERC has long defaulted to displaying new buffers in the currently
selected window, with the symbol `buffer' representing this display
style in various user options. Because new buffers are often created as
a result of server-initiated messages or feature-driven automated
mechanisms, like "autojoin", they can suddenly appear unceremoniously
and steal keyboard input. For this reason, `buffer' was deemed a
nuisance (if not a hazard), and the default was changed to a no-op in
ERC 5.5 [2].

However, since then, a faint but steady murmur of discontent has been
thrumming among mostly new and casual users, who've described ERC as
being "broken" in this regard because it provides little to no obvious
feedback following certain fundamental user actions, like connecting to
a server or joining a channel. IOW, users can't tell whether ERC is
responding to a command they've just issued, despite subtle cues, like
activity in the echo area and the mode line.

The solution to all this isn't straightforward, and we're making headway
on it for ERC 5.6. In the meantime, I'm wondering if we might consider
appeasing these disgruntled users somehow. Normally, I'd prefer just
reverting back to `buffer', but because much has been made about its
potential for causing mayhem via unintended sharing, I'm thinking we
might change the default in Emacs 29 to `window-noselect'. This value
tells ERC to show new buffers in a sibling window of the same vertical
combination. Such a change would be accompanied by a bump in the patch
component of our already 29-specific ERC version, bringing us from
5.5.0.29.1 to 5.5.1.29.1. I believe the attached patch does what I've
described.

Thanks,
J.P.

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60428#31
    https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62833#17
    https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62833#23

[2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51753#71



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-erc-join-buffer-hotfix-in-new-version-5.5.1.29.1.patch --]
[-- Type: text/x-patch, Size: 5763 bytes --]

From 420a95e855b4e01e57dc1a97dbeac06f6a4af779 Mon Sep 17 00:00:00 2001
From: "F. Jason Park" <jp@neverwas.me>
Date: Fri, 19 May 2023 08:10:49 -0700
Subject: [PATCH] Add erc-join-buffer hotfix in new version 5.5.1.29.1

* doc/misc/erc.texi: Change ERCVER to 5.5.1.29.1.
* etc/ERC-NEWS: Add new section for 5.5.1.29.1, and mention the
default for `erc-join-buffer' has changed to `window-noselect'.
* lisp/erc/erc.el (erc-version): Update version to 5.5.1.29.1, and do
the same for the file's Version header.  The rationale for
incrementing the third, "patch" component is that the trailing "29.1"
portion merely indicates (1) that this exact version of ERC is
Emacs-only and does not exist on GNU ELPA and (2) that it contains at
most trivial changes, such as comments and documentation, atop its
corresponding GNU ELPA release, if any (here, there is no such
5.5.1 counterpart on ELPA).
(erc-join-buffer): Change default to `window-noselect'.
* test/lisp/erc/erc-scenarios-base-association.el
(erc-scenarios-networks-merge-server-track): Bind `erc-join-buffer'
to `bury'.
* test/lisp/erc/erc-scenarios-base-reconnect.el
(erc-scenarios-base-reconnect-options--buffer,
erc-scenarios-base-reconnect-options--default): Skip tests because
option `erc-reconnect-display' is bugged in ERC 5.5.  (Bug#62833)
---
 doc/misc/erc.texi                               |  2 +-
 etc/ERC-NEWS                                    | 12 ++++++++++--
 lisp/erc/erc.el                                 |  6 +++---
 test/lisp/erc/erc-scenarios-base-association.el |  1 +
 test/lisp/erc/erc-scenarios-base-reconnect.el   |  4 ++--
 5 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi
index 7f26b9ed181..ca294788c57 100644
--- a/doc/misc/erc.texi
+++ b/doc/misc/erc.texi
@@ -2,7 +2,7 @@
 @c %**start of header
 @setfilename ../../info/erc.info
 @settitle ERC Manual
-@set ERCVER 5.5.0.29.1
+@set ERCVER 5.5.1.29.1
 @set ERCDIST as distributed with Emacs @value{EMACSVER}
 @include docstyle.texi
 @syncodeindex fn cp
diff --git a/etc/ERC-NEWS b/etc/ERC-NEWS
index 9672a86345b..684ff932d34 100644
--- a/etc/ERC-NEWS
+++ b/etc/ERC-NEWS
@@ -11,6 +11,16 @@ This file is about changes in ERC, the powerful, modular, and
 extensible IRC (Internet Relay Chat) client distributed with
 GNU Emacs since Emacs version 22.1.
 
+\f
+* Changes in ERC 5.5.1.29.1
+
+** Option 'erc-join-buffer' defaults to 'window-noselect'.
+In response to pushback about the switch from 'buffer' to 'bury', this
+option's default has once again been changed, this time exclusively
+for Emacs 29.  ERC now attempts to display a new or reassociated
+buffer in another window, creating one if necessary, even when the
+selected window already displays the buffer.
+
 \f
 * Changes in ERC 5.5
 
@@ -80,8 +90,6 @@ can now opt for an improved 'window-noselect' instead.  It still
 offers the same pronounced visual cue when connecting and joining but
 now avoids any hijacking of the active window as well.
 
-(Edited for ERC 5.5.0.29.1 in Emacs 29.1.)
-
 ** Improved handling of multiline prompt input.
 This means better detection and handling of intervening and trailing
 blanks when 'erc-send-whitespace-lines' is active.  New options have
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index c7e1645ec26..688bd1c4fd4 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -12,7 +12,7 @@
 ;;               David Edmondson (dme@dme.org)
 ;;               Michael Olson (mwolson@gnu.org)
 ;;               Kelvin White (kwhite@gnu.org)
-;; Version: 5.5.0.29.1
+;; Version: 5.5.1.29.1
 ;; Package-Requires: ((emacs "27.1") (compat "29.1.3.4"))
 ;; Keywords: IRC, chat, client, Internet
 ;; URL: https://www.gnu.org/software/emacs/erc.html
@@ -71,7 +71,7 @@
 (require 'iso8601)
 (eval-when-compile (require 'subr-x) (require 'url-parse))
 
-(defconst erc-version "5.5.0.29.1"
+(defconst erc-version "5.5.1.29.1"
   "This version of ERC.")
 
 (defvar erc-official-location
@@ -1469,7 +1469,7 @@ erc-default-port-tls
   "IRC port to use for encrypted connections if it cannot be \
 detected otherwise.")
 
-(defcustom erc-join-buffer 'bury
+(defcustom erc-join-buffer 'window-noselect
   "Determines how to display a newly created IRC buffer.
 
 The available choices are:
diff --git a/test/lisp/erc/erc-scenarios-base-association.el b/test/lisp/erc/erc-scenarios-base-association.el
index a40a4cb7550..3ac1089c541 100644
--- a/test/lisp/erc/erc-scenarios-base-association.el
+++ b/test/lisp/erc/erc-scenarios-base-association.el
@@ -207,6 +207,7 @@ erc-scenarios-networks-merge-server-track
        (dumb-server (erc-d-run "localhost" t 'track 'track))
        (port (process-contact dumb-server :service))
        (erc-server-flood-penalty 0.1)
+       (erc-join-buffer 'bury)
        (expect (erc-d-t-make-expecter)))
 
     (ert-info ("Connect")
diff --git a/test/lisp/erc/erc-scenarios-base-reconnect.el b/test/lisp/erc/erc-scenarios-base-reconnect.el
index 5b4dc549042..63ed21ba644 100644
--- a/test/lisp/erc/erc-scenarios-base-reconnect.el
+++ b/test/lisp/erc/erc-scenarios-base-reconnect.el
@@ -118,7 +118,7 @@ erc-scenarios-common--base-reconnect-options
 
 (ert-deftest erc-scenarios-base-reconnect-options--buffer ()
   :tags '(:expensive-test)
-  (should (eq erc-join-buffer 'bury))
+  (ert-skip "Feature broken in ERC 5.5")
   (should-not erc-reconnect-display)
 
   ;; FooNet (the server buffer) is not switched to because it's
@@ -138,7 +138,7 @@ erc-scenarios-base-reconnect-options--buffer
 
 (ert-deftest erc-scenarios-base-reconnect-options--default ()
   :tags '(:expensive-test)
-  (should (eq erc-join-buffer 'bury))
+  (ert-skip "Feature broken in ERC 5.5")
   (should-not erc-reconnect-display)
 
   (erc-scenarios-common--base-reconnect-options
-- 
2.40.1


  parent reply	other threads:[~2023-06-04 14:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87leiuy3cv.fsf@neverwas.me>
2023-04-21 14:03 ` bug#62833: 30.0.50; ERC 5.6: Rethink buffer-display options and behavior J.P.
     [not found] ` <87354tcoyk.fsf@neverwas.me>
2023-04-24 14:34   ` J.P.
2023-05-08 22:26 ` J.P.
     [not found] ` <87jzxie9yf.fsf@neverwas.me>
2023-05-10 21:43   ` Corwin Brust
     [not found]   ` <CAJf-WoTk1vT3gVSHdO7MRs6Rfn4PRcs8UWM=mw_NbzeCGHDfvQ@mail.gmail.com>
2023-05-13 14:03     ` J.P.
     [not found]     ` <87sfc08h19.fsf@neverwas.me>
2023-06-02 14:06       ` J.P.
2023-05-16 14:37 ` Phillip Susi
2023-06-04 14:52 ` J.P. [this message]
     [not found] ` <877csje0uz.fsf@neverwas.me>
2023-06-04 15:28   ` Eli Zaretskii
     [not found]   ` <837csj5jsh.fsf@gnu.org>
2023-06-04 21:36     ` J.P.
2023-06-09 13:50 ` J.P.
2023-06-22 13:48   ` J.P.
2023-07-08 14:19 ` J.P.
     [not found] ` <87r0pi32po.fsf@neverwas.me>
2023-07-14  2:11   ` J.P.
2023-04-14 13:56 J.P.

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='877csje0uz.fsf__19768.6912653566$1685890409$gmane$org@neverwas.me' \
    --to=jp@neverwas.me \
    --cc=62833@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-erc@gnu.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.
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).