Comments (7)
I think using visual-line-mode solves this issue, by visually wrapping the long lines.
from jmax.
Sadly, visual-line-mode fails to wrap these lines, due to the fact that there is no whitespace in between bibkeys. Making visual-line work would require the same solution as initially described, i.e., allowing whitespace between bibkeys and scanning until the closing parens of an org-mode link.
from jmax.
Hm, so it seems I can already insert whitespace between cite-keys if the cite command is wrapped in a link. This will work with visual-line-mode then. So if spaces already work, maybe you could just have the relevant regex match in multi-line mode to make hard-wrapped link lines work?
from jmax.
I’ve initially had good results with these changes:
https://gist.github.com/eigengrau/696251cb79338ce81ec7
However, for some reason this only seems to work if there are just two lines. With three, only the first two links will work; with more, only the first link works. For the non-working links, org-ref-get-bibtex-key-under-cursor
seems not to be called, and some function in org-mode reports no link found
. Could this be an org-mode bug? The syntax spec says all characters except [
and ]
are allowed inside the link.
from jmax.
Seems to be an org-mode-bug: http://comments.gmane.org/gmane.emacs.orgmode/19919 :(
from jmax.
I use (global-visual-line-mode 1) in my init file, and it wraps the lines just fine.
from jmax.
I don’t usually use visual-line-mode. I tought it wouldn’t wrap because I expected the virtual line-break to occur at column 80, same as when filling a paragraph, but actually it only breaks on the edge of the window. That way it works, but I prefer hard breaks, especially when sharing content. This will also nicely break between full words, then.
The method in my gist should work for multi-line links once the org-mode bug is resolved. I’ve submitted this issue to the mailing list.
One thing that might need to be added to what I posted is dealing with multi-line links during export. I was looking into this, but I discovered that org-mode only calls the export handlers with the link :path, which is currently broken for multi-line links. I hope they can get that fixed though.
from jmax.
Related Issues (20)
- Themes don't work as expected HOT 2
- Wrong type argument: stringp, nil after every python block execution HOT 2
- doi-utils-add-bibtex-entry-from-doi gives Wrong type argument: stringp, nil on Mac HOT 1
- Flyspell error on linux. HOT 8
- Install error HOT 8
- Language error when starting jmax on windows HOT 1
- cm-wdiff-git error HOT 4
- org-ref not automatically updating HOT 1
- Windows batch file unable to handle spaces in directory names
- Error with the most recent commit HOT 3
- Loss of syntax highlighting in org-mode upon update HOT 2
- comment-or-uncomment-region does not work in org-mode HOT 1
- prompts for updates twice HOT 3
- org-babel-async-execute creates temp files HOT 6
- Way to revertback from session behavior when executing python code? HOT 2
- overlay issue HOT 9
- melpa? HOT 2
- Problem with exporting to PDF HOT 2
- Any way to include superscript at beginning of word in org-mode (technical document) HOT 4
- org-show gives an error HOT 4
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 jmax.