From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#65338: 30.0.50; bibtex: Long url field value and bibtex-font-lock-url-regexp Date: Wed, 16 Aug 2023 15:52:41 +0530 Message-ID: <875y5f477y.fsf@gmail.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="3659"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: roland winkler To: 65338@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 16 12:24:22 2023 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 1qWDhO-0000i2-F6 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Aug 2023 12:24:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWDh5-0000NH-Os; Wed, 16 Aug 2023 06:24:03 -0400 Original-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 1qWDh4-0000N9-Lt for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2023 06:24:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qWDh4-00035e-Df; Wed, 16 Aug 2023 06:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qWDh3-0007uX-Sh; Wed, 16 Aug 2023 06:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: winkler@gnu.org, bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Aug 2023 10:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65338 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: roland winkler Original-Received: via spool by submit@debbugs.gnu.org id=B.169218138130310 (code B ref -1); Wed, 16 Aug 2023 10:24:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Aug 2023 10:23:01 +0000 Original-Received: from localhost ([127.0.0.1]:38906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWDg4-0007si-KF for submit@debbugs.gnu.org; Wed, 16 Aug 2023 06:23:01 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:33476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWDg0-0007sR-DE for submit@debbugs.gnu.org; Wed, 16 Aug 2023 06:22:59 -0400 Original-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 1qWDfu-0000IX-Uq for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2023 06:22:50 -0400 Original-Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qWDfr-000318-NF for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2023 06:22:50 -0400 Original-Received: by mail-pf1-x441.google.com with SMTP id d2e1a72fcca58-68879fc4871so681416b3a.0 for ; Wed, 16 Aug 2023 03:22:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692181365; x=1692786165; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=nzQVMhCu9x7tpVBsv/Qr7qLbTOkdmd+t7w8Ct9t19Vs=; b=g8F2Bg7ehbX08fMWFNazV51cheuVkwpDCnOye6oofrK9lcE1HsW/8Zi7thWFPDGkcV mbxYoiYbyBOxRFmgtE7f+yPWhORLyymA+71ZheJw7trOtGrQwU/X4KiKd51x/ot9rOZu RKClqeIoPrmFQYeUXUoGeX2Dg/ah41CBH9puNGWAOzcKlVsQb/LdFvDI6I75PPe80uHa wKpm05aJbgOZLFcy1F54lp2oonod3TBrGL+AFBOjWzAL451sNo2MJ1OV92Id9q/XInAW 5Incpb4ul8VE75CsZoxe5KevmEoaimv7bzRYnRRFYwVj0lSpflfMmzpp9loHUjMptuOp Hi5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692181365; x=1692786165; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nzQVMhCu9x7tpVBsv/Qr7qLbTOkdmd+t7w8Ct9t19Vs=; b=gScqMINKq2iyMTW1MoOaGtG5htwDH66k0w2SYN9LhPFGW63DYrQU3didrBBOL0tQSf vQDJkbVHR9N3EqPFFzi9N0NCPAGhum+NTfQqRsEBlz4fkqmQoAQI4BBYHVafFw0Tmqbo eL2Nz80F1WTCp8fNuT/jmI+l+bQFFG85SlPBY4NItggtRPlVwZgfUJtCtLNOXQeNsVlF E/DOE2VJ0lF1zogaLefXcykFn8BMm0Ua1X/+dMdjBhNZnL/popORMCXvZ/eO4n7eXV5h 2Al5leA5Lt4gnJEqZbamUcS8JmkRH4k5dKvyKd8i59o2SSEFTTrBZGniNBif0WqozF9L XutQ== X-Gm-Message-State: AOJu0YwKeRIvLAizlkeI16dd2OGyaYcz8rWkZH7T0gbZrjxmfnyHUU5s FKn2yPe1DNN+nIfVjzBJdDV1v1tkKCT47Q== X-Google-Smtp-Source: AGHT+IH2o4ySy752ea6D0/pTN5pSC4hpcngMs5j8CF/ovTScAyvL0M8etOni+tTGPesO+LBTQUAoeQ== X-Received: by 2002:a05:6a21:328a:b0:137:e595:830f with SMTP id yt10-20020a056a21328a00b00137e595830fmr1669895pzb.57.1692181365395; Wed, 16 Aug 2023 03:22:45 -0700 (PDT) Original-Received: from localhost ([14.139.216.98]) by smtp.gmail.com with ESMTPSA id c24-20020aa781d8000000b00687ce7c6540sm11089530pfn.99.2023.08.16.03.22.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 03:22:44 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::441; envelope-from=visuweshm@gmail.com; helo=mail-pf1-x441.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:267566 Archived-At: X-Debbugs-Cc: Roland Winkler I have a bibtex entry that has a long URL @Misc{DelhiPlasmaPyrlosis, author = {Central Pollution Control Board, India}, title = {Study on Plastic Waste Disposal through ``Plasma Pyrolysis Technology''}, month = {oct}, year = 2016, note = {\url{https://cpcb.nic.in/displaypdf.php?id=cGxhc3RpY3dhc3RlL1BsYXNtYS1QeXJvbHlzaXMtZmluYWwtUmVwb3J0LTIxLTExLTE2LnBkZg}, last checked on 15/08/2023.}, file = {papers/delhiplasmapyrlosis.pdf}, url = {https://cpcb.nic.in/displaypdf.php?id=cGxhc3RpY3dhc3RlL1BsYXNtYS1QeXJvbHlzaXMtZmluYWwtUmVwb3J0LTIxLTExLTE2LnBkZg} } When I fill the entry with C-c C-q, url lines becomes url = {https://cpcb.nic.in/displaypdf.php?id=cGxhc3RpY3dhc3RlL1BsYXNtYS1QeXJvbHlzaXMtZmluYWwtUmVwb3J0LTIxLTExLTE2LnBkZg} This however breaks the buttonisation since the second character class in bibtex-font-lock-url-regexp does not include newline, only space and tab. If I add a newline as below, then the url field value is buttonised as expected. Should this be done in bibtex-mode.el as well? diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 394f80f47e..96597ba8fb 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1845,7 +1845,7 @@ bibtex-font-lock-url-regexp ;; Assume that field names begin at the beginning of a line. (concat "^[ \t]*" (regexp-opt (delete-dups (mapcar #'caar bibtex-generate-url-list)) t) - "[ \t]*=[ \t]*") + "[ \t]*=[ \t\n]*") "Regexp for `bibtex-font-lock-url' derived from `bibtex-generate-url-list'.") (defvar bibtex-string-empty-key nil In GNU Emacs 30.0.50 (build 8, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars) of 2023-08-10 built on astatine Repository revision: 65f71ca9aaa1587284293e2e34a0e28ee6b42380 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101007 System Description: Debian GNU/Linux trixie/sid Configured using: 'configure --with-sound=alsa --with-x-toolkit=lucid --with-json --without-xaw3d --without-gconf --without-libsystemd --without-cairo' Configured features: ACL DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XFT XIM XINPUT2 XPM LUCID ZLIB Important settings: value of $LC_MONETARY: ta_IN.UTF-8 value of $LC_NUMERIC: ta_IN.UTF-8 value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: pdf-virtual-global-minor-mode: t TeX-PDF-mode: t reveal-mode: t outline-minor-mode: t recentf-mode: t server-mode: t paredit-mode: t eros-mode: t flymake-mode: t sow-mode: t pdf-occur-global-minor-mode: t vz/random-frame-background-mode: t minibuffer-depth-indicate-mode: t repeat-mode: t display-time-mode: t display-battery-mode: t delete-selection-mode: t xterm-mouse-mode: t straight-use-package-mode: t straight-package-neutering-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t use-hard-newlines: t tab-bar-history-mode: t tab-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t undelete-frame-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t abbrev-mode: t Load-path shadows: None found. Features: (org-num ob-ditaa ob-plantuml org-clock org-colview org-crypt org-ctags org-habit org-mouse org-plot org-protocol url-misc bibtex-style pcmpl-unix gnus-draft latexenc preview reporter desktop tex-buf font-latex tex-mode org-capture doct pdf-virtual hippie-exp dash completion display-line-numbers wdired grep msb shadow emacsbug cus-start loadhist ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda ox-html table ox-ascii ox-publish ox timezone inspector latex-mode-expansions latex latex-flymake tex-ispell tex-style tex crm shr-color org-pdftools org-noter org-element org-persist avl-tree oc-basic help-at-pt calccomp calc-aent calc-units calc-menu calc-ext calc calc-loaddefs rect calc-macs flyspell ispell ecomplete ement-tabulated-room-list ement ement-notify notifications ement-room dns ement-room-list ement-lib ement-api ement-structs plz ement-macros taxy-magit-section magit-section benchmark taxy svg-lib persist lacarte ffap misc tabify man image-file image-converter find-dired rfc2104 tramp-cmds tramp-cache time-stamp nnfolder pdf-sync pdf-annot facemenu pdf-outline pdf-links the-org-mode-expansions ob-gnuplot ob-fortran ob-python python-el-fgallina-expansions python compat compat-macs ob-C ob-shell ob-racket async ob-async cdlatex texmathp org-attach org-id org-refile ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect ol-docview doc-view ol-bibtex bibtex ol-bbdb ol-w3m ol-doi org-link-doi org-tempo ol-man org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete org-list org-footnote org-faces org-entities ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs org-version org-compat org-macs pdf-history icomplete autoload loaddefs-gen dabbrev log-edit add-log term/xterm xterm goto-addr pixel-scroll cua-base edebug thai-util thai-word cc-mode-expansions cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs apropos glyphless-mode frameset typo inline mule-util expand-region text-mode-expansions er-basic-expansions expand-region-core expand-region-custom avy smerge-mode reveal image-crop descr-text cl-print view mines cookie1 gamegrid url-http url-gw url-cache url-auth eww url-queue mm-url dired-aux gnus-dired shell-command+ face-remap sort gnus-cite flow-fill mm-archive mail-extr textsec uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check gnus-async gnus-bcklg qp gnus-ml shortdoc comp comp-cstr help-fns radix-tree etags fileloop generator imenu-xref xref pulse color misearch multi-isearch sh-script smie treesit network-stream nsm nndraft nnmh nndoc nnmaildir nnagent nnml executable nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig nntp gnus-cache gnus-sum shr pixel-fill kinsoku url-file svg gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range message sendmail yank-media puny rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util mail-utils range mm-util mail-prsvr noutline outline bug-reference cursor-sensor recentf tree-widget vc-backup log-view pcvs-util vc diff vc-git diff-mode vc-dispatcher server paredit edmacro kmacro eros checkdoc lisp-mnt flymake-proc flymake project warnings thingatpt wordel-autoloads mines-autoloads sokoban-autoloads ement-autoloads svg-lib-autoloads taxy-magit-section-autoloads magit-section-autoloads dash-autoloads taxy-autoloads persist-autoloads plz-autoloads nov-autoloads esxml-autoloads kv-autoloads transmission-autoloads csv-mode-autoloads lua-mode-autoloads nix-mode-autoloads gnuplot-autoloads go-mode-autoloads racket-mode-autoloads eros-autoloads writegood-mode-autoloads siege-mode-autoloads paredit-autoloads puni-autoloads expand-region-autoloads filladapt-autoloads compose scroll-other-window org-pdftools-autoloads org-noter-autoloads change-env-autoloads math-delimiters-autoloads doct-autoloads ob-async-autoloads async-autoloads emacs-ob-racket-autoloads valign-autoloads cdlatex-autoloads auctex-autoloads tex-site tempo pdf-occur ibuf-ext ibuffer ibuffer-loaddefs 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-isearch let-alist pdf-misc imenu pdf-tools 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 url-vars compile cus-edit wid-edit pdf-view jka-compr pdf-cache pdf-info tq pdf-util pdf-macs image-mode dired-x dired dired-loaddefs exif pdf-tools-autoloads tablist-autoloads typo-autoloads mb-depth repeat visual-fill-autoloads olivetti-autoloads time battery filenotify dom tamil99 quail disp-table lacarte-autoloads shell-command-plus-autoloads icons delsel easy-mmode xt-mouse cus-load avy-autoloads skeleton icalendar diary-lib diary-loaddefs cal-menu calendar cal-loaddefs dired-du-autoloads finder-inf filecache imenu-xref-autoloads ert ewoc debug backtrace find-func dbus xml derived chemtable-autoloads molar-mass-autoloads vc-backup-autoloads compat-autoloads saveplace-pdf-view saveplace tramp-sh tramp trampver tramp-integration files-x tramp-message tramp-compat xdg shell pcomplete comint ansi-osc ring parse-time iso8601 time-date format-spec auth-source eieio eieio-core password-cache json map byte-opt ansi-color tramp-loaddefs bookmark text-property-search pp saveplace-pdf-view-autoloads rx pcase inspector-autoloads xr-autoloads straight-autoloads cl-seq info cl-extra help-mode straight subr-x cl-macs gv cl-loaddefs cl-lib bytecomp byte-compile vz-nh-theme vz-options-theme rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen 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 dbusbind inotify dynamic-setting system-font-setting font-render-setting x-toolkit xinput2 x multi-tty move-toolbar make-network-process emacs) Memory information: ((conses 16 4499264 2547716) (symbols 48 87286 1764) (strings 32 460793 70392) (string-bytes 1 340659943) (vectors 16 178164) (vector-slots 8 3544067 991149) (floats 8 235970 8725) (intervals 56 415515 9073) (buffers 984 303))