GNU bug report logs - #55540
29.0.50; ERC launches autojoin-channels in current frame instead of original frame

Previous Next

Package: emacs;

Reported by: Pankaj Jangid <pankaj <at> codeisgreat.org>

Date: Fri, 20 May 2022 13:07:02 UTC

Severity: important

Tags: moreinfo, patch

Merged with 51753

Found in version 29.0.50

Done: "J.P." <jp <at> neverwas.me>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55540 in the body.
You can then email your comments to 55540 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#55540; Package emacs. (Fri, 20 May 2022 13:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pankaj Jangid <pankaj <at> codeisgreat.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 20 May 2022 13:07:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pankaj Jangid <pankaj <at> codeisgreat.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; ERC launches autojoin-channels in current frame instead of
 original frame
Date: Fri, 20 May 2022 18:36:37 +0530
This could be considered a feature request. Because I have not used
Emacs in this way before, so I don’t know what was the behaviour
earlier. Here is what happens,

1. emacs -Q

2. C-x 5 2

3. (setq erc-autojoin-channels-alist '(("libera.chat" "#emacs" "#erc" "#gnus")))

4. M-x erc-tls ; with following parameters - (irc.libera.chat, 6697,
   nickname, password)

5. While it is connecting to the server, switch to the other frame to
   work on other stuff

Result: After the ERC connects to the server, it opens the autojoin
channels in the current frame. Ideally, it should open the channels in
the (dedicated) original frame where ERC was launched.


In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2022-05-20 built on anant
Repository revision: 8a7d8bb04b38ba9849b60d63c9fcfd36856eb424
Repository branch: master
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure --prefix=/home/pankaj/.local --with-pgtk'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XIM
GTK3 ZLIB

Important settings:
  value of $LANG: en_IN.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Group

Minor modes in effect:
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  gnus-undo-mode: t
  editorconfig-mode: t
  which-key-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  override-global-mode: t
  hl-line-mode: t
  savehist-mode: t
  desktop-save-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/pankaj/.emacs.d/elpa/transient-20220514.945/transient hides /home/pankaj/.local/share/emacs/29.0.50/lisp/transient

Features:
(shadow misearch multi-isearch cl-print debug backtrace emacsbug tabify
org-capture org-refile gnus-html help-fns url-cache mailalias smtpmail
flyspell ispell sort smiley gnus-cite mm-archive mail-extr textsec
uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check
gnus-bcklg qp gnus-async gnus-ml nndraft nnmh utf-7 nnml nnfolder
bbdb-gnus bbdb-mua bbdb-com gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg nntp gnus-cache .gnus network-stream nsm epa-file
erc-list erc-menu erc-join erc-ring erc-networks erc-pcomplete erc-track
erc-match erc-button erc-fill erc-stamp erc-netsplit erc-goodies erc
erc-backend erc-loaddefs autoload radix-tree gnus-dired diary-lib
diary-loaddefs rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc
rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap sgml-mode facemenu nxml-util nxml-enc
xmltok sql view yaml-mode markdown-mode bug-reference conf-mode ol-eww
eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect
gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr
pixel-fill kinsoku url-file url-dired svg dom gnus-group gnus-undo
gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7
netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader range
ol-docview doc-view image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi
org-link-doi sh-script smie executable linum prettier-js js checkdoc
mule-util jka-compr vc-git company-oddmuse company-keywords
company-etags company-gtags company-dabbrev-code company-dabbrev
company-files company-clang company-capf company-cmake company-semantic
company-template company-bbdb company display-line-numbers elec-pair
editorconfig-core editorconfig-core-handle editorconfig-fnmatch init
my-init org-element avl-tree org org-macro org-footnote org-pcomplete
org-list org-faces org-entities org-version ob-plantuml ob-sql ob-css
ob-js ob-java ob-C cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs ob-python python ob-R ob ob-tangle
org-src ob-ref ob-lob ob-table ob-exp ob-comint ob-emacs-lisp ob-core
ob-eval org-table oc-basic bibtex ol org-keys oc org-compat advice
org-macs org-loaddefs cal-menu calendar cal-loaddefs sesman vc
vc-dispatcher clojure-mode lisp-mnt align editorconfig tree-sitter-langs
tree-sitter-langs-build tar-mode arc-mode archive-mode tree-sitter-hl
tree-sitter tree-sitter-load tree-sitter-cli tsc tsc-dyn tsc-dyn-get
dired-aux tsc-obsolete haskell-mode haskell-cabal haskell-utils
haskell-font-lock haskell-indentation haskell-string
haskell-sort-imports haskell-lexeme haskell-align-imports
haskell-complete-module haskell-ghc-support noutline outline
flymake-proc flymake warnings dabbrev haskell-customize go-mode
find-file ffap thingatpt etags fileloop generator gtags-mode xref
project which-key vterm magit-bookmark bookmark tramp tramp-loaddefs
trampver tramp-integration cus-edit pp wid-edit files-x tramp-compat
parse-time iso8601 ls-lisp face-remap compile color term disp-table
ehelp find-func vterm-module term/xterm xterm magit-submodule
magit-obsolete magit-blame magit-stash magit-reflog magit-bisect
magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-files magit-refs magit-status magit
magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff
smerge-mode diff diff-mode git-commit rx log-edit pcvs-util add-log
magit-core magit-autorevert autorevert filenotify magit-margin
magit-transient magit-process with-editor shell pcomplete comint ring
server ansi-color magit-mode transient magit-git magit-base
magit-section format-spec crm dash compat-27 compat-26 compat
exec-path-from-shell bbdb-message message sendmail yank-media rmc puny
dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068
epg-config gnus-util text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr mailabbrev mail-utils gmm-utils mailheader bbdb bbdb-site
timezone edmacro kmacro modus-vivendi-theme modus-themes pcase delight
cl-extra help-mode use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core hl-line savehist desktop frameset avoid cus-load
finder-inf tex-site info package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache json map url-vars seq gv subr-x
byte-opt bytecomp byte-compile cconv cl-loaddefs cl-lib early-init
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice
simple 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
emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help
abbrev obarray oclosure cl-preloaded button loaddefs faces cus-face
macroexp files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo gtk pgtk lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 1240114 103092)
 (symbols 48 56131 26)
 (strings 32 244386 16200)
 (string-bytes 1 7269795)
 (vectors 16 129263)
 (vector-slots 8 2491781 350503)
 (floats 8 663 283)
 (intervals 56 6777 125)
 (buffers 992 118))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55540; Package emacs. (Fri, 20 May 2022 13:11:02 GMT) Full text and rfc822 format available.

Message #8 received at 55540 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Pankaj Jangid <pankaj <at> codeisgreat.org>
Cc: 55540 <at> debbugs.gnu.org
Subject: Re: bug#55540: 29.0.50; ERC launches autojoin-channels in current
 frame instead of original frame
Date: Fri, 20 May 2022 15:10:14 +0200
Pankaj Jangid <pankaj <at> codeisgreat.org> writes:

> Result: After the ERC connects to the server, it opens the autojoin
> channels in the current frame. Ideally, it should open the channels in
> the (dedicated) original frame where ERC was launched.

This is somewhat related to bug#51753 -- how erc handles these buffer
actions should be changed in general.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55540; Package emacs. (Fri, 20 May 2022 13:32:01 GMT) Full text and rfc822 format available.

Message #11 received at 55540 <at> debbugs.gnu.org (full text, mbox):

From: Pankaj Jangid <pankaj <at> codeisgreat.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 55540 <at> debbugs.gnu.org
Subject: Re: bug#55540: 29.0.50; ERC launches autojoin-channels in current
 frame instead of original frame
Date: Fri, 20 May 2022 19:01:38 +0530
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> This is somewhat related to bug#51753 -- how erc handles these buffer
> actions should be changed in general.

Thanks. Setting the value of erc-join-buffer to ’bury is a good
workaround. Found in that bug discussion.

What is the control command for marking the bug as duplicate? I couldn’t
locate such a command in "debbugs" package.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55540; Package emacs. (Fri, 20 May 2022 13:39:01 GMT) Full text and rfc822 format available.

Message #14 received at 55540 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Pankaj Jangid <pankaj <at> codeisgreat.org>
Cc: 55540 <at> debbugs.gnu.org
Subject: Re: bug#55540: 29.0.50; ERC launches autojoin-channels in current
 frame instead of original frame
Date: Fri, 20 May 2022 15:37:55 +0200
Pankaj Jangid <pankaj <at> codeisgreat.org> writes:

> What is the control command for marking the bug as duplicate? I couldn’t
> locate such a command in "debbugs" package.

It's "forcemerge" -- it should be available in the debbugs-gnu package;
it's what I use for merging/closing/reopening bug reports.

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




Forcibly Merged 51753 55540. Request was from Pankaj Jangid <pankaj <at> codeisgreat.org> to control <at> debbugs.gnu.org. (Fri, 20 May 2022 15:58:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55540; Package emacs. (Tue, 06 Sep 2022 11:03:02 GMT) Full text and rfc822 format available.

Message #19 received at 55540 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Pankaj Jangid <pankaj <at> codeisgreat.org>
Cc: 55540 <at> debbugs.gnu.org, 51753 <at> debbugs.gnu.org, emacs-erc <at> gnu.org,
 "J.P." <jp <at> neverwas.me>
Subject: Re: bug#55540: 29.0.50; ERC launches autojoin-channels in current
 frame instead of original frame
Date: Tue, 06 Sep 2022 13:01:51 +0200
erc still pops up the buffer by default, I think?  I don't think it
should do that, because it's both pretty annoying and a security
issue -- you may suddenly be typing a password into an erc buffer.




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 06 Sep 2022 11:03:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55540; Package emacs. (Tue, 06 Sep 2022 13:54:02 GMT) Full text and rfc822 format available.

Message #24 received at 55540 <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 55540 <at> debbugs.gnu.org, 51753 <at> debbugs.gnu.org, emacs-erc <at> gnu.org,
 Pankaj Jangid <pankaj <at> codeisgreat.org>
Subject: Re: bug#55540: 29.0.50; ERC launches autojoin-channels in current
 frame instead of original frame
Date: Tue, 06 Sep 2022 06:53:34 -0700
Hi Lars,

Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> erc still pops up the buffer by default, I think?  I don't think it
> should do that, because it's both pretty annoying and a security
> issue -- you may suddenly be typing a password into an erc buffer.

Are you concerned about the behavior during initial connections as well
as automatic reconnections? Regardless, as you say, the default value of
`buffer' for `erc-join-buffer' (and `erc-reconnect-display') causes the
buffer in the selected window to be replaced with the
just-(re)initialized ERC buffer.

Also, depending on various factors, values other than `buffer' can
exhibit similar behavior. For example, in a dual-window split, a value
of `window-noselect' can result in a newly (re)joined channel replacing
the buffer in the selected window when the connection's server buffer is
showing in the other window. Plain `window' is much the same, but at
least there's somewhat of an expectation that the selected window's
buffer may change.

Really, the only safe option is `bury' (well, maybe also the proposed
frame stuff in Pankaj's patch, but only when an extra, ERC-specific
frame already exists, which we can't count on). That said, there's no
reason we'd have to stick with existing options/behavior when choosing a
new default. I guess it just comes down to what users want to happen.

If we're talking both `erc-join-buffer' and `erc-reconnect-display', one
idea would be to make `window-noselect' the default but change it to
mean the selected window is always left unmolested, no matter what. The
justification for the breaking change would be that the existing doc
string in

  (const :tag "Split window, don't select" window-noselect)

has always implied as much, namely that a window displaying the new
buffer will always be shown and never selected.

Although, if this only concerns `erc-reconnect-display', we could just
go with `bury' since (among the available options) that best minimizes
the disruption of a reestablished connection.

Hopefully folks have stronger opinions and/or better ideas. Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55540; Package emacs. (Tue, 06 Sep 2022 14:03:02 GMT) Full text and rfc822 format available.

Message #27 received at 55540 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "J.P." <jp <at> neverwas.me>
Cc: 55540 <at> debbugs.gnu.org, 51753 <at> debbugs.gnu.org, emacs-erc <at> gnu.org,
 Pankaj Jangid <pankaj <at> codeisgreat.org>
Subject: Re: bug#55540: 29.0.50; ERC launches autojoin-channels in current
 frame instead of original frame
Date: Tue, 06 Sep 2022 16:02:32 +0200
"J.P." <jp <at> neverwas.me> writes:

> Are you concerned about the behavior during initial connections as well
> as automatic reconnections?

Yes.

> Really, the only safe option is `bury' (well, maybe also the proposed
> frame stuff in Pankaj's patch, but only when an extra, ERC-specific
> frame already exists, which we can't count on). That said, there's no
> reason we'd have to stick with existing options/behavior when choosing a
> new default. I guess it just comes down to what users want to happen.

I think the default action should be to do nothing to the window setup
at all, and just add the notification to the mode line.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55540; Package emacs. (Wed, 07 Sep 2022 03:11:02 GMT) Full text and rfc822 format available.

Message #30 received at 55540 <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 55540 <at> debbugs.gnu.org, 51753 <at> debbugs.gnu.org, emacs-erc <at> gnu.org,
 Pankaj Jangid <pankaj <at> codeisgreat.org>
Subject: Re: bug#55540: 29.0.50; ERC launches autojoin-channels in current
 frame instead of original frame
Date: Tue, 06 Sep 2022 20:10:23 -0700
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> "J.P." <jp <at> neverwas.me> writes:
>
>> Really, the only safe option is `bury' (well, maybe also the proposed
>> frame stuff in Pankaj's patch, but only when an extra, ERC-specific
>> frame already exists, which we can't count on). That said, there's no
>> reason we'd have to stick with existing options/behavior when choosing a
>> new default. I guess it just comes down to what users want to happen.
>
> I think the default action should be to do nothing to the window setup
> at all, and just add the notification to the mode line.

I believe changing the default for `erc-join-buffer' (alone) to `bury'
is the easiest way to achieve that.

Thus, if no one objects within the next week or so, I will add the patch
below or similar to trunk (and what will become ERC 5.5), along with a
related NEWS entry. Thanks.

[0001-Bury-new-ERC-buffers-by-default.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55540; Package emacs. (Wed, 07 Sep 2022 12:56:02 GMT) Full text and rfc822 format available.

Message #33 received at 55540 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "J.P." <jp <at> neverwas.me>
Cc: 55540 <at> debbugs.gnu.org, 51753 <at> debbugs.gnu.org, emacs-erc <at> gnu.org,
 Pankaj Jangid <pankaj <at> codeisgreat.org>
Subject: Re: bug#55540: 29.0.50; ERC launches autojoin-channels in current
 frame instead of original frame
Date: Wed, 07 Sep 2022 14:55:47 +0200
"J.P." <jp <at> neverwas.me> writes:

> I believe changing the default for `erc-join-buffer' (alone) to `bury'
> is the easiest way to achieve that.
>
> Thus, if no one objects within the next week or so, I will add the patch
> below or similar to trunk (and what will become ERC 5.5), along with a
> related NEWS entry. Thanks.

Thanks; makes sense to me.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55540; Package emacs. (Tue, 20 Sep 2022 13:12:02 GMT) Full text and rfc822 format available.

Message #36 received at 55540 <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: Pankaj Jangid <pankaj <at> codeisgreat.org>
Cc: 55540 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 emacs-erc <at> gnu.org, 51753 <at> debbugs.gnu.org
Subject: Re: bug#55540: 29.0.50; ERC launches autojoin-channels in current
 frame instead of original frame
Date: Tue, 20 Sep 2022 06:11:11 -0700
>> Thus, if no one objects within the next week or so, I will add the patch
>> below or similar to trunk (and what will become ERC 5.5), along with a
>> related NEWS entry. Thanks.

This has been carried out.

Pankaj, all that remains is your frame stuff. If problems persist and/or
you've lost interest, please let us know, so I can act accordingly.
Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55540; Package emacs. (Thu, 22 Sep 2022 03:08:02 GMT) Full text and rfc822 format available.

Message #39 received at 55540 <at> debbugs.gnu.org (full text, mbox):

From: Pankaj Jangid <pankaj <at> codeisgreat.org>
To: "J.P." <jp <at> neverwas.me>
Cc: 55540 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 emacs-erc <at> gnu.org, 51753 <at> debbugs.gnu.org
Subject: Re: bug#55540: 29.0.50; ERC launches autojoin-channels in current
 frame instead of original frame
Date: Thu, 22 Sep 2022 08:37:02 +0530
"J.P." <jp <at> neverwas.me> writes:

>>> Thus, if no one objects within the next week or so, I will add the patch
>>> below or similar to trunk (and what will become ERC 5.5), along with a
>>> related NEWS entry. Thanks.
>
> This has been carried out.
>
> Pankaj, all that remains is your frame stuff. If problems persist and/or
> you've lost interest, please let us know, so I can act accordingly.
> Thanks.

Now the behaviour is acceptable when "erc-autojoin-channels-alist" is
set to nil. i.e. the frame in which I launched "erc-tls" opens the erc
window instead of occupying the current frame.

But when I have few channels in "erc-autojoin-channels-alist" then the
channels are still openning in the current frame instead of the
dedicated frame that I started for "erc-tls". Is there some setting that
I missed in the conversation for this? My current "erc" related
settings are:

--8<---------------cut here---------------start------------->8---
(setq erc-prompt-for-password nil
      erc-prompt (lambda () (concat "[" (buffer-name) "]")))
(eval-when-compile (require 'erc-services))
(setq erc-prompt-for-nickserv-password nil
      erc-use-auth-source-for-nickserv-password t)
(setq erc-server "irc.libera.chat")
(setq erc-port 6697)
(setq erc-nick "my-nick")
(setq erc-user-full-name "My Full Name")
(eval-when-compile (require 'erc-join))
(setq erc-autojoin-channels-alist
      '(("libera.chat" "#emacs" "#erc" "#gnus")))
--8<---------------cut here---------------end--------------->8---




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55540; Package emacs. (Thu, 22 Sep 2022 06:24:04 GMT) Full text and rfc822 format available.

Message #42 received at 55540 <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: Pankaj Jangid <pankaj <at> codeisgreat.org>
Cc: 55540 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 emacs-erc <at> gnu.org, 51753 <at> debbugs.gnu.org
Subject: Re: bug#55540: 29.0.50; ERC launches autojoin-channels in current
 frame instead of original frame
Date: Wed, 21 Sep 2022 23:22:50 -0700
Hi Pankaj,

Pankaj Jangid <pankaj <at> codeisgreat.org> writes:

> Now the behaviour is acceptable when "erc-autojoin-channels-alist" is
> set to nil. i.e. the frame in which I launched "erc-tls" opens the erc
> window instead of occupying the current frame.

Hm, right, but I think that was always the baseline behavior, no? If
not, I wonder if the recent change to the default for `erc-join-buffer'
somehow affected this.

> But when I have few channels in "erc-autojoin-channels-alist" then the
> channels are still openning in the current frame instead of the
> dedicated frame that I started for "erc-tls". Is there some setting
> that I missed in the conversation for this?

Looks like it, but I should have re-summarized either way. So that's my
bad.

> (setq erc-prompt-for-nickserv-password nil
>       erc-use-auth-source-for-nickserv-password t)

This is unrelated (so feel free to skip ahead), but are you sure
auth-source is even being consulted here? I ask because `services' isn't
a default module, and your snippet doesn't modify `erc-modules', AFAICT.
Regardless, adding services to the repro mix at this point would only
complicate matters, so please forget I said anything. I mean, if really
necessary, you can just use Libera's server-password kludge while
testing (everything will still be encrypted):

  (erc-tls :password "$myaccount:$mypass" ...)

> [...]
> (setq erc-autojoin-channels-alist
>       '(("libera.chat" "#emacs" "#erc" "#gnus")))

Ah, looks like we're missing

  (setq erc-join-buffer 'frame
        erc-auto-query 'frame
        erc-reuse-frames 'displayed)

Also, you *did* apply the patch and rerun make (or at least delete the
.elc), right?:

  https://lists.gnu.org/archive/html/emacs-erc/2022-08/txtAqY2ukHPun.txt

(Yeah, those changes aren't on trunk.) Anyway, please let me know if
something doesn't add up.

Thanks,
J.P.

P.S. If you want, you can use the symbol `Libera.Chat' instead of the
string "libera.chat" in `erc-autojoin-channels-alist'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55540; Package emacs. (Fri, 30 Dec 2022 14:29:01 GMT) Full text and rfc822 format available.

Message #45 received at 55540 <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: 55540 <at> debbugs.gnu.org
Cc: emacs-erc <at> gnu.org
Subject: Re: bug#55540: 29.0.50; ERC launches autojoin-channels in current
 frame instead of original frame
Date: Fri, 30 Dec 2022 06:28:08 -0800
Emanuel Berg <incal <at> dataswamp.org> writes:

> J.P. wrote:
>
>> I believe changing the default for `erc-join-buffer' (alone)
>> to `bury' is the easiest way to achieve that.
>
> `erc-join-buffer' sounds like a command/function BTW.

Indeed. And the "join" part makes it sound like it's only supposed to
affect channels. Therefore, I think this should be aliased to something
like `erc-buffer-display' because it also determines how server buffers
are shown. Doing so would maybe also aid in discoverability by bringing
it more in line with `erc-query-display' and `erc-reconnect-display'.
The same goes for `erc-auto-query', which could likewise become
`erc-receive-query-display' or similar.

We should also probably mention somewhere that the new default value of
`bury' doesn't put existing buffers at the end of the buffer list.
Moreover, I'm thinking that having `bury' as the default for interactive
invocations (which is now the case) may be too stark a proposition since
the only visual feedback afforded new users is a blip in the mode line.
(FWIW, one user on Libera has recently complained about this, going so
far as to label it a bug.) Anyway, the "penultimate" patch in the POC
portion of the set proposed in bug#60428 [1] incorporates some of these
ideas. If anyone's interested, please check it out. Thanks.

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60428




Reply sent to "J.P." <jp <at> neverwas.me>:
You have taken responsibility. (Sat, 08 Apr 2023 23:26:02 GMT) Full text and rfc822 format available.

Notification sent to Pankaj Jangid <pankaj <at> codeisgreat.org>:
bug acknowledged by developer. (Sat, 08 Apr 2023 23:26:02 GMT) Full text and rfc822 format available.

Message #50 received at 55540-done <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: Pankaj Jangid <pankaj <at> codeisgreat.org>
Cc: 55540-done <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 emacs-erc <at> gnu.org, 51753 <at> debbugs.gnu.org
Subject: Re: bug#55540: 29.0.50; ERC launches autojoin-channels in current
 frame instead of original frame
Date: Sat, 08 Apr 2023 16:25:13 -0700
I've added a version of the frames patch as well as an option to control
buffer-display behavior for interactive entry-point invocations.

  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=0e4c07dc
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3a012d1d

Thanks and closing.




Reply sent to "J.P." <jp <at> neverwas.me>:
You have taken responsibility. (Sat, 08 Apr 2023 23:26:03 GMT) Full text and rfc822 format available.

Notification sent to Stefan Kangas <stefan <at> marxist.se>:
bug acknowledged by developer. (Sat, 08 Apr 2023 23:26:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 13 May 2023 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 342 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.