From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "J.P." Newsgroups: gmane.emacs.bugs Subject: bug#63595: 30.0.50; ERC 5.6: Add buffer-list and nick-list modules Date: Sun, 31 Mar 2024 18:42:15 -0700 Message-ID: <87h6glg8p4.fsf__16293.3335102693$1711935816$gmane$org@neverwas.me> References: <87lehkt97a.fsf@neverwas.me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17891"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-erc@gnu.org To: 63595@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 01 03:43:28 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rr6hr-0004VK-Ds for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Apr 2024 03:43:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rr6hR-0005vq-2B; Sun, 31 Mar 2024 21:43:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rr6hQ-0005vb-7A for bug-gnu-emacs@gnu.org; Sun, 31 Mar 2024 21:43:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rr6hP-0002oS-VM for bug-gnu-emacs@gnu.org; Sun, 31 Mar 2024 21:42:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rr6hS-0002vi-G6 for bug-gnu-emacs@gnu.org; Sun, 31 Mar 2024 21:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "J.P." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Apr 2024 01:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63595 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 63595-submit@debbugs.gnu.org id=B63595.171193575011021 (code B ref 63595); Mon, 01 Apr 2024 01:43:02 +0000 Original-Received: (at 63595) by debbugs.gnu.org; 1 Apr 2024 01:42:30 +0000 Original-Received: from localhost ([127.0.0.1]:49177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rr6gv-0002rh-QJ for submit@debbugs.gnu.org; Sun, 31 Mar 2024 21:42:30 -0400 Original-Received: from mail-108-mta43.mxroute.com ([136.175.108.43]:42873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rr6gs-0002rX-Np for 63595@debbugs.gnu.org; Sun, 31 Mar 2024 21:42:28 -0400 Original-Received: from filter006.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta43.mxroute.com (ZoneMTA) with ESMTPSA id 18e9752516a0003bea.001 for <63595@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 01 Apr 2024 01:42:18 +0000 X-Zone-Loop: 606b040dcff6101959f99f124469ddea8a9e75e704cd X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ROTdZJJBQT0qckbXnpQj/JUw00k/EZLFbSnLK75vxkQ=; b=GFO5W9o0lU/ToweaAPRhWjIxvZ ampiqldKQKeWORdouvgKZCz1cHTSxwJCL5xNkCp3e6bbcpoVWU1f73xWAr1ZN+ErNeYo2CEBK2k1h Jv/YJKrOXCR38fpBP0m23EsSG2/36B+RjAzpD2ycQ1wW9Yz0lcrjQDpOGRAfAjrquwmGbDn25ynyp xo+Idlc6dJUMIPJwEv3snpWN82x/opsf2DTYsZsEJYAq6rIih57i4BseFwwOHuEi7b0zPVihsNj6t h30LnOcuHsAJsk6AZbXkMFiSA550xobGNDRor5cgMo/+ubErvfCLMdjACQebovNluY1OcrBWeT003 VjJWxBeg==; In-Reply-To: <87lehkt97a.fsf@neverwas.me> (J. P.'s message of "Fri, 19 May 2023 12:25:29 -0700") X-Authenticated-Id: masked@neverwas.me X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282450 Archived-At: --=-=-= Content-Type: text/plain It's been reported that the nickbar (speedbar) window doesn't display the cursor on at least one user's setup. I've found this to be true by default on non-graphic displays. The attached patch should fix the latter regression. As to whether it also fixes the reporter's issue is TBD. It's also been reported that the dframe timer can signal a (wrong-type-argument window-live-p nil) which then gets trapped by the (with-demoted-errors "DFRAME TIMER ERROR: %S"...) in `dframe-timer-fn'. Unfortunately, remediation is trickier here because we've got to inspect calls to `window-live-p' stemming from `speedbar-timer-fn', possibly via `erc-speedbar-insert-user'. (What we really need is a backtrace from the bug reporter.) --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-5.6-Fix-invisible-erc-speedbar-cursor-in-text-termin.patch >From 910b6981da743bdc661241f54e26e9b163f239d1 Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Sun, 31 Mar 2024 16:32:44 -0700 Subject: [PATCH] [5.6] Fix invisible erc-speedbar cursor in text terminals * lisp/erc/erc-speedbar.el (erc-speedbar--reset-last-ran-on-timer): Use `with-current-buffer' instead of `setf' and `buffer-local-value'. (erc-nickbar-mode, erc-nickbar-enable, erc-nickbar-disable) (erc-speedbar-toggle-nicknames-window-lock): Revise doc string. (erc-speedbar-toggle-nicknames-window-lock): Set `cursor-type' in speedbar buffer. (erc-nickbar-toggle-nicknames-window-lock): New function alias. Note that this name flouts traditional library namespacing conventions. * lisp/erc/erc-status-sidebar.el (erc-status-sidebar-get-window): Use `cursor-type' instead of `internal-show-cursor'. (Bug#63595) --- lisp/erc/erc-speedbar.el | 23 ++++++++++++++--------- lisp/erc/erc-status-sidebar.el | 2 +- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/lisp/erc/erc-speedbar.el b/lisp/erc/erc-speedbar.el index a81a3869436..b156f61d5d9 100644 --- a/lisp/erc/erc-speedbar.el +++ b/lisp/erc/erc-speedbar.el @@ -566,9 +566,8 @@ erc-speedbar--run-timer-on-post-insert (defun erc-speedbar--reset-last-ran-on-timer () "Reset `erc-speedbar--last-ran'." (when speedbar-buffer - (with-suppressed-warnings ((obsolete buffer-local-value)) ; <=29 - (setf (buffer-local-value 'erc-speedbar--last-ran speedbar-buffer) - (current-time))))) + (with-current-buffer speedbar-buffer + (setq erc-speedbar--last-ran (current-time))))) ;;;###autoload(autoload 'erc-nickbar-mode "erc-speedbar" nil t) (define-erc-module nickbar nil @@ -578,10 +577,12 @@ nickbar separate frame. When disabling, close the window or, with a negative prefix arg, destroy the session. -WARNING: this module may produce unwanted side effects, like the -raising of frames or the stealing of input focus. If you witness -such a thing and can reproduce it, please file a bug report with -\\[erc-bug]." +For controlling whether the speedbar window is selectable with +`other-window', see `erc-nickbar-toggle-nicknames-window-lock'. +Note that during initialization, this module may produce unwanted +side effects, like the raising of frames or the stealing of input +focus. If you witness such a thing and can reproduce it, please +file a bug report with \\[erc-bug]." ((add-hook 'erc--setup-buffer-hook #'erc-speedbar--ensure) (add-hook 'erc-insert-post-hook #'erc-speedbar--run-timer-on-post-insert) (add-hook 'speedbar-timer-hook #'erc-speedbar--reset-last-ran-on-timer) @@ -638,8 +639,8 @@ erc-speedbar--dframe-controlled (defun erc-speedbar-toggle-nicknames-window-lock (arg) "Toggle whether nicknames window is selectable with \\[other-window]. -When arg is a number, lock the window if non-negative, otherwise -unlock." +When ARG is a number, lock the window if non-negative. Otherwise, +unlock the window." (interactive "P") (unless erc-nickbar-mode (user-error "`erc-nickbar-mode' inactive")) @@ -648,10 +649,14 @@ erc-speedbar-toggle-nicknames-window-lock ((integerp arg) nil) (t (not (window-parameter window 'no-other-window)))))) + (with-current-buffer speedbar-buffer + (setq cursor-type (not val))) (set-window-parameter window 'no-other-window val) (unless (numberp arg) (message "nick-window: %s" (if val "protected" "selectable")))))) +(defalias 'erc-nickbar-toggle-nicknames-window-lock + #'erc-speedbar-toggle-nicknames-window-lock) ;;;; Nicks integration diff --git a/lisp/erc/erc-status-sidebar.el b/lisp/erc/erc-status-sidebar.el index b7695651e4c..dcdef7cfafc 100644 --- a/lisp/erc/erc-status-sidebar.el +++ b/lisp/erc/erc-status-sidebar.el @@ -192,7 +192,7 @@ erc-status-sidebar-get-window (set-window-parameter sidebar-window 'no-delete-other-windows t) ;; Don't cycle to this window with `other-window'. (set-window-parameter sidebar-window 'no-other-window t) - (internal-show-cursor sidebar-window nil) + (setq cursor-type nil) (set-window-fringes sidebar-window 0 0) ;; Set a custom display table so the window doesn't show a ;; truncation symbol when a channel name is too big. -- 2.44.0 --=-=-=--