GNU bug report logs -
#23438
24.5; ERC autojoin should use erc-autojoin-domain-only searching channel keys
Previous Next
Reported by: Jim Crossley <jim <at> crossleys.org>
Date: Tue, 3 May 2016 22:20:01 UTC
Severity: normal
Merged with 25349
Found in versions 24.5, 25.1.90
Done: Tom Tromey <tom <at> tromey.com>
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 23438 in the body.
You can then email your comments to 23438 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23438
; Package
emacs
.
(Tue, 03 May 2016 22:20:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jim Crossley <jim <at> crossleys.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 03 May 2016 22:20:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
It's impossible to know what round-robin server you'll actually connect
to when connecting to chat.freenode.net, for example. Therefore, it's
impossible to include the correct host lines for channel keys in the
auth-source files. It would be far better to search for the channel keys
using the same name used to query erc-autojoin-channels-alist when
erc-autojoin-domain-only is non-nil. I have a patch that works, but I'm
not sure where to submit it.
In GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.18.9)
of 2016-04-11 on buildvm-25.phx2.fedoraproject.org
Windowing system distributor `Fedora Project', version 11.0.11803000
System Description: Fedora release 23 (Twenty Three)
Configured using:
`configure --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --program-prefix=
--disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
--libexecdir=/usr/libexec --localstatedir=/var
--sharedstatedir=/var/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
--with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
--with-gpm=no build_alias=x86_64-redhat-linux-gnu
host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
-pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
-grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-m64 -mtune=generic' LDFLAGS=-Wl,-z,relro'
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Emacs-Lisp
Minor modes in effect:
hi-lock-mode: t
diff-auto-refine-mode: t
magit-auto-revert-mode: t
auto-revert-mode: t
global-git-commit-mode: t
async-bytecomp-package-mode: t
recentf-mode: t
erc-log-mode: t
erc-autoaway-mode: t
elisp-slime-nav-mode: t
paredit-mode: t
idle-highlight-mode: t
ido-ubiquitous-mode: t
erc-spelling-mode: t
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-netsplit-mode: t
erc-hl-nicks-mode: t
erc-button-mode: t
erc-fill-mode: t
erc-stamp-mode: t
erc-irccontrols-mode: t
erc-noncommands-mode: t
erc-keep-place-mode: t
erc-move-to-prompt-mode: t
erc-readonly-mode: t
eldoc-mode: t
shell-dirtrack-mode: t
global-auto-complete-mode: t
auto-complete-mode: t
global-hl-line-mode: t
hl-line-mode: t
delete-selection-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
auto-fill-function: do-auto-fill
transient-mark-mode: t
Recent messages:
Saving file /usr/share/emacs/24.5/lisp/erc/erc-join.el.gz...
File erc-join.el.gz is write-protected; try to save anyway? (y or n) n
basic-save-buffer-2: Attempt to save to a file which you aren't allowed to
write
Mark set [4 times]
Saving file /home/jim/src/.emacs.d/config/irc.el...
Wrote /home/jim/src/.emacs.d/config/irc.el
Annotating...
Redisplaying annotation...done (Spanned from 9681.2 to 123.8 days old)
Annotating... done
Mark saved where search started
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug sendmail vc-annotate log-view vc
vc-dispatcher tabify yasnippet debug eieio-opt speedbar sb-image ezimage
dframe misearch multi-isearch jka-compr view mule-util hi-lock vc-git
find-things-fast ffap url-parse linum magit-blame magit-stash
magit-bisect magit-remote magit-commit magit-sequence magit magit-apply
magit-wip magit-log magit-diff smerge-mode diff-mode magit-core
magit-autorevert autorevert filenotify magit-process magit-popup
magit-mode magit-git crm magit-section magit-utils git-commit log-edit
message idna rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils
mailheader pcvs-util add-log with-editor async-bytecomp async server
dash dired recentf tree-widget network-stream starttls tls erc-log
erc-autoaway flymake elisp-slime-nav help-mode paredit
idle-highlight-mode ido-ubiquitous ido-completing-read+ cus-edit smex
erc-spelling flyspell ispell notifications dbus xml erc-list erc-menu
erc-join erc-ring erc-networks erc-pcomplete erc-track erc-match
erc-netsplit erc-hl-nicks color erc-button erc-fill erc-stamp wid-edit
erc-goodies erc erc-backend erc-compat pp cl cider tramp-sh cider-debug
cider-browse-ns cider-inspector cider-mode cider-interaction etags
compile arc-mode archive-mode thingatpt cider-repl cider-resolve
cider-test cider-overlays cider-stacktrace cider-doc org-table org
org-macro org-footnote org-pcomplete org-list org-faces org-entities
noutline outline org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat
org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs
cider-grimoire url-vars cider-popup easy-mmode cider-eldoc eldoc
cider-client cider-common cider-util clojure-mode align imenu
nrepl-client tramp tramp-compat auth-source gnus-util mm-util mail-prsvr
password-cache tramp-loaddefs trampver shell pcomplete comint ansi-color
ring format-spec queue cider-compat seq seq-24 ewoc spinner windmove
epa-file epa derived epg auto-complete-config auto-complete cl-macs gv
popup cyberpunk-theme hl-line delsel cus-start cus-load finder-inf paren
edmacro kmacro saveplace ido eieio byte-opt bytecomp byte-compile
cl-extra cl-loaddefs cl-lib cconv eieio-core advice help-fns info
easymenu package epg-config time-date tooltip electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer 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 make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
Memory information:
((conses 16 445819 44140)
(symbols 48 45274 0)
(miscs 40 482 2072)
(strings 32 121056 5951)
(string-bytes 1 3136335)
(vectors 16 49396)
(vector-slots 8 816276 26129)
(floats 8 524 484)
(intervals 56 7285 660)
(buffers 960 62)
(heap 1024 44605 3132))
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23438
; Package
emacs
.
(Tue, 03 May 2016 22:39:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 23438 <at> debbugs.gnu.org (full text, mbox):
Jim Crossley <jim <at> crossleys.org> writes:
> It's impossible to know what round-robin server you'll actually connect
> to when connecting to chat.freenode.net, for example. Therefore, it's
> impossible to include the correct host lines for channel keys in the
> auth-source files. It would be far better to search for the channel keys
> using the same name used to query erc-autojoin-channels-alist when
> erc-autojoin-domain-only is non-nil. I have a patch that works, but I'm
> not sure where to submit it.
Submit it here, please.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23438
; Package
emacs
.
(Wed, 04 May 2016 15:11:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 23438 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Here ya go, thanks!
- Jim
master ef554176256a318ce0bc4d3d3790a66e8ddd1fc0
Author: Jim Crossley <jim <at> crossleys.org>
AuthorDate: Wed May 4 11:04:28 2016 -0400
Commit: Jim Crossley <jim <at> crossleys.org>
CommitDate: Wed May 4 11:04:28 2016 -0400
Parent: 3d8b29b * lisp/vc/ediff-util.el: Use lexical-binding.
Merged: master
Containing: master
Follows: emacs-24.5-rc3-fixed (9210)
Use the domain name for auth-source-search
For the same reason we might use the domain name to query
erc-autojoin-channels-alist, we should use it for auth-source-search.
Otherwise, we'd need to include a line for every possible server to
which chat.freenode.net might redirect us in ~/.authinfo.gpg
1 file changed, 12 insertions(+), 9 deletions(-)
lisp/erc/erc-join.el | 21 ++++++++++++---------
modified lisp/erc/erc-join.el
@@ -166,10 +166,17 @@ This function is run from
`erc-nickserv-identified-hook'."
;; Return nil to avoid stomping on any other hook funcs.
nil)
+(defun erc-server-name (server)
+ "Use the server's domain name if option set"
+ (if (and erc-autojoin-domain-only
+ (string-match "[^.\n]+\\.\\([^.\n]+\\.[^.\n]+\\)$" server))
+ (match-string 1 server)
+ server))
+
(defun erc-server-join-channel (server channel)
(let* ((secret (plist-get (nth 0 (auth-source-search
:max 1
- :host server
+ :host (erc-server-name server)
:port "irc"
:user channel))
:secret))
@@ -186,11 +193,9 @@ This function is run from
`erc-nickserv-identified-hook'."
(let* ((chnl (erc-response.contents parsed))
(nick (car (erc-parse-user (erc-response.sender parsed))))
(server (with-current-buffer (process-buffer proc)
- (or erc-server-announced-name erc-session-server))))
+ (erc-server-name
+ (or erc-server-announced-name erc-session-server)))))
(when (erc-current-nick-p nick)
- (when (and erc-autojoin-domain-only
- (string-match "[^.\n]+\\.\\([^.\n]+\\.[^.\n]+\\)$" server))
- (setq server (match-string 1 server)))
(let ((elem (assoc server erc-autojoin-channels-alist)))
(if elem
(unless (member chnl (cdr elem))
@@ -209,11 +214,9 @@ This function is run from
`erc-nickserv-identified-hook'."
(let* ((chnl (car (erc-response.command-args parsed)))
(nick (car (erc-parse-user (erc-response.sender parsed))))
(server (with-current-buffer (process-buffer proc)
- (or erc-server-announced-name erc-session-server))))
+ (erc-server-name
+ (or erc-server-announced-name erc-session-server)))))
(when (erc-current-nick-p nick)
- (when (and erc-autojoin-domain-only
- (string-match "[^.\n]+\\.\\([^.\n]+\\.[^.\n]+\\)$" server))
- (setq server (match-string 1 server)))
(let ((elem (assoc server erc-autojoin-channels-alist)))
(when elem
(setcdr elem (delete chnl (cdr elem)))
On Tue, May 3, 2016 at 6:38 PM, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
> Jim Crossley <jim <at> crossleys.org> writes:
>
> > It's impossible to know what round-robin server you'll actually connect
> > to when connecting to chat.freenode.net, for example. Therefore, it's
> > impossible to include the correct host lines for channel keys in the
> > auth-source files. It would be far better to search for the channel keys
> > using the same name used to query erc-autojoin-channels-alist when
> > erc-autojoin-domain-only is non-nil. I have a patch that works, but I'm
> > not sure where to submit it.
>
> Submit it here, please.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23438
; Package
emacs
.
(Wed, 11 Jan 2017 05:53:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 23438 <at> debbugs.gnu.org (full text, mbox):
This sounds like bug#25349, which also has a patch and some other
commentary. I don't know how to merge them, or I would.
Tom
Merged 23438 25349.
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Thu, 12 Jan 2017 00:33:02 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, 03 Jun 2017 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 20 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.