Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code blocks don't show up? #127

Closed
Trevoke opened this issue Nov 2, 2018 · 12 comments
Closed

Code blocks don't show up? #127

Trevoke opened this issue Nov 2, 2018 · 12 comments
Labels

Comments

@Trevoke
Copy link
Contributor

Trevoke commented Nov 2, 2018

After visualizing an entry and hitting o I type a simple org code block and then I save the org file and refresh the org-brain buffer, but nothing shows up:

image

Am I ... Using it incorrectly?

@Trevoke
Copy link
Contributor Author

Trevoke commented Nov 5, 2018

Okay, so .. I can get the src block to show up if I put it beneath an org-brain headline entry, but not as part of the file entry.

@Kungsgeten
Copy link
Owner

Hmm, that's strange. I think that source blocks should be visualized even in file entries. Thanks for reporting this.

@Kungsgeten
Copy link
Owner

It isn't working in file entries due to how org-brain-text is implemented. I'll see if I can fix that.

@Kungsgeten Kungsgeten added the bug label Nov 14, 2018
@fibrasek
Copy link

Not only code, but any chunk of:

#+BEGIN
Text
#+END

make the entry disappear. For example I write a lot of step-by-step documentation:

- Run this command =touch some_file.txt=

- Add this to the file:

#+BEGIN
Some text
#+END

- Save and open the file with this command =vim some_file.txt=

The first and last entry show up, but the middle one, don't. Sometime only the one after the last begin/end block show up.

@sheepduke
Copy link

I got the same problem here.

Also the following formats cannot be rendered:

  • Headlines. Source: * Headline
  • Bold text. Source: *bold text*
  • Italic text. Source: /text here/

Surprisingly inline code works: ~code here~

@delaanthonio
Copy link

Are there any updates for this issue?

@Kungsgeten
Copy link
Owner

@delaanthonio Sorry, but I haven't tried to solve it. I've been thinking about removing the support for file entries (which would solve the problem, since only file entries has this issue), but it seems like a lot of users use them so I probably won't do that.

@Trevoke
Copy link
Contributor Author

Trevoke commented Jul 18, 2019

I'm pretty sure @Kungsgeten knows this but just in case for others:

If you add the :showchildren: tag you can then see things like code blocks -- but then you can't have things like headline entries because everything will just be rendered as text. It's not quite a fix but it's at least a temporary workaround: it'll work for some entries.

@Trevoke
Copy link
Contributor Author

Trevoke commented Jul 18, 2019

If there were tests I'd feel more comfortable jumping into this project to try and help but, as-is, I'm a little worried that I'd accidentally break something.

@sheepduke
Copy link

Since this problem really affects my experience, I decided to roll my own.

See here:
https://github.com/sheepduke/silver-brain

@Kungsgeten
Copy link
Owner

I think this should be fixed now.

@Trevoke
Copy link
Contributor Author

Trevoke commented Aug 3, 2019

Nice, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants