Ken Raeburn writes: > I’m using rcirc, and have logging turned on. When I started up > rcirc, I already had one of the log files > (~/.emacs.d/rcirc-log/#gnucash@irc.gnome.org) being viewed in a > buffer. That buffer, sensibly enough, was named > “#gnucash@irc.gnome.org”. Once rcirc connected to irc.gnome.org, and > joined my channels, it looked for a buffer named > “#gnucash@irc.gnome.org”, assumed that that was its own buffer for > showing channel messages, switched it to rcirc mode, and started > adding to it. So now, the buffer starts off: 2022-04-04T18:01:18 > *** raeburn JOIN > 2022-04-04T18:01:18 *** ChanServ MODE +v raeburn > 2022-04-04T18:01:18 *** TOPIC Free GPL Personal and Small Business > Accounting… > 2022-04-04T18:01:18 *** NAMES … > 2021-11-01T13:49:16 *** sbluhm JOIN 2021-11-01T13:50:25 *** > Mechtilde QUIT Ping timeout: 180 seconds > 2021-11-01T14:10:13 *** jervin QUIT Quit: jervin > [...] > I can probably work around this by tweaking desktop-files-not-to-save so > I don’t accidentally hit this when restarting Emacs, but (1) I do want > to be able to look at a log file and preserve my position in it from > session to session, and (2) manually pulling up a log file before > starting rcirc would still trigger the same lossage. It might help to add rcirc-mode to desktop-modes-not-to-save, but you are right the fundamental issue still is that rcirc can get confused by specific buffer names. One solution might just be to wrap the body of rcirc-generate-new-buffer-name in a generate-new-buffer call, so as to avoid these issue. IIRC there should be no issue if the buffer name for a rcirc chat buffer has a modified name, as the buffer objects all managed via rcirc-buffer-alist and rcirc-get-buffer. Could you try applying this patch to see if this improves the situation, or if some other issues arise: