From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.bugs Subject: bug#45872: 27.1; rcirc nick tracking Date: Thu, 14 Jan 2021 14:42:40 -0500 Message-ID: <87zh1bwbin.fsf@redhat.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16908"; mail-complaints-to="usenet@ciao.gmane.io" To: 45872@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 14 20:43:54 2021 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 1l08XB-0004JW-Vt for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jan 2021 20:43:54 +0100 Original-Received: from localhost ([::1]:34392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l08XB-0006eO-00 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jan 2021 14:43:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l08WM-0005q2-I2 for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 14:43:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56008) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l08WM-0001AW-89 for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 14:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l08WM-0004ex-2i for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 14:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ken Raeburn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jan 2021 19:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45872 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.161065338117902 (code B ref -1); Thu, 14 Jan 2021 19:43:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Jan 2021 19:43:01 +0000 Original-Received: from localhost ([127.0.0.1]:39321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l08WK-0004eg-Cl for submit@debbugs.gnu.org; Thu, 14 Jan 2021 14:43:00 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:54792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l08WG-0004eX-Tc for submit@debbugs.gnu.org; Thu, 14 Jan 2021 14:42:58 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l08WG-0005nU-KZ for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 14:42:56 -0500 Original-Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:56192) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l08WD-00016j-Ee for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 14:42:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610653369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=km+tARpXKsMQhJeoiWL6G18gLqzCDOdj2XzsDaW5pSA=; b=iNP8rLpOwklG41eMO6+nDcI3a/yqlav8QWphqGgUoVCW99iwTMnW7E0wsFTnzZ0A22ezzt E9IABaKDGCexBx8S9NJ0JwQEJdRT0pfdHXEC//TNR3mypGxzF6C/xWgnW1jzmQtXOJ0RaY ynVN8O8lkU9G1aFQbC+LL0Fv2j8RQ+w= Original-Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-589-5CBTHO4xNZGSraOnyUmKrQ-1; Thu, 14 Jan 2021 14:42:47 -0500 X-MC-Unique: 5CBTHO4xNZGSraOnyUmKrQ-1 Original-Received: by mail-pl1-f197.google.com with SMTP id 32so3809236plf.3 for ; Thu, 14 Jan 2021 11:42:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=km+tARpXKsMQhJeoiWL6G18gLqzCDOdj2XzsDaW5pSA=; b=hwPI8Jy85+MQb8HG/ZJGoNUahp75PXa3D1W+KkDyCj+UPmyYW2Ox3Cw8B09g5stbAn 3tSJ7gjmdicqr+t0Lw17ph0s6V6HpnlhDrHBnzu9LpyvZQHZkPnXJOuOeoddtf5ZsrAd 2COvFBM/w0I0foANKfYIeC01/pcu4QTvXcAQv3trc5TMXtfEb4/GQcIRvWLMRbULN7pE SW9cRmd7IOIgaYmUhELBzUcuvypg3GxrwzPekMcvNYzhs3BCdpWKylRkFW1YcasBgS+Z dCuggSZMNSdMjV5IZ/w/A81AsTB0jHV7vfd9OrDNVYbLP+g6+CKETgzfRyaLbkqhLApP 6jqg== X-Gm-Message-State: AOAM533wajh84FhomPvZq3DhMg6w35j0IPhi0P7tj1iaT4H514or63VW tVUBFutTg0I9E4X3zmwOncVui61NskOcHyt8gj6FIz0xvu/WQ/FCnYsRof5olxwGeW92LhSNjD5 U/tfdsZzL7Qg6mKA= X-Received: by 2002:a62:3:0:b029:160:d92:2680 with SMTP id 3-20020a6200030000b02901600d922680mr8726679pfa.44.1610653366341; Thu, 14 Jan 2021 11:42:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVx5dsZODnk7YkkIBzZysJocwK/smQ/hEV3hyErpLoADjQuMk8W27YClGpTbmHagRU4Mjapw== X-Received: by 2002:a62:3:0:b029:160:d92:2680 with SMTP id 3-20020a6200030000b02901600d922680mr8726644pfa.44.1610653365930; Thu, 14 Jan 2021 11:42:45 -0800 (PST) Original-Received: from crash (c-71-233-156-139.hsd1.ma.comcast.net. [71.233.156.139]) by smtp.gmail.com with ESMTPSA id b11sm5840486pfr.38.2021.01.14.11.42.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 11:42:45 -0800 (PST) Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=raeburn@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=raeburn@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.248, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:197961 Archived-At: One of my IRC contacts uses frequent nick changes to indicate away status, e.g., "johnsmith" when available, "johnsmith|away", "johnsmith|vacation", whatever. I've noticed that sometimes rcirc will fail to rename the buffer used for private messages between us, and so I'll wind up with a buffer "johnsmith|away" showing something along the lines of: ... *** johnsmith NICK johnsmith|away ... *** johnsmith|away NICK johnsmith but the buffer won't have been renamed back to "johnsmith@", and if I try sending him a message, it'll try sending to johnsmith|away and will fail. I can use "/msg johnsmith...", or he can send messages to me, and a new buffer will be created. If, after this new buffer has been created, he issues a NICK command, rcirc will attempt a rename, and may error out if it conflicts with the existing johnsmith|away buffer. The issue seems to be that rcirc-handler-NICK looks up the chat buffer using rcirc-get-buffer, which uses rcirc-buffer-alist, but doesn't update that alist, so a second invocation of rcirc-get-buffer using the new nick won't find that buffer. But fixing the assoc list won't address buffer renaming conflicts caused by nick changes happening while I'm offline; if rcirc renames a buffer to "johnsmith|away@server" and then I get disconnected, and when I reconnect I see "johnsmith" active and start exchanging messages (in a new buffer), and later I receive a NICK message causing another rename to "johnsmith|away@server", it'll conflict with the existing one. If the server isn't authenticating, we can't guarantee that the old "johnsmith|away" and the new "johnsmith" really are the same user, so I'm not sure if we should blithely try combining them or make them unique; erroring out during a rename is an ugly failure mode though. In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars) of 2020-11-10 built on crash Windowing system distributor 'Fedora Project', version 11.0.12006000 System Description: Fedora 31 (Workstation Edition) Recent messages: Mark set [2 times] Quit Mark set Quit Mark set [2 times] Saving file /home/raeburn/.private/notes.org... Wrote /home/raeburn/.private/notes.org GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars) of 2020-11-10 Configured using: 'configure --prefix=/home/raeburn/dev/emacs/Install-20201110T0556 --with-x-toolkit=lucid' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: IELM Minor modes in effect: async-bytecomp-package-mode: t shell-dirtrack-mode: t rcirc-track-minor-mode: t display-time-mode: t desktop-save-mode: t global-edit-server-edit-mode: t which-function-mode: t icomplete-mode: t global-hi-lock-mode: t hi-lock-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tab-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /home/raeburn/elisp/with-editor hides /home/raeburn/.emacs.d/elpa/with-editor-20181113.1845/with-editor Features: (shadow emacsbug flyspell gnus-icalendar icalendar diary-lib diary-loaddefs novice systemtap-mode cc-awk apropos descr-text dired-aux mailalias smtpmail sendmail thai-util thai-word ispell pcmpl-unix pcmpl-gnu cc-langs completion gnus-eform etags fileloop xref project tramp-cmds follow flow-fill edmacro kmacro rect ibuf-ext ibuffer ibuffer-loaddefs term/xterm xterm cl-print ielm warnings nroff-mode eieio-opt speedbar sb-image ezimage dframe bookmark tabify timezone org-protocol pp help-fns radix-tree cus-edit org-capture grep url-http url-gw url-auth url-cache shr-color color mm-archive gnus-topic sort smiley gnus-cite mail-extr gnus-async gnus-bcklg qp gnus-ml mule-util cal-move with-editor async-bytecomp async ruby-mode misearch multi-isearch nndraft nnmh nnfolder utf-7 gnutls gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache tramp-cache tramp-sh vagrant-tramp dash tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat ls-lisp network-stream nsm add-log face-remap conf-mode adaptive-wrap make-mode yaml-mode sh-script smie executable eww mm-url thingatpt url-queue cperl-mode smerge-mode diff perl-mode rst compile objdump vc-git diff-mode cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-extra help-mode org-element avl-tree generator ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnir ol-docview doc-view jka-compr image-mode exif ol-bibtex bibtex ol-bbdb ol-w3m org org-macro org-footnote org-pcomplete org-list org-faces org-entities noutline outline org-version ob-shell shell pcomplete ob ob-tangle org-src ob-ref ob-lob ob-table ob-exp ob-comint ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs rcirc gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum url url-proxy url-privacy url-expand url-methods url-history mailcap shr url-cookie url-domsuf url-util svg xml dom gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int gnus-range message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums text-property-search time-date mail-utils mm-util mail-prsvr wid-edit time desktop frameset cus-start cus-load kr-init edit-server iso-transl advice smart-quotes easy-mmode which-func imenu icomplete server term disp-table comint ansi-color ehelp ring hi-lock finder-inf info package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 40581826 2812970) (symbols 48 52910 12) (strings 32 1258102 286070) (string-bytes 1 37999133) (vectors 16 91413) (vector-slots 8 2960172 1274366) (floats 8 689 867) (intervals 56 4370790 62376) (buffers 1000 514))