Comments (5)
Reproduced. Maybe I could do something about this, but you should first ask svelte-mode
s developers why the imenu structure
they they produce in your example is (("" . 20))
, i.e. why are there menu elements with empty strings.
I.e. if I do something about this, it will not change the outcome dramatically: the error will disappear but there will be nonsensical imenu information
from breadcrumb.
Hi, I'm from svelte-mode and not quite sure about the imenu structure. svelte-mode is based on mhtml-mode.
Both have the same issue.
It seems that the menu is using <h1>
tag text content. The error occurs when it's empty. Otherwise, it will show its content.
<section>
<h1>
hello
<span class="welcome">
</span>
</h1>
<Counter />
</section>
For this case, I think we can ignore the error as HTML tags may have empty text content and result in an empty menu.
from breadcrumb.
For this case, I think we can ignore the error as HTML tags may have empty text content and result in an empty menu.
Sure, I guess. Breadcrumb operates on the same information that M-x imenu
does. Major mode authors setting up imenu-create-index-function
or authors deriving from such modes such always test that M-x imenu
does reasonable things.
If it doesn't, neither will breadcrumb. Imenu is a flimsy and hacked-together piece of utility, unfortunately, but it's the most widespread one.
If the problem lies deeper in mhtml-mode
,then it should probably be fixed there.
from breadcrumb.
I agree the major mode (actually it's sgml-mode
) should provide correct and useful imenu
info. But I'm not sure where to find the sgml-mode
maintainer.
By the way, it seems to stop working if there is an incorrect imenu
. The breadcrumb bar becomes empty with: Error during redisplay: (eval (breadcrumb--header-line) t) signaled (args-out-of-range 0 1)
Is it possible that, on the other side, breadcrumb can handle the error gracefully, like just ignoring the error?
from breadcrumb.
But I'm not sure where to find the sgml-mode maintainer.
Isn't it a part of Emacs? Report it to [email protected].
Is it possible that, on the other side, breadcrumb can handle the error gracefully, like just ignoring the error?
Yes, as I said something like that can be done. But making breadcrumb.el ignoring this particular error is somewhat tricky, so if someone has patch and can test through some edge cases (like an imenu that does have some invalid entries and some valid ones), it would be ideal.
from breadcrumb.
Related Issues (20)
- Great package : will you submit it melpa/straight? HOT 2
- Unable to enable breadcrumb-local-mode HOT 2
- propertize: Symbol’s function definition is void: project-name HOT 3
- File name black backgroud HOT 1
- Error during redisplay HOT 11
- Add cache project-crumbs HOT 22
- Incorrectly shortening project directory name HOT 1
- Issues with folded org headings support HOT 4
- Breadcrumb is now in GNU Elpa. Rewrite README.md to mention that. HOT 1
- Contribute to Emacs by merging into which-func-mode? HOT 1
- How to disable buffer title? Possible to add icons to crumbs?
- YAML documents only show the top-level node name HOT 1
- Reducing expensive calculation of project root HOT 3
- Issue with indirect buffers HOT 2
- Any pointers to get `breadcrumb-jump` to search across all open buffers?
- Performance of breadcrumb-mode in files with many nodes HOT 1
- pdf-view HOT 5
- Suggestion: Better Breadcrumb for Org Mode HOT 2
- Don't show any function or variable name when point is outside their definitions HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from breadcrumb.