unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Gonzalo Larumbe <gonzalomlarumbe@gmail.com>
To: 57327@debbugs.gnu.org
Subject: bug#57327: Bug in vhdl-mode design hierarchy extraction
Date: Sun, 21 Aug 2022 09:30:00 +0200	[thread overview]
Message-ID: <CADYqLo9cpSieqxGGyS+BfLzicS+n4cF8P9qf-TYcn+xtoNPQLg@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1379 bytes --]

Hi,

First of all, thanks a lot for actively developing and maintaining Emacs.
It is something that makes me very happy in my daily work.

Some time ago I found a bug in vhdl-mode.el after trying to extract the
hierarchy in speedbar of the current design. The design I'm trying to parse
is the one based on the following repo:
- https://github.com/gmlarumbe/axi_if_converter

After opening the following file (*src/top/rtl/axi_if_converter.vhd*),
starting speedbar and pressing 'h' to get the hierarchy I get the following
error:
- WARNING:  ERROR:  Invalid hierarchy information, unable to display
correctly

When I first debugged this issue some time ago it seemed it had to do with
lexical-binding and the function `vhdl-speedbar-insert-hierarchy`. I made
some changes that made it work and could help debugging in a branch of my
emacs-mirror fork:
https://github.com/emacs-mirror/emacs/compare/master...gmlarumbe:emacs:vhdl-projects

Yesterday I also checked that vhdl-mode has received some updates since
then, some of them in this particular `vhdl-speedbar-insert-hierarchy`
function that actually had to do with lexical-binding (commit a769cbfcfb by
Eli Zaretskii). I made some new simple changes that I attach in a diff file
and seem to fix the issue. However, maybe the author/maintainer knows a
better way of fixing this.

Thanks a lot for your effort,

Best,

Gonzalo

[-- Attachment #1.2: Type: text/html, Size: 1846 bytes --]

[-- Attachment #2: vhdl-mode.diff --]
[-- Type: text/x-patch, Size: 776 bytes --]

diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 39c5eb453b..18219db740 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -14958,8 +14958,8 @@ otherwise use cached data."
 
 (defun vhdl-speedbar-insert-hierarchy ( ent-alist-arg conf-alist-arg
                                         package-alist ent-inst-list depth)
-  "Insert hierarchy of ENT-ALIST, CONF-ALIST, and PACKAGE-ALIST."
-  (if (not (or ent-alist conf-alist package-alist))
+  "Insert hierarchy of ENT-ALIST-ARG, CONF-ALIST-ARG, and PACKAGE-ALIST."
+  (if (not (or ent-alist-arg conf-alist-arg package-alist))
       (vhdl-speedbar-make-title-line "No VHDL design units!" depth)
     (let ((ent-alist ent-alist-arg)
           (conf-alist conf-alist-arg)

             reply	other threads:[~2022-08-21  7:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-21  7:30 Gonzalo Larumbe [this message]
2022-08-21 23:29 ` bug#57327: Bug in vhdl-mode design hierarchy extraction Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADYqLo9cpSieqxGGyS+BfLzicS+n4cF8P9qf-TYcn+xtoNPQLg@mail.gmail.com \
    --to=gonzalomlarumbe@gmail.com \
    --cc=57327@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).