From unknown Sat Jun 14 02:06:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#45443 <45443@debbugs.gnu.org> To: bug#45443 <45443@debbugs.gnu.org> Subject: Status: 28.0.50; Can't find definition of compilation--message->loc Reply-To: bug#45443 <45443@debbugs.gnu.org> Date: Sat, 14 Jun 2025 09:06:04 +0000 retitle 45443 28.0.50; Can't find definition of compilation--message->loc reassign 45443 emacs submitter 45443 rms@gnu.org severity 45443 wishlist tag 45443 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 26 05:18:58 2020 Received: (at submit) by debbugs.gnu.org; 26 Dec 2020 10:18:58 +0000 Received: from localhost ([127.0.0.1]:58737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kt6f3-00047x-KF for submit@debbugs.gnu.org; Sat, 26 Dec 2020 05:18:58 -0500 Received: from lists.gnu.org ([209.51.188.17]:51374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kt6f1-00047o-Ma for submit@debbugs.gnu.org; Sat, 26 Dec 2020 05:18:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kt6f1-00079j-Ee for bug-gnu-emacs@gnu.org; Sat, 26 Dec 2020 05:18:55 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60100) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kt6ez-0007BH-Rj for bug-gnu-emacs@gnu.org; Sat, 26 Dec 2020 05:18:55 -0500 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1kt6ez-0000D4-0e; Sat, 26 Dec 2020 05:18:53 -0500 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: bug-gnu-emacs@gnu.org Subject: 28.0.50; Can't find definition of compilation--message->loc Message-Id: Date: Sat, 26 Dec 2020 05:18:53 -0500 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit 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: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Trying to debug a bug in compile-goto-error on Rmail files, I typed C-h f compilation--message->loc RET then clicked on the file name -- which is supposed to find the definition of that function. It did not find the definition; instead it said, Unable to find location in file I also tried M-x find-function RET compilation--message->loc RET. It found a call to compilation--message->loc, not the definition. I searched for that name in the file and did not find a definition. I will try grepping for it. In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32, cairo version 1.15.10) of 2020-12-08 built on freetop Repository revision: 0155bd0fdb166c97a2ce76cc5bc64fd195a676d3 Repository branch: master System Description: Trisquel GNU/Linux Etiona (9.0) Configured using: 'configure --with-gnutls=ifavailable 'CFLAGS=-O0 -g'' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK2 X11 XDBE XIM MODULES THREADS PDUMPER Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Help Minor modes in effect: shell-dirtrack-mode: t gpm-mouse-mode: t tooltip-mode: t global-eldoc-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-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 buffer-read-only: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Load-path shadows: None found. Features: (completion dos-w32 find-cmd find-dired whitespace cl-print debug backtrace rmail-spam-filter rmailedit rmailsort undigest tramp-gvfs zeroconf tramp-cache bug-reference shortdoc help-fns radix-tree descr-text help-at-pt ispell unrmail time-stamp texinfo url-http url-auth url-gw nsm tramp tramp-loaddefs trampver tramp-integration tramp-compat ls-lisp arc-mode archive-mode srecode/srt-mode semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn semantic/db semantic/format srecode/template srecode/srt-wy semantic/wisent semantic/wisent/wisent semantic/ctxt srecode/ctxt semantic/tag-ls semantic/find srecode/compile srecode/dictionary srecode/fields srecode/table srecode eieio-base semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet pcmpl-unix rect compare-w novice kmacro etags fileloop xref project quail mail-extr pp shadow emacsbug smerge-mode diff log-edit pcvs-util add-log org-element avl-tree generator ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe 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 netrc nnoo gnus-spec gnus-int gnus-range gnus-win ol-docview doc-view jka-compr image-mode exif ol-bibtex bibtex ol-bbdb ol-w3m org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs cl-extra parse-time iso8601 mhtml-mode css-mode smie eww xdg url-queue mm-url gnus nnheader wid-edit color js imenu cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode help-mode mule-util shell pcomplete thingatpt files-x grep compile comint ansi-color ring misearch multi-isearch epa-mail rmailkwd rmailsum vc-mtn vc-hg vc-git diff-mode easy-mmode vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc vc-dispatcher shr kinsoku svg xml dom rmailout dabbrev mailalias sendmail qp rmailmm message rmc puny rfc822 mml mml-sec epa epg epg-config gnus-util text-property-search time-date mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader mail-parse rfc2231 rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils dired-aux dired dired-loaddefs t-mouse term/linux view derived paren cus-start cus-load advice finder-inf package easymenu 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 subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer 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 charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 1190950 169604) (symbols 48 45903 20) (strings 32 226599 25400) (string-bytes 1 5447911) (vectors 16 76348) (vector-slots 8 2114801 141195) (floats 8 441 551) (intervals 56 152476 898) (buffers 984 297)) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] -- Dr Richard Stallman Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 26 05:44:31 2020 Received: (at 45443) by debbugs.gnu.org; 26 Dec 2020 10:44:31 +0000 Received: from localhost ([127.0.0.1]:58776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kt73m-0004oW-PC for submit@debbugs.gnu.org; Sat, 26 Dec 2020 05:44:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kt73k-0004oG-Ng for 45443@debbugs.gnu.org; Sat, 26 Dec 2020 05:44:29 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60704) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kt73f-0008LM-Ee for 45443@debbugs.gnu.org; Sat, 26 Dec 2020 05:44:23 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3529 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kt73X-0007Zv-BC; Sat, 26 Dec 2020 05:44:15 -0500 Date: Sat, 26 Dec 2020 12:44:00 +0200 Message-Id: <83a6u0n8y7.fsf@gnu.org> From: Eli Zaretskii To: rms@gnu.org In-Reply-To: (message from Richard Stallman on Sat, 26 Dec 2020 05:18:53 -0500) Subject: Re: bug#45443: 28.0.50; Can't find definition of compilation--message->loc References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45443 Cc: 45443@debbugs.gnu.org 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 (---) > From: Richard Stallman > Date: Sat, 26 Dec 2020 05:18:53 -0500 > > Trying to debug a bug in compile-goto-error on Rmail files, > I typed C-h f compilation--message->loc RET > then clicked on the file name -- which is supposed to find the definition > of that function. > > It did not find the definition; instead it said, > > Unable to find location in file > > I also tried M-x find-function RET compilation--message->loc RET. > It found a call to compilation--message->loc, not the definition. > > I searched for that name in the file and did not find a definition. > I will try grepping for it. It's a general problem with uses of cl-defstruct and similar constructs: they generate functions and macros that the Help functions are unable to find. In this case, see this part of compile.el: (cl-defstruct (compilation--message (:constructor nil) (:copier nil) ;; (:type list) ;Old representation. (:constructor compilation--make-message (loc type end-loc rule)) (:conc-name compilation--message->)) loc type end-loc rule) From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 26 13:07:53 2020 Received: (at control) by debbugs.gnu.org; 26 Dec 2020 18:07:53 +0000 Received: from localhost ([127.0.0.1]:59890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktDyr-0003i4-5a for submit@debbugs.gnu.org; Sat, 26 Dec 2020 13:07:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktDyp-0003hN-9U for control@debbugs.gnu.org; Sat, 26 Dec 2020 13:07:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37510) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktDyk-0003O8-3V for control@debbugs.gnu.org; Sat, 26 Dec 2020 13:07:46 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ktDyj-0006fv-Ml for control@debbugs.gnu.org; Sat, 26 Dec 2020 13:07:45 -0500 Subject: control message for bug 45443 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Sat, 26 Dec 2020 13:07:45 -0500 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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 (---) forcemerge 1457 45443 From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 26 13:58:32 2020 Received: (at 45443) by debbugs.gnu.org; 26 Dec 2020 18:58:32 +0000 Received: from localhost ([127.0.0.1]:59908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktEls-00012Z-DH for submit@debbugs.gnu.org; Sat, 26 Dec 2020 13:58:32 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:39902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktElq-000124-S0 for 45443@debbugs.gnu.org; Sat, 26 Dec 2020 13:58:31 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BQIwKNA032681; Sat, 26 Dec 2020 18:58:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=dNsj0A8qmA0VFgCAi4GbFzSxwGTMHRN+8ucuWL0rzE8=; b=stybE5FPqJ9ZwNWnlFd8xdu5j5jxKTmNrI4gC5IvIrD9vxI2lnEj7AOULcSx8VBiTPoH qWozYHPht+mk5V6jbx/uktdt+VxCKnzFLoYcR5BlmZW8zri5y2254FgDMKqiY9uTr3jp 82ratmbKk8txsgqq55GT6TETMG6y/Q7Saly3OpRScc3wxzsqxAr+VDarzNoKlB6clBxK CfiAdsGfem/bXnwmbQIQMTcl7Gne6ADNJr4spB28arGxBkkaOS1aEcAbKTQ8LQHsZ22X dannloxPiTrv8lXMbxRUK8Y7PWXxusUiM1OO+kX2Z7h3HRNYyoDCUhLq8ey8cs0fq1OG 3Q== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 35nw4kgus3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 26 Dec 2020 18:58:25 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BQIo2eJ116808; Sat, 26 Dec 2020 18:58:24 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 35nvggrw9e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 26 Dec 2020 18:58:24 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0BQIwMbK020695; Sat, 26 Dec 2020 18:58:23 GMT MIME-Version: 1.0 Message-ID: Date: Sat, 26 Dec 2020 10:58:21 -0800 (PST) From: Drew Adams To: Eli Zaretskii , rms@gnu.org Subject: RE: bug#45443: 28.0.50; Can't find definition of compilation--message->loc References: <> <<83a6u0n8y7.fsf@gnu.org>> In-Reply-To: <<83a6u0n8y7.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5095.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9846 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 bulkscore=0 phishscore=0 mlxscore=0 malwarescore=0 spamscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012260128 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9846 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 phishscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 adultscore=0 clxscore=1011 mlxlogscore=999 lowpriorityscore=0 impostorscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012260129 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45443 Cc: 45443@debbugs.gnu.org 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 (---) > It's a general problem with uses of cl-defstruct and similar > constructs: they generate functions and macros that the Help functions > are unable to find. Yep. It's a big doc/help problem, IMO. And we've moved more and more stuff to things like `cl-defstruct' (which in itself is fine). I don't see a good general solution to this problem. But it is, I think, something important for the quintessential "self-documenting" editor. I truly hope that some smart and ambitious hacker tackles this. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 26 19:51:43 2020 Received: (at 45443) by debbugs.gnu.org; 27 Dec 2020 00:51:43 +0000 Received: from localhost ([127.0.0.1]:60116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktKHe-0005D6-Tk for submit@debbugs.gnu.org; Sat, 26 Dec 2020 19:51:43 -0500 Received: from sonic304-23.consmr.mail.ir2.yahoo.com ([77.238.179.148]:39911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktKHd-0005Cu-8C for 45443@debbugs.gnu.org; Sat, 26 Dec 2020 19:51:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1609030295; bh=lIBVoY5tQtEmozK9azOEMf8ILdajGzhJkuB3Qf7GoRE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject; b=N8ZdBaQ/oZvMtXMn+221QWNGrgGNdyMm993EnFOMNe7OGRzHN8oOFzDUdSg6YGLtlfhQMh6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ZqAOtOSV5rFhqU4eN6YPeslsmStMYM8.LHhh ykbmBzI4yFx2se5l2XzZIJaxowqc2HEvKMM4UIYoorYZ.j8t6OdJEcATLXGaWsDTs1zXOgeo4XCQ s5RsdFQC8Pm6Tlk.W9TTKCKb2kYz7.qJgv8vFHwPh9c9UJOEat97rCqefTFebgbV6qI2Q9kdP9mq .z8EGwA-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ir2.yahoo.com with HTTP; Sun, 27 Dec 2020 00:51:35 +0000 Received: by smtp401.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 8ad96f2d5f15e71497548c3a2dec8691; Sun, 27 Dec 2020 00:51:30 +0000 (UTC) From: =?utf-8?Q?Daniel_Mart=C3=ADn?= To: Drew Adams Subject: Re: bug#45443: 28.0.50; Can't find definition of compilation--message->loc References: > <83a6u0n8y7.fsf@gnu.org>> Date: Sun, 27 Dec 2020 01:51:29 +0100 In-Reply-To: (Drew Adams's message of "Sat, 26 Dec 2020 10:58:21 -0800 (PST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Mailer: WebService/1.1.17278 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Apache-HttpAsyncClient/4.1.4 (Java/11.0.8) Content-Length: 7463 X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 45443 Cc: Eli Zaretskii , rms@gnu.org, 45443@debbugs.gnu.org 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: -0.8 (/) --=-=-= Content-Type: text/plain Drew Adams writes: >> It's a general problem with uses of cl-defstruct and similar >> constructs: they generate functions and macros that the Help functions >> are unable to find. > > Yep. It's a big doc/help problem, IMO. And > we've moved more and more stuff to things like > `cl-defstruct' (which in itself is fine). > > I don't see a good general solution to this > problem. But it is, I think, something > important for the quintessential > "self-documenting" editor. I truly hope that > some smart and ambitious hacker tackles this. One possible approach is, if the regular expression code fails to find a location, we can fall back to expand macros until we find the definition (a defalias in the case of a function, or a defvar in the case of a variable), or we reach the end of the file. I attach a first implementation of this approach, with some tests for the function definition that Richard wanted to find. I'm sure there are still missing cases that are interesting (closures?). Give it a try and see if there are still relevant symbols whose definition Emacs is unable to locate. I'm also open to feedback about the macro expansion logic. Could it be more efficient? Thanks. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Improve-find-definition-in-Help-buffers.patch >From 34662c47b359792e048bb7020d7eb0fbf94e7838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= Date: Sun, 27 Dec 2020 01:07:26 +0100 Subject: [PATCH] Improve "find definition" in *Help* buffers * lisp/emacs-lisp/find-func.el (find-function--search-by-expanding-macros): New internal function that searches for a function or variable by expanding macros in a buffer. * lisp/emacs-lisp/find-func.el (find-function-search-for-symbol): If our regexp algorithm could not find a location for the symbol definition, resort to find-function--search-by-expanding-macros. * test/lisp/emacs-lisp/find-func-tests.el: Add a automatic test for a function and variable generated by a macro. * etc/NEWS: Advertise the improved functionality. --- etc/NEWS | 6 +++ lisp/emacs-lisp/find-func.el | 65 ++++++++++++++++++++++++- test/lisp/emacs-lisp/find-func-tests.el | 10 ++++ 3 files changed, 80 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index a320acb5fa..2bfaccd2ef 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -114,6 +114,12 @@ choosing a group, or clicking a button in the "*Help*" buffers when looking at the doc string of a function that belongs to one of these groups. +--- +** Improved "find definition" feature of *Help* buffers. +Now clicking on the link to find the definition of functions generated +by 'cl-defstruct', or variables generated by 'define-derived-mode', +for example, will go to the exact place where they are defined. + ** New variable 'redisplay-skip-initial-frame' to enable batch redisplay tests. Setting it to nil forces the redisplay to do its job even in the initial frame used in batch mode. diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 074e7db295..7796a72ecf 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -389,7 +389,70 @@ find-function-search-for-symbol (progn (beginning-of-line) (cons (current-buffer) (point))) - (cons (current-buffer) nil))))))))) + ;; If the regexp search didn't find the location of + ;; the symbol (for example, because it is generated by + ;; a macro), try a slightly more expensive search that + ;; expands macros until it finds the symbol. + (cons (current-buffer) + (find-function--search-by-expanding-macros + (current-buffer) symbol type)))))))))) + +(defun find-function--try-macroexpand (form) + "Try to macroexpand FORM in full or partially. +This is a best-effort operation in which if macroexpansion fails, +this function returns FORM as is." + (ignore-errors + (or + (macroexpand-all form) + (macroexpand-1 form) + form))) + +(defun find-function--any-subform-p (form pred) + "Walk FORM and apply PRED to its subexpressions. +Return t if any PRED returns t." + (cond + ((not (consp form)) nil) + ((funcall pred form) t) + (t + (cl-destructuring-bind (left-child . right-child) form + (or + (find-function--any-subform-p left-child pred) + (find-function--any-subform-p right-child pred)))))) + +(defun find-function--search-by-expanding-macros (buf symbol type) + "Expand macros in BUF to search for the definition of SYMBOL of TYPE." + (catch 'found + (with-current-buffer buf + (save-excursion + (goto-char (point-min)) + (condition-case nil + (while t + (let ((form (read (current-buffer))) + (expected-symbol-p + (lambda (form) + (cond + ((null type) + ;; Check if a given form is a `defalias' to + ;; SYM, the function name we are searching + ;; for. All functions in Emacs Lisp + ;; ultimately expand to a `defalias' form + ;; after several steps of macroexpansion. + (and (eq (car-safe form) 'defalias) + (equal (car-safe (cdr form)) + `(quote ,symbol)))) + ((eq type 'defvar) + ;; Variables generated by macros ultimately + ;; expand to `defvar'. + (and (eq (car-safe form) 'defvar) + (eq (car-safe (cdr form)) symbol))) + (t nil))))) + (when (find-function--any-subform-p + (find-function--try-macroexpand form) + expected-symbol-p) + ;; We want to return the location at the beginning + ;; of the macro, so move back one sexp. + (throw 'found (progn (backward-sexp) (point)))))) + (end-of-file nil)))))) (defun find-function-library (function &optional lisp-only verbose) "Return the pair (ORIG-FUNCTION . LIBRARY) for FUNCTION. diff --git a/test/lisp/emacs-lisp/find-func-tests.el b/test/lisp/emacs-lisp/find-func-tests.el index d77eb6757f..03df4bb9ff 100644 --- a/test/lisp/emacs-lisp/find-func-tests.el +++ b/test/lisp/emacs-lisp/find-func-tests.el @@ -43,5 +43,15 @@ find-func-tests--library-completion (concat data-directory (kbd "n x / TAB RET")) (read-library-name))))) +;; Avoid a byte-compilation warning that may confuse people reading +;; the result of the following test. +(declare-function compilation--message->loc nil "compile") + +(ert-deftest find-func-tests--locate-macro-generated-symbols () ;bug#45443 + (should (cdr (find-function-search-for-symbol + #'compilation--message->loc nil "compile"))) + (should (cdr (find-function-search-for-symbol + 'c-mode-hook 'defvar "cc-mode")))) + (provide 'find-func-tests) ;;; find-func-tests.el ends here -- 2.28.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 27 00:38:26 2020 Received: (at 45443) by debbugs.gnu.org; 27 Dec 2020 05:38:26 +0000 Received: from localhost ([127.0.0.1]:60182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktOl8-0003TQ-Dt for submit@debbugs.gnu.org; Sun, 27 Dec 2020 00:38:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktOl6-0003TE-LM for 45443@debbugs.gnu.org; Sun, 27 Dec 2020 00:38:25 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45388) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktOl1-0003I8-Fn for 45443@debbugs.gnu.org; Sun, 27 Dec 2020 00:38:19 -0500 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ktOkz-0006j7-R2; Sun, 27 Dec 2020 00:38:18 -0500 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Eli Zaretskii In-Reply-To: <83a6u0n8y7.fsf@gnu.org> (message from Eli Zaretskii on Sat, 26 Dec 2020 12:44:00 +0200) Subject: Re: bug#45443: 28.0.50; Can't find definition of compilation--message->loc References: <83a6u0n8y7.fsf@gnu.org> Message-Id: Date: Sun, 27 Dec 2020 00:38:17 -0500 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45443 Cc: 45443@debbugs.gnu.org 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: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > It's a general problem with uses of cl-defstruct and similar > constructs: they generate functions and macros that the Help functions > are unable to find. In this case, see this part of compile.el: > (cl-defstruct (compilation--message What causes the problem? There has to be a way to fix it. Does the fact that the defining form name does not start with `def' have anything to do with it? We could call it `def-cl-struct'. There is also this: (:conc-name compilation--message->)) Years have taught me that enabling a definition to be a little shorter by making names by concatenation is a bad idea. It makes the code harder to understand because there are references to these names that you can't find with simple searching. Is there a way to rewrite that definition so it does not concatenate names? If there is none, can we create one? -- Dr Richard Stallman Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 27 03:07:22 2020 Received: (at 45443) by debbugs.gnu.org; 27 Dec 2020 08:07:22 +0000 Received: from localhost ([127.0.0.1]:60280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktR5F-00011e-Qr for submit@debbugs.gnu.org; Sun, 27 Dec 2020 03:07:22 -0500 Received: from quimby.gnus.org ([95.216.78.240]:58410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktR5E-00011J-92 for 45443@debbugs.gnu.org; Sun, 27 Dec 2020 03:07:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vAfz0iaKfuDB47yn4BQ4Q6H2JEQXIuPqJ+EIZy2AlgE=; b=n7ot/caJGpp08RYHHdNO/Vsytn H5Cw1gYDQ0ciOEW+g8ac3w1yXsqSEXtCFv7K2GK9TKRbijJHKjHOKGrA5zO/nl75aIk+BnNzpEvjq 0Mqtq1lmqFiFWwcjgwFt3jmDtu78VtVukRKOXAv53yTamsCtv8b6up/s6mxiN3HzFrmo=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ktR52-0005Zc-2o; Sun, 27 Dec 2020 09:07:13 +0100 From: Lars Ingebrigtsen To: mardani29@yahoo.es Subject: Re: bug#45443: 28.0.50; Can't find definition of compilation--message->loc References: > <83a6u0n8y7.fsf@gnu.org>> X-Now-Playing: Genesis's _And Then There Were Three_: "Scenes From A Night's Dream" Date: Sun, 27 Dec 2020 09:07:06 +0100 In-Reply-To: (unknown@unknown.invalid's message of "Sun, 27 Dec 2020 01:51:29 +0100") Message-ID: <87mtxz8yfp.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Unknown writes: > I attach a first implementation of this approach, with some tests for > the function definition that Richard wanted to find. I'm sure there are > still missing cases that are interesting (closures?) [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45443 Cc: rms@gnu.org, Drew Adams , 45443@debbugs.gnu.org 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 (-) Unknown writes: > I attach a first implementation of this approach, with some tests for > the function definition that Richard wanted to find. I'm sure there are > still missing cases that are interesting (closures?). Give it a try and > see if there are still relevant symbols whose definition Emacs is unable > to locate. I'm also open to feedback about the macro expansion logic. > Could it be more efficient? Thanks. This is something I've wanted for a long time, so I went ahead and pushed it to Emacs 28. :-) I tried it on a couple cl-defstructs, and it seems to work well for me. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 27 03:07:41 2020 Received: (at control) by debbugs.gnu.org; 27 Dec 2020 08:07:41 +0000 Received: from localhost ([127.0.0.1]:60283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktR5Z-00012A-3I for submit@debbugs.gnu.org; Sun, 27 Dec 2020 03:07:41 -0500 Received: from quimby.gnus.org ([95.216.78.240]:58428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktR5X-00011x-Ae for control@debbugs.gnu.org; Sun, 27 Dec 2020 03:07:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vJC7tIufFhqldLwEtwz0wmjXhIBsxMlKSDLO8mg2PEM=; b=GOJveh9m6pU86g5XJ5RjqRQDw8 RBxL+t8U7RUphpoTXF4FBiCSvjgaXp8she+UJPf+18Ir42vmnY4dpZrQhe5dlJ5rPj4LURs8K8b6i UCSW6g5sNlNJxKu9ps/8WCS2vMsQn2eHtq546ewCr25Ww89J32zRwm60D7Kl9uPPhdMk=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ktR5P-0005Zn-Qb for control@debbugs.gnu.org; Sun, 27 Dec 2020 09:07:33 +0100 Date: Sun, 27 Dec 2020 09:07:30 +0100 Message-Id: <87lfdj8yf1.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #45443 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 45443 fixed close 45443 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 45443 fixed close 45443 28.1 quit From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 27 12:41:20 2020 Received: (at 45443) by debbugs.gnu.org; 27 Dec 2020 17:41:21 +0000 Received: from localhost ([127.0.0.1]:33427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kta2i-0007DL-MP for submit@debbugs.gnu.org; Sun, 27 Dec 2020 12:41:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kta2g-0007D8-IF for 45443@debbugs.gnu.org; Sun, 27 Dec 2020 12:41:19 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52339) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kta2a-00005D-JQ; Sun, 27 Dec 2020 12:41:12 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3565 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kta2T-0004fj-8u; Sun, 27 Dec 2020 12:41:05 -0500 Date: Sun, 27 Dec 2020 19:40:54 +0200 Message-Id: <83lfdjkuzd.fsf@gnu.org> From: Eli Zaretskii To: Daniel =?iso-8859-1?Q?Mart=EDn?= In-Reply-To: (message from Daniel =?iso-8859-1?Q?Mart=EDn?= on Sun, 27 Dec 2020 01:51:29 +0100) Subject: Re: bug#45443: 28.0.50; Can't find definition of compilation--message->loc References: > <83a6u0n8y7.fsf@gnu.org>> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45443 Cc: rms@gnu.org, drew.adams@oracle.com, 45443@debbugs.gnu.org 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 (---) > From: Daniel Martín > Cc: Eli Zaretskii , rms@gnu.org, 45443@debbugs.gnu.org > Date: Sun, 27 Dec 2020 01:51:29 +0100 > > One possible approach is, if the regular expression code fails to find a > location, we can fall back to expand macros until we find the definition > (a defalias in the case of a function, or a defvar in the case of a > variable), or we reach the end of the file. Why do we need to expand macros? isn't it enough to find the defstruct itself, by looking for a partial match? From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 27 12:59:20 2020 Received: (at 45443) by debbugs.gnu.org; 27 Dec 2020 17:59:20 +0000 Received: from localhost ([127.0.0.1]:33485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktaK7-0007gZ-W3 for submit@debbugs.gnu.org; Sun, 27 Dec 2020 12:59:20 -0500 Received: from mab.sdf.org ([205.166.94.33]:53908 helo=ma.sdf.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktaK4-0007gQ-JK for 45443@debbugs.gnu.org; Sun, 27 Dec 2020 12:59:18 -0500 Received: from akrl by ma.sdf.org with local (Exim 4.92) (envelope-from ) id 1ktaJy-0003YO-2J; Sun, 27 Dec 2020 17:59:10 +0000 From: Andrea Corallo To: Eli Zaretskii Subject: Re: bug#45443: 28.0.50; Can't find definition of compilation--message->loc References: > <83a6u0n8y7.fsf@gnu.org>> <83lfdjkuzd.fsf@gnu.org> Date: Sun, 27 Dec 2020 17:59:09 +0000 In-Reply-To: <83lfdjkuzd.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 27 Dec 2020 19:40:54 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45443 Cc: 45443@debbugs.gnu.org, rms@gnu.org, Daniel =?utf-8?Q?Mart=C3=ADn?= 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 (-) Eli Zaretskii writes: >> From: Daniel Mart=C3=ADn >> Cc: Eli Zaretskii , rms@gnu.org, 45443@debbugs.gnu.org >> Date: Sun, 27 Dec 2020 01:51:29 +0100 >>=20 >> One possible approach is, if the regular expression code fails to find a >> location, we can fall back to expand macros until we find the definition >> (a defalias in the case of a function, or a defvar in the case of a >> variable), or we reach the end of the file. > > Why do we need to expand macros? isn't it enough to find the defstruct > itself, by looking for a partial match? I haven't look at the patch, but I think the approach of macro expanding is more general as should be able to track any function definition that is synthesized by any macro. Andrea From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 27 13:06:27 2020 Received: (at 45443) by debbugs.gnu.org; 27 Dec 2020 18:06:27 +0000 Received: from localhost ([127.0.0.1]:33496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktaR1-0007sq-Dw for submit@debbugs.gnu.org; Sun, 27 Dec 2020 13:06:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktaQz-0007sc-U5 for 45443@debbugs.gnu.org; Sun, 27 Dec 2020 13:06:26 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52588) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktaQu-00036X-FE; Sun, 27 Dec 2020 13:06:20 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1093 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ktaQC-0002Ow-I5; Sun, 27 Dec 2020 13:06:00 -0500 Date: Sun, 27 Dec 2020 20:05:24 +0200 Message-Id: <83eejbktuj.fsf@gnu.org> From: Eli Zaretskii To: Andrea Corallo In-Reply-To: (message from Andrea Corallo on Sun, 27 Dec 2020 17:59:09 +0000) Subject: Re: bug#45443: 28.0.50; Can't find definition of compilation--message->loc References: > <83a6u0n8y7.fsf@gnu.org>> <83lfdjkuzd.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45443 Cc: 45443@debbugs.gnu.org, rms@gnu.org, mardani29@yahoo.es 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 (---) > From: Andrea Corallo > Cc: Daniel Martín , rms@gnu.org, > 45443@debbugs.gnu.org > Date: Sun, 27 Dec 2020 17:59:09 +0000 > > > Why do we need to expand macros? isn't it enough to find the defstruct > > itself, by looking for a partial match? > > I haven't look at the patch, but I think the approach of macro expanding > is more general as should be able to track any function definition that > is synthesized by any macro. It is also more expensive and complicated. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 27 14:29:12 2020 Received: (at submit) by debbugs.gnu.org; 27 Dec 2020 19:29:12 +0000 Received: from localhost ([127.0.0.1]:33546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktbj5-0001Ry-Oq for submit@debbugs.gnu.org; Sun, 27 Dec 2020 14:29:12 -0500 Received: from lists.gnu.org ([209.51.188.17]:38992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktbj3-0001Rn-0j for submit@debbugs.gnu.org; Sun, 27 Dec 2020 14:29:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktbj2-0007Ke-Pc for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2020 14:29:08 -0500 Received: from sonic312-26.consmr.mail.ir2.yahoo.com ([77.238.178.97]:42425) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ktbiw-0008F6-0D for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2020 14:29:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1609097340; bh=S4OcmgCUhkI5a9PGcmY5qqlYUUJ6u+3s1QMBI1v7pEk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject; b=kK500GSHOJdMJ23h/YjgIjjEoh1pPFzhMPuF11KfQCvodR1Vw81tgyG2kzKaG6VzzNy4Uuv1Cpas52HLGNtBm+NRZxZsJ1rBAU9jPARSFi4QD7p8c36Fhb62IQvueu0aaZhnkznrSXW47d2AAV7UYY2/6/Qm/Wqxre7IE926dFdeiJkTWVGZrjzyS1hY1ocqwEaNmfQB8gNljYhkWAQ2rlwrUY4ZGvB8ItBQo1n38lHqOxI3Y1Pqx7bZwTqxm58/cQq59rbi3B2dxAHGC94z58XhVXDb/UmQN3k48M4+gLVkxT+9BCpa3uh2GDL8r4gcl7S9LqvrpqL64u+7gtiVLA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1609097340; bh=YnrbBeExyo3Z1/dQv+tN8T8aex6W9C03kaiSmM0ev3c=; h=From:To:Subject:Date:From:Subject;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Y .ld_yWUZuh0IGSkhtqXBwykhQ_37cDK6e2skGqbpzL6lYAKAN5WYxNVn7h5x6U4HY.df83WaAb7T LBAHhNJtjFtilx4CwM4EJ1ZzDIsW8fI_3vsgFqv55AgxWfcXgVYt0TizSginto1ArnG8X_SXUiik oFKh4vWX0sUTtxDLZAzDBPDOSCEDxHCme5wlVtvEL78X149prAXv.I5bldJ0IUx39GDmBvk9I2Xk ejJsk2_sRDNEv.KDHSM3ooVENO3PISHQyfhwpbtYiQhkLslZISqDgTqPcNGh8PD0DnHvWG8FHQjy Su2GRgiWAOj6HU53_QWQQyQ2YU6KpkwHrMqJZ7UnG.czZIUInhv4VlpwxRzmrNsNaXdIcMom4uKF 3yJ.aYbNQ.AACVbBnLbYK1GEZWYgp6LXnrqQiVlO._5DNM4DeQTmD1peBvhNTjMh4fXtgN4OtNMX tGTx4kipYA9UUBRs18oSjCFSTJWVWk30DUSPYpPU4JjmupI7b7CvQNArtSLKE.Hmec1sWe12IPma ZL0L5RJhn5lmw2k1ca1j_qGp4q07aoJ7puvvfURcYDEA0ODU49bZab.6o_gAgJIuyMbNDL88mLzo N1JB0K.RRUszoJ06frdcz60khxS_PIjgSn6H4zA0Ht2oMxhVNZ.bNVIaiVOh4PJcUNljKaxnW3Cn SXT9kpnhQk77fJgK3cM98BX5VWhBwzo26jXiXReC7aeGBrKHOnR5em2F7TxTH8RFOM1wCl6FtwWl Fk9D7GhycEjQAl9bhbL0Xa7Ip6hhnZnGA1gUBmCeyR1D1NeT9XfZRvCXZ8Xj0QPpCKjxxJ77ib2D 7Zn_2UyVFfp5UeAS0nA5D.PoQKl3GMqz7e7OGbV.t11FvlyDJW9y7gVBi8lU9Vfk- Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ir2.yahoo.com with HTTP; Sun, 27 Dec 2020 19:29:00 +0000 Received: by smtp406.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 57a4ed810b19b9f449fa553014060dc8; Sun, 27 Dec 2020 19:28:58 +0000 (UTC) From: =?utf-8?Q?Daniel_Mart=C3=ADn?= To: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Subject: Re: bug#45443: 28.0.50; Can't find definition of compilation--message->loc References: > <83a6u0n8y7.fsf@gnu.org>> <83lfdjkuzd.fsf@gnu.org> Date: Sun, 27 Dec 2020 20:28:57 +0100 In-Reply-To: (Andrea Corallo via's message of "Sun, 27 Dec 2020 17:59:09 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.17278 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Apache-HttpAsyncClient/4.1.4 (Java/11.0.8) Content-Length: 1187 Received-SPF: pass client-ip=77.238.178.97; envelope-from=mardani29@yahoo.es; helo=sonic312-26.consmr.mail.ir2.yahoo.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Eli Zaretskii , 45443@debbugs.gnu.org, rms@gnu.org, Andrea Corallo 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: -2.4 (--) Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: >> >> Why do we need to expand macros? isn't it enough to find the defstruct >> itself, by looking for a partial match? > > I haven't look at the patch, but I think the approach of macro expanding > is more general as should be able to track any function definition that > is synthesized by any macro. > Yes, my patch tried a more general approach, which would not only find function definitions, but also defvars like the hooks that are synthesized by define-major-mode, for example. There's some opportunities to do less work, though. For example, I think it does not make sense to expand defuns because those were handled in a previous step. I think that'd reduce the search space significantly. Another possible approach for this problem is to search textually for just the things that we're typically interested in (like, cl-defstruct or define-derived-mode), and expand only those to see if they synthesize the symbol we are looking for. It will be a less general solution, but it will be faster. We may add more cases in the future, if needed. Thoughts? From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 27 14:40:57 2020 Received: (at submit) by debbugs.gnu.org; 27 Dec 2020 19:40:57 +0000 Received: from localhost ([127.0.0.1]:33555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktbuT-0001k3-5I for submit@debbugs.gnu.org; Sun, 27 Dec 2020 14:40:57 -0500 Received: from lists.gnu.org ([209.51.188.17]:41612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktbuR-0001jv-0a for submit@debbugs.gnu.org; Sun, 27 Dec 2020 14:40:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktbuQ-00011t-Q0 for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2020 14:40:54 -0500 Received: from mab.sdf.org ([205.166.94.33]:53312 helo=ma.sdf.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktbuM-0003h6-Bz; Sun, 27 Dec 2020 14:40:54 -0500 Received: from akrl by ma.sdf.org with local (Exim 4.92) (envelope-from ) id 1ktbuJ-0001V0-5d; Sun, 27 Dec 2020 19:40:47 +0000 From: Andrea Corallo To: Daniel =?utf-8?Q?Mart=C3=ADn?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Subject: Re: bug#45443: 28.0.50; Can't find definition of compilation--message->loc References: > <83a6u0n8y7.fsf@gnu.org>> <83lfdjkuzd.fsf@gnu.org> Date: Sun, 27 Dec 2020 19:40:47 +0000 In-Reply-To: ("Daniel =?utf-8?Q?Mart=C3=ADn?= via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\""'s message of "Sun, 27 Dec 2020 20:28:57 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=205.166.94.33; envelope-from=akrl@sdf.org; helo=ma.sdf.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Daniel =?utf-8?Q?Mart=C3=ADn?= , rms@gnu.org, 45443@debbugs.gnu.org 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: -2.4 (--) Daniel Mart=C3=ADn via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of > text editors" writes: > >>> >>> Why do we need to expand macros? isn't it enough to find the defstruct >>> itself, by looking for a partial match? >> >> I haven't look at the patch, but I think the approach of macro expanding >> is more general as should be able to track any function definition that >> is synthesized by any macro. >> > > Yes, my patch tried a more general approach, which would not only find > function definitions, but also defvars like the hooks that are > synthesized by define-major-mode, for example. > > There's some opportunities to do less work, though. For example, I > think it does not make sense to expand defuns because those were handled > in a previous step. I think that'd reduce the search space > significantly. > > Another possible approach for this problem is to search textually for > just the things that we're typically interested in (like, cl-defstruct > or define-derived-mode), and expand only those to see if they synthesize > the symbol we are looking for. It will be a less general solution, but > it will be faster. We may add more cases in the future, if needed. > > Thoughts? I personally like the generic approach. Also considered should be running only when the regexp based one is failing and therefore with no performance hit in most cases but only fixing the broken ones. Andrea From unknown Sat Jun 14 02:06:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 25 Jan 2021 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator