From unknown Wed Sep 10 14:55:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61519: 30.0.50; thing-at-point misdetects emails with numerals in user part Resent-From: Aaron Madlon-Kay Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Feb 2023 23:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61519 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 61519@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167641589021899 (code B ref -1); Tue, 14 Feb 2023 23:05:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Feb 2023 23:04:50 +0000 Received: from localhost ([127.0.0.1]:57314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pS4Lx-0005h8-Bu for submit@debbugs.gnu.org; Tue, 14 Feb 2023 18:04:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:60228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pS4Lv-0005gy-7e for submit@debbugs.gnu.org; Tue, 14 Feb 2023 18:04:48 -0500 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 1pS4Lu-0003b7-7v for bug-gnu-emacs@gnu.org; Tue, 14 Feb 2023 18:04:46 -0500 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pS4Lq-0007AN-VX for bug-gnu-emacs@gnu.org; Tue, 14 Feb 2023 18:04:45 -0500 Received: by mail-pl1-x635.google.com with SMTP id v23so18589904plo.1 for ; Tue, 14 Feb 2023 15:04:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=madlon-kay.com; s=google; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=ptZHRZ99yyyR+6rSfuUZe/TZm9g7KXThL2n72Xwd6sA=; b=vgeSPIXypnUlpaGaJRBxV9hwyJdTEeFXJr38xE/S00Vtro75dxqNpn3hiKAD0lUic5 4hOqq9KIVqZNdxiQP1eca/8dnVBmZGUoZleO05dsvdam9VD9CZmAbthuOT7cu2B3FEaV rk9wFqdfkite5RhpQPcjb4lui1IN0RnWHpphI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ptZHRZ99yyyR+6rSfuUZe/TZm9g7KXThL2n72Xwd6sA=; b=hhhSb2ZJ5l1Pk0/nnaw7surjLmWepJhgBTS+enTiRwsoIT+z2ad5NVjy8QVBdr5vd/ 0eLI7WtbBEw6eBKD58NtfxOCVUkBTj5beRrLmBP9xya8LUcH07mJB8j9gpmzzJ8wY0X7 7kPP0snDZJxRscTIc2vcizIh/W3PYNJMwltHW2kHn574SvGvTvSW+ynarB0DTcDGJuPu hS34AfHZMLNDZkyEnMluKiirrt7wkTkiWbbHJY6EmXmXvUUGbbElfV2fPvwt5ny9d3pH sPt2GShxgaxtBKx5K/qrGSHMwei9CC8KmvjXDqBtjlN10wU0CzD6mKU+I0iYEmv6trpk 7a7Q== X-Gm-Message-State: AO0yUKV8qTjwfA9Km6GuBqqXT0G8VdoHjkcQ5QPfqT+zdQWbqq4/l+Ol YM5sAdSZm2GDHbbIJikc7qDo6TWhR9J/IJ3B X-Google-Smtp-Source: AK7set+1gx26G6XoyStDFEkajiEAc3/43LGyVCnOzR9lNpsWpLywCWAFMBHblUhoslv/ttiwaHUdRg== X-Received: by 2002:a17:90a:186:b0:232:eb1c:891f with SMTP id 6-20020a17090a018600b00232eb1c891fmr553703pjc.14.1676415880121; Tue, 14 Feb 2023 15:04:40 -0800 (PST) Received: from smtpclient.apple (p4938072-ipxg23501hodogaya.kanagawa.ocn.ne.jp. [153.217.14.72]) by smtp.gmail.com with ESMTPSA id c6-20020a17090a1d0600b00233fa674654sm78579pjd.11.2023.02.14.15.04.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Feb 2023 15:04:38 -0800 (PST) From: Aaron Madlon-Kay Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Message-Id: Date: Wed, 15 Feb 2023 08:04:26 +0900 X-Mailer: Apple Mail (2.3731.400.51.1.1) Received-SPF: none client-ip=2607:f8b0:4864:20::635; envelope-from=aaron@madlon-kay.com; helo=mail-pl1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 1. Launch Emacs with `emacs -Q` 2. Enter an email address with a numeral in the user part, like foo0bar@example.com 3. With point inside the domain part of the email address, evaluate `(thing-at-point 'email)` 4. Result will be `bar@example.com` (expected `foo0bar@example.com`) The cause of this is the implementation of `thing-at-point-looking-at' where it backs up one character at a time to find the start of the email. The value for `thing-at-point-email-regexp' allows numbers in the user part only from the *second* character, so as the function backs up it will mistakenly find the `0` in `0bar@example.com` to be outside of the email address. --- In GNU Emacs 30.0.50 (build 1, x86_64-apple-darwin22.3.0, NS appkit-2299.40 Version 13.2 (Build 22D49)) of 2023-01-30 built on Macmac.local Windowing system distributor 'Apple', version 10.3.2299 System Description: macOS 13.2.1 Configured using: 'configure --prefix=3D/opt/local --disable-silent-rules --without-dbus --without-gconf --without-libotf --without-m17n-flt --with-libgmp --with-gnutls --with-json --with-xml2 --with-modules --infodir /opt/local/share/info/emacs --with-sqlite3 --with-webp --with-ns --with-lcms2 --without-harfbuzz --without-imagemagick --without-xaw3d --with-tree-sitter --with-rsvg --with-native-compilation=3Daot 'CFLAGS=3D-pipe -Os -Wno-attributes -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64' 'CPPFLAGS=3D-I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk' 'LDFLAGS=3D-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-rpath /opt/local/lib/gcc12 -Wl,-no_pie -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64'' Configured features: ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB Important settings: value of $LC_ALL: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: paredit-mode: t global-diff-hl-mode: t diff-hl-mode: t dap-tooltip-mode: t dap-ui-many-windows-mode: t dap-ui-controls-mode: t dap-ui-mode: t treemacs-filewatch-mode: t treemacs-follow-mode: t treemacs-git-mode: t treemacs-fringe-indicator-mode: t dap-auto-configure-mode: t dap-mode: t rainbow-delimiters-mode: t rainbow-mode: t company-quickhelp-mode: t company-quickhelp-local-mode: t global-company-mode: t company-mode: t editorconfig-mode: t csv-field-index-mode: t beacon-mode: t yas-global-mode: t yas-minor-mode: t global-flycheck-mode: t flycheck-mode: t which-key-mode: t auto-sudoedit-mode: 0 recentf-mode: t counsel-projectile-mode: t projectile-mode: t all-the-icons-ivy-rich-mode: t ivy-rich-mode: t counsel-mode: t pcre-mode: t global-git-commit-mode: t magit-auto-revert-mode: t pdf-occur-global-minor-mode: t ivy-mode: t shell-dirtrack-mode: t global-subword-mode: t subword-mode: t desktop-save-mode: t override-global-mode: t pixel-scroll-precision-mode: t server-mode: t global-display-line-numbers-mode: t display-line-numbers-mode: t delete-selection-mode: t electric-pair-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t global-prettify-symbols-mode: t prettify-symbols-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 transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t hs-minor-mode: t Load-path shadows: /opt/local/share/emacs/site-lisp/cmake-mode hides = /Users/amake/.emacs.d/elpa-30/cmake-mode-20230209.1921/cmake-mode /Users/amake/.emacs.d/elpa-30/transient-20230213.1337/transient hides = /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/transient Features: (shadow mail-extr emacsbug cl-print amk-vterm benchmark ido loaddefs-gen tar-mode arc-mode archive-mode mm-archive url-cache magit-patch magit-subtree magit-extras magit-gitignore magit-ediff emoji-github py-autopep8 emacs-news-mode paredit dired-aux vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs diff-hl-dired all-the-icons-dired dired-collapse dired-hacks-utils tcl make-mode org-eldoc image-file image-converter oc-basic ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range gnus-win ol-docview doc-view ol-bibtex bibtex ol-bbdb ol-w3m ol-doi org-link-doi conf-mode hl-tags-mode cl 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 nxml-util nxml-enc xmltok shfmt flyspell ispell yaml-mode diff-hl log-view vc-dir dap-mouse dap-ui gdb-mi bindat gud bui bui-list bui-info bui-entry bui-core bui-history bui-button bui-utils lsp-modeline lsp-headerline lsp-icons lsp-diagnostics view lsp-zig lsp-steep lsp-svelte lsp-sqls lsp-ruby-syntax-tree lsp-yaml lsp-xml lsp-vimscript lsp-vhdl lsp-volar lsp-vetur lsp-html lsp-verilog lsp-vala lsp-v lsp-typeprof lsp-ttcn3 lsp-toml lsp-terraform lsp-tex lsp-sourcekit lsp lsp-sorbet lsp-solargraph lsp-rust lsp-rf lsp-remark lsp-racket lsp-r lsp-purescript lsp-pylsp lsp-pyls lsp-pwsh lsp-php lsp-pls lsp-perlnavigator lsp-perl lsp-openscad lsp-ocaml lsp-magik lsp-nix lsp-nim lsp-nginx lsp-mint lsp-marksman lsp-markdown lsp-lua lsp-kotlin lsp-json lsp-javascript lsp-idris lsp-haxe lsp-groovy lsp-hack lsp-graphql lsp-gleam lsp-go lsp-completion lsp-gdscript lsp-fsharp lsp-fortran lsp-eslint lsp-erlang lsp-emmet lsp-elixir lsp-elm lsp-dockerfile lsp-dhall lsp-d lsp-css lsp-csharp lsp-crystal lsp-cmake lsp-clojure lsp-semantic-tokens lsp-clangd lsp-beancount lsp-bash lsp-astro lsp-ansible lsp-angular lsp-ada lsp-actionscript lsp-ui lsp-ui-flycheck lsp-ui-imenu lsp-ui-peek lsp-ui-sideline lsp-ui-doc goto-addr csharp-mode c-ts-common dap-java lsp-java lsp-ivy lsp-dart lsp-dart-commands lsp-dart-flutter-widget-guide lsp-dart-flutter-fringe-colors lsp-dart-flutter-colors lsp-dart-outline lsp-dart-code-lens lsp-lens lsp-dart-test-tree lsp-treemacs lsp-treemacs-generic lsp-treemacs-themes treemacs-treelib treemacs-projectile treemacs treemacs-header-line treemacs-compatibility treemacs-mode treemacs-bookmarks treemacs-tags treemacs-interface treemacs-persistence treemacs-filewatch-mode treemacs-follow-mode treemacs-rendering treemacs-annotations treemacs-async treemacs-workspaces treemacs-dom treemacs-visuals treemacs-fringe-indicator treemacs-scope pulse treemacs-faces treemacs-icons treemacs-themes treemacs-core-utils pfuture hl-line treemacs-logging treemacs-customization treemacs-macros lsp-dart-test-output lsp-dart-test-support lsp-dart-dap lsp-dart-devtools lsp-dart-flutter-daemon jsonrpc ert dap-utils dap-mode dap-tasks dap-launch lsp-docker posframe dap-overlays lsp-dart-closing-labels lsp-dart-utils lsp-dart-protocol lsp-mode spinner network-stream lv inline ewoc lsp-protocol ht lsp-ui-util vc-git vc vc-dispatcher hideshow rainbow-delimiters rainbow-mode flutter-l10n-flycheck flutter flutter-l10n flutter-project dart-mode company-oddmuse company-keywords company-etags etags fileloop company-gtags company-dabbrev-code company-dabbrev company-files company-clang company-capf company-cmake company-semantic company-template company-bbdb company-quickhelp pos-tip company init nodejs-repl pug-mode coffee-mode docker docker-volume docker-network docker-image docker-container docker-faces docker-core docker-compose docker-process docker-utils docker-group aio editorconfig editorconfig-core editorconfig-core-handle editorconfig-fnmatch csv-mode sort vterm term disp-table ehelp vterm-module term/xterm xterm cmake-mode rst jq-mode beacon yasnippet flycheck-kotlin flycheck-commitlint flycheck-committed flycheck-yard flycheck-dart-sass flycheck-sassc flycheck-innosetup flycheck-shfmt shfmt-common sh-script executable flycheck-package package-lint finder flycheck kotlin-mode kotlin-mode-indent kotlin-mode-lexer which-key vue-l10n helpful cc-langs trace edebug debug backtrace info-look help-fns radix-tree elisp-refs nginx-mode auto-sudoedit tramp-sh recentf tree-widget f f-shortdoc vlf-setup vlf vlf-base vlf-tune dumb-jump popup s edit-string counsel-projectile projectile lisp-mnt grep all-the-icons-ibuffer all-the-icons-ivy-rich ivy-rich all-the-icons all-the-icons-faces data-material data-weathericons data-octicons data-fileicons data-faicons data-alltheicons two-column counsel xref swiper ruby-test-mode inf-ruby ruby-mode cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs crdt forms forms-mode pcre2el rxt re-builder git-link orgit-forge orgit forge-list forge-commands forge-semi forge-bitbucket buck forge-gogs gogs forge-gitea gtea forge-gitlab glab forge-github ghub-graphql treepy gsexp ghub url-http url-gw nsm url-auth gnutls forge-notify forge-revnote forge-pullreq forge-issue forge-topic yaml bug-reference forge-post markdown-mode edit-indirect forge-repo forge forge-core forge-db closql emacsql-sqlite emacsql emacsql-compiler magit-bookmark 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 magit-diff smerge-mode diff diff-mode git-commit log-edit message sendmail yank-media rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils pcvs-util add-log magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process with-editor comp comp-cstr warnings magit-mode magit-git magit-base magit-section crm org-pdftools pdf-occur ibuf-ext ibuffer ibuffer-loaddefs pdf-isearch let-alist pdf-annot tablist advice tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet pdf-misc pdf-tools pdf-view bookmark jka-compr pdf-cache pdf-info tq pdf-util pdf-macs org-noter org-element org-persist org-id avl-tree generator org-refile org-backlog backlog ivy ivy-faces ivy-overlay colir request mailheader org-tempo tempo dash async ob-ruby ob-python python project ob-dot ob-shell org org-macro org-pcomplete org-list org-footnote org-faces org-entities noutline outline ob-emacs-lisp org-table org-loaddefs find-func cal-menu calendar cal-loaddefs ob-async tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat parse-time iso8601 ls-lisp ob-passthrough ob ob-tangle ol org-src ob-ref ob-lob ob-table ob-exp ob-comint ob-core org-cycle org-fold org-fold-core ob-eval org-keys oc org-compat org-version org-macs css-mode treesit smie imenu eww url-queue shr pixel-fill kinsoku url-file svg xml puny mm-url gnus nnheader gnus-util time-date mail-utils range mm-util mail-prsvr color dired-x amk-dired amk-dired-mac image-dired image-dired-tags image-dired-external image-dired-util xdg ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util cus-edit pp cus-load icons wid-edit image-mode dired dired-loaddefs exif shell pcomplete cap-words superword subword desktop frameset macports macports-select macports-installed macports-outdated macports-describe thingatpt macports-core compile text-property-search comint ansi-osc transient format-spec compat scale-to-fit face-remap reformatter ansi-color amk-mac amk-xml sgml-mode facemenu dom edmacro kmacro exec-path-from-shell use-package-ensure-system-package diminish cl-extra help-mode finder-inf use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core pixel-scroll cua-base ring server display-line-numbers delsel elec-pair custom-file pcase auto-sudoedit-autoloads lsp-ivy-autoloads reformatter-autoloads hide-lines-autoloads counsel-projectile-autoloads lsp-java-autoloads edit-indirect-autoloads lsp-sourcekit-autoloads diff-hl-autoloads paredit-autoloads pyvenv-autoloads svelte-mode-autoloads rainbow-delimiters-autoloads all-the-icons-ivy-rich-autoloads helpful-autoloads elisp-refs-autoloads lsp-dart-autoloads flycheck-package-autoloads yaml-mode-autoloads flycheck-kotlin-autoloads counsel-autoloads ivy-rich-autoloads go-mode-autoloads kotlin-mode-autoloads lsp-ui-autoloads cmake-mode-autoloads company-quickhelp-autoloads company-autoloads docker-autoloads aio-autoloads terraform-mode-autoloads nginx-mode-autoloads csv-mode-autoloads ob-async-autoloads crdt-autoloads hcl-mode-autoloads vlf-autoloads pug-mode-autoloads all-the-icons-dired-autoloads jq-mode-autoloads swiper-autoloads ivy-autoloads org-contrib-autoloads dash-at-point-autoloads coffee-mode-autoloads dumb-jump-autoloads dart-mode-autoloads rainbow-mode-autoloads popup-autoloads vterm-autoloads which-key-autoloads graphviz-dot-mode-autoloads request-autoloads flycheck-autoloads pos-tip-autoloads ruby-test-mode-autoloads py-autopep8-autoloads dap-mode-autoloads lsp-docker-autoloads lsp-treemacs-autoloads expand-region-autoloads json-mode-autoloads rx json-snatcher-autoloads org-pdftools-autoloads org-noter-autoloads nodejs-repl-autoloads git-link-autoloads apache-mode-autoloads pdf-tools-autoloads tablist-autoloads inf-ruby-autoloads pkg-info-autoloads epl-autoloads diminish-autoloads groovy-mode-autoloads typescript-mode-autoloads beacon-autoloads bui-autoloads web-mode-autoloads treemacs-projectile-autoloads treemacs-autoloads cfrs-autoloads posframe-autoloads hydra-autoloads pfuture-autoloads ace-window-autoloads avy-autoloads projectile-autoloads yasnippet-autoloads pcre2el-autoloads dockerfile-mode-autoloads all-the-icons-ibuffer-autoloads all-the-icons-autoloads dired-collapse-autoloads dired-hacks-utils-autoloads lsp-mode-autoloads lv-autoloads spinner-autoloads prettier-autoloads editorconfig-autoloads nvm-autoloads f-autoloads s-autoloads iter2-autoloads ht-autoloads jest-test-mode-autoloads async-autoloads free-keys-autoloads package-lint-autoloads exec-path-from-shell-autoloads orgit-forge-autoloads orgit-autoloads forge-autoloads yaml-autoloads markdown-mode-autoloads magit-autoloads magit-section-autoloads git-commit-autoloads with-editor-autoloads transient-autoloads ghub-autoloads treepy-autoloads dash-autoloads closql-autoloads emacsql-sqlite-autoloads emacsql-autoloads info compat-autoloads swift-mode-autoloads early-init package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util 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 seq simple cl-generic indonesian philippine 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 theme-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 kqueue cocoa ns lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 1620320 827570) (symbols 48 102949 1121) (strings 32 435004 231186) (string-bytes 1 13032964) (vectors 16 209870) (vector-slots 8 4281952 1068627) (floats 8 1654 3481) (intervals 56 24416 11684) (buffers 984 147)) From unknown Wed Sep 10 14:55:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61519: 30.0.50; thing-at-point misdetects emails with numerals in user part Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Feb 2023 11:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61519 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Aaron Madlon-Kay Cc: 61519@debbugs.gnu.org Received: via spool by 61519-submit@debbugs.gnu.org id=B61519.167645975932557 (code B ref 61519); Wed, 15 Feb 2023 11:16:02 +0000 Received: (at 61519) by debbugs.gnu.org; 15 Feb 2023 11:15:59 +0000 Received: from localhost ([127.0.0.1]:58003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSFlW-0008T3-TP for submit@debbugs.gnu.org; Wed, 15 Feb 2023 06:15:59 -0500 Received: from mail-wm1-f46.google.com ([209.85.128.46]:36577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSFlU-0008Sp-O3 for 61519@debbugs.gnu.org; Wed, 15 Feb 2023 06:15:57 -0500 Received: by mail-wm1-f46.google.com with SMTP id g6-20020a05600c310600b003e1f6dff952so1297082wmo.1 for <61519@debbugs.gnu.org>; Wed, 15 Feb 2023 03:15:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=8rcIrB4NwAfw4fVEryeiSRrjPubRqjZlbUxv+NnoOR0=; b=GPg+AlsJtoph175nT6pmy9Ua3LrwfHhyXLrBfJwvQldG3vCdoMVVWsMxGhMkjlRYMV GFAInxV2dhZaeHSTeLVVHRtkkD28LUwRNWK4bn+Le8kbbUp6sqjnrybd5GsnQx1S/8eN aTKFqt8aRuF1l0wvXEiF6ClHSYPGR7wTO17GKxyXAOTytt6VJX28zwcFspg9sVYQFunj e6Cx8Lv6ZD8O8nkodMuaJi384gEyhT7e+sY73A1bTJ/Np4Xvk5MpeFNxnFkbOkvT0j6o 7+Z1tymej8xK2diPjxlEGTBFP9VywFXHfWCA5/6ZhLExTNtFB3ZAjV+TZj26Uk69U+3n tiWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8rcIrB4NwAfw4fVEryeiSRrjPubRqjZlbUxv+NnoOR0=; b=HRzkw0Sgxw3jJQalhtF2DgvtLfmZVjDD5wJ1L9kajCo+HBoS+mXeml/4k81OVpoe5l +5vCLxRz1rrKMC8cJDTkfUmqvk5s7Q+JCp372/V6ceQUmIw+wy03sQtUsl+/HpttL096 mtCZDhMdS6nJUFZxCsrRn5t957HIsr8GGHF0S98mkBda4zA3+7qbVYlnZc3uaiWr5ob+ VQKIfQC2XRUQX3jdw7Oq+70QMjQwH+idHuXeQHP0vtutQYuocAKYV0gk9AGsThrcKVxD Cv6en/9JOEdioUyXCq55RBdr0he+VPkQeBDz1NfFW4a7D4qCUbKZvGFnzoSTjtL0wJoH xBcg== X-Gm-Message-State: AO0yUKVIBx+9Fu+FEtMTvZFUzxU6hwJeiJDi5Mm4e+30FyrikRML2sU4 fKMsygUP0ZJnYYTmegCBQhAZVv7q3sM= X-Google-Smtp-Source: AK7set/iDEwXs6RaDesvJ5FPbe3q780uRXkURqV5MuROBbNQmYSqVx+W8CxUcPGHCOK0J0X4zti2vg== X-Received: by 2002:a05:600c:91d:b0:3e2:5c3:bcfc with SMTP id m29-20020a05600c091d00b003e205c3bcfcmr853858wmp.18.1676459750161; Wed, 15 Feb 2023 03:15:50 -0800 (PST) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id w19-20020a05600c099300b003db03725e86sm1789725wmp.8.2023.02.15.03.15.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 03:15:49 -0800 (PST) From: Robert Pluim In-Reply-To: (Aaron Madlon-Kay's message of "Wed, 15 Feb 2023 08:04:26 +0900") References: Date: Wed, 15 Feb 2023 12:15:48 +0100 Message-ID: <87a61fp4bf.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Wed, 15 Feb 2023 08:04:26 +0900, Aaron Madlon-Kay said: Aaron> 1. Launch Emacs with `emacs -Q` Aaron> 2. Enter an email address with a numeral in the user part, like Aaron> foo0bar@example.com Aaron> 3. With point inside the domain part of the email address, evaluate Aaron> `(thing-at-point 'email)` Aaron> 4. Result will be `bar@example.com` (expected `foo0bar@example.com`) Aaron> The cause of this is the implementation of `thing-at-point-looking-at' Aaron> where it backs up one character at a time to find the start of the Aaron> email. The value for `thing-at-point-email-regexp' allows numbers in Aaron> the user part only from the *second* character, so as the function Aaron> backs up it will mistakenly find the `0` in `0bar@example.com` to be Aaron> outside of the email address. That regexp has a few other issues, but breaking out the full rfc 822 parser for this would be overkill. Could you try the following patch? Robert -- diff --git i/lisp/thingatpt.el w/lisp/thingatpt.el index 9363a474cb5..f3367290dee 100644 --- i/lisp/thingatpt.el +++ w/lisp/thingatpt.el @@ -645,7 +645,7 @@ thing-at-point-looking-at ;; Email addresses (defvar thing-at-point-email-regexp - "?" + "?" "A regular expression probably matching an email address. This does not match the real name portion, only the address, optionally with angle brackets.") From unknown Wed Sep 10 14:55:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61519: 30.0.50; thing-at-point misdetects emails with numerals in user part Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Feb 2023 14:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61519 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Aaron Madlon-Kay Cc: 61519@debbugs.gnu.org Received: via spool by 61519-submit@debbugs.gnu.org id=B61519.167716325226719 (code B ref 61519); Thu, 23 Feb 2023 14:41:01 +0000 Received: (at 61519) by debbugs.gnu.org; 23 Feb 2023 14:40:52 +0000 Received: from localhost ([127.0.0.1]:33543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVCmB-0006ws-Qo for submit@debbugs.gnu.org; Thu, 23 Feb 2023 09:40:52 -0500 Received: from mail-wm1-f43.google.com ([209.85.128.43]:44616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVCm9-0006we-IK for 61519@debbugs.gnu.org; Thu, 23 Feb 2023 09:40:50 -0500 Received: by mail-wm1-f43.google.com with SMTP id m25-20020a7bcb99000000b003e7842b75f2so6600386wmi.3 for <61519@debbugs.gnu.org>; Thu, 23 Feb 2023 06:40:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4GdzuG4yXPr++fJOy1uk1msMKXhE0qTeL8f07yqxpM8=; b=FsHnO2CBa9NxkVpNd0Nb7wD/oVRBS3c5A1GYj7BbyEjgLMwJpVGJxxIjfWj9zNGZ8b PxVjgSyeLDpMwnE/X0tvv/Aejuv2iAEuwi27dBV19/pl22BE4eb+WSLutszqPtI9/RIN yEABuxTGTz400C4GaPdK+6kYhDCXHXgS3TMvuV0VuJpAqq3/G+Jd7Uh0fxp1lhqUe3iT ekoHqwa/BMQ4KgQCpTSCELF9kbieMkt7/qjp7fGJh8xRM91o0Iez2d9JTPhsJZlXhxoq NWihAZel7LzRqee0n7nOagWwKIEg2v1B2IlUPfBJpz+GymLHsT+Ns9yc3QJ/1jXOtRPs QB+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4GdzuG4yXPr++fJOy1uk1msMKXhE0qTeL8f07yqxpM8=; b=ebgV012936GWH1hLoLveZz6Xua5Fl3kaUxPXmVNlrqe+yEiia6ZWLKE5K7HV9RVAHZ PR+ignst9ISSweaCFGGC/fHsF5RXd0tMV338uwwletOBnxTfMaCXo+56WoXl6igvrbOY FFWEFou1vvhN1Swwc4Tnt0MKmKUgYgX6+uXuqMWIyqaBPuhjnSrdBjdOxyPTO0OpyokV rz1IXQQjvgCUV41iZjUeE6gCgC4lqYV6Uq5D99ICe5oNO486Zy7jdFIzZNtBAA9sdgYf yISIqjwoM89dAIPcVA+ue/WpteILU9gVAuzeJiolUk2/D3WjKILJUNSECoxCOP595dwg 8RZg== X-Gm-Message-State: AO0yUKXXkBK7DpBnCG0Nece6nmIX7ZsU8AKsnJX31ojlZtxsXuowCvJ/ vM/GbCk0n0xUUoluFi8dhvxJHCwm0mQ= X-Google-Smtp-Source: AK7set+nGAClKV5gvPUcqhbBThaeaGRwB+i/+cMhgtAmtTB2koFjq0mMOB6XOJkHYWHXa2TF29EPng== X-Received: by 2002:a05:600c:1d92:b0:3ea:8ed9:8f03 with SMTP id p18-20020a05600c1d9200b003ea8ed98f03mr1495964wms.24.1677163243017; Thu, 23 Feb 2023 06:40:43 -0800 (PST) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id iz4-20020a05600c554400b003e203681b26sm8745885wmb.29.2023.02.23.06.40.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 06:40:42 -0800 (PST) From: Robert Pluim In-Reply-To: <87a61fp4bf.fsf@gmail.com> (Robert Pluim's message of "Wed, 15 Feb 2023 12:15:48 +0100") References: <87a61fp4bf.fsf@gmail.com> Date: Thu, 23 Feb 2023 15:40:41 +0100 Message-ID: <87mt548mxi.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Wed, 15 Feb 2023 12:15:48 +0100, Robert Pluim s= aid: >>>>> On Wed, 15 Feb 2023 08:04:26 +0900, Aaron Madlon-Kay said: Aaron> 1. Launch Emacs with `emacs -Q` Aaron> 2. Enter an email address with a numeral in the user part, like Aaron> foo0bar@example.com Aaron> 3. With point inside the domain part of the email address, evalu= ate Aaron> `(thing-at-point 'email)` Aaron> 4. Result will be `bar@example.com` (expected `foo0bar@example.c= om`) Aaron> The cause of this is the implementation of `thing-at-point-looki= ng-at' Aaron> where it backs up one character at a time to find the start of t= he Aaron> email. The value for `thing-at-point-email-regexp' allows number= s in Aaron> the user part only from the *second* character, so as the functi= on Aaron> backs up it will mistakenly find the `0` in `0bar@example.com` t= o be Aaron> outside of the email address. Robert> That regexp has a few other issues, but breaking out the full r= fc 822 Robert> parser for this would be overkill. Could you try the following = patch? ping The patch works for me, so I=CA=BCll commit it sometime in the next few days unless I hear any different from you. Robert --=20 From unknown Wed Sep 10 14:55:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61519: 30.0.50; thing-at-point misdetects emails with numerals in user part Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Mar 2023 15:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61519 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Aaron Madlon-Kay Cc: 61519@debbugs.gnu.org Received: via spool by 61519-submit@debbugs.gnu.org id=B61519.167846252521950 (code B ref 61519); Fri, 10 Mar 2023 15:36:02 +0000 Received: (at 61519) by debbugs.gnu.org; 10 Mar 2023 15:35:25 +0000 Received: from localhost ([127.0.0.1]:55564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paemD-0005hx-KA for submit@debbugs.gnu.org; Fri, 10 Mar 2023 10:35:25 -0500 Received: from mail-wm1-f53.google.com ([209.85.128.53]:52946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paemB-0005hV-Ni; Fri, 10 Mar 2023 10:35:24 -0500 Received: by mail-wm1-f53.google.com with SMTP id j3so3655225wms.2; Fri, 10 Mar 2023 07:35:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678462517; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=MRKomrKKENSTaKQHeawFaa1xRkDpGBRS3wVMFIdk9ZU=; b=MpN07h8/9erlskDbj+MHQb7C6U5bbB21SnBeJjgOZi6f8nel/vksSisJkAjtyxvvMZ ZkYyXyzd0QWsSWMQ+eTR+xJtC9sxBt3s71qOgY2Lak4JEV3p1obiT0dd4mGp54pQ+IPb I/QpbAfJX4mEFEcIioC0Y9qqGdgajd/sj6S/p2guqtWKXNAz3Z9LTnULyrWqrQr4GpEu bHCfuVWhGH+wEZQsqUgH97CIbJJ25pzfyga7Siayu8Rs/l64eysF8h+/yVck1/BOL2ik q7ptE7DgzhA02OZeb+9dxC55DShqlgmKd4QVH8VKlHqBxWvQp7V9Og+nBb6EaPOrd4AZ WKWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678462517; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MRKomrKKENSTaKQHeawFaa1xRkDpGBRS3wVMFIdk9ZU=; b=yx7tZewmbV5aCRgJK4vGuSD3jFWBi6R2lKPnYYYX7ujw1RXstG1OviDAFXTtsr7g3s XDWuqMbMCM99K9Jq6uqQrRYjQ1OwOJMEFtmlvrc1fzg1NeMeYXKs0DY3by03pHrucnYP WW0D4awxMTmoxG0b5n2M9MBZxm2aCqJOu55wQaAwsyyCFO7nnzTCXuWJjXLNG4WPu7wu 2oc0DkVPLfTLlELnif4rpqYKxVvxZ/gJlSPGiSTvJoldfgdGH4PtePl8R6j9i2girQyv RGtXCDD07wX+YOZ+s0RW9pHArrrLsKY1kXCK7cij3UwD41PNtvx2yiH7BwAGrr50GrWH rAcA== X-Gm-Message-State: AO0yUKUZOTNguU7R/KLte4wEg1ZO6uQBr/WpwZoPc6cQISCqUCK0oa0k qKjVkfoW9jCT0VGeyodPj717Kbhn7Jw= X-Google-Smtp-Source: AK7set/AiQuXRy/7xqz5YZe1YqPcWqOvNn+YKomDQ1tDCXVWnHzrwx545Hdv/O1Eas0BSgr6k45mDw== X-Received: by 2002:a05:600c:4751:b0:3ea:f0d6:5d36 with SMTP id w17-20020a05600c475100b003eaf0d65d36mr3254236wmo.29.1678462517271; Fri, 10 Mar 2023 07:35:17 -0800 (PST) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id 16-20020a05600c029000b003dec22de1b1sm235184wmk.10.2023.03.10.07.35.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 07:35:16 -0800 (PST) From: Robert Pluim In-Reply-To: <87mt548mxi.fsf@gmail.com> (Robert Pluim's message of "Thu, 23 Feb 2023 15:40:41 +0100") References: <87a61fp4bf.fsf@gmail.com> <87mt548mxi.fsf@gmail.com> Date: Fri, 10 Mar 2023 16:35:15 +0100 Message-ID: <877cvowrf0.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 61519 fixed close 61519 30.1 quit Closing. Committed as 03cfede8f0a This has been broken since at least emacs-23, so it=CA=BCs not an emacs-29-worthy regression. Robert --=20