-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
A possible way for OneMore to "fix" OneNote's broken paragraph linking. #1747
Comments
Thanks for all of this. It's a good thought exercise, indeed. First point, instead of a "safe hyperlink", we can take advantage of internal Meta tags that can be placed on a page or on individual paragraphs. OneMore already uses these. In fact, if you look at the XML of any page with a #hashtag, you'll notice that there is a special page-level tag similar to this: <one:Meta name="omPageID" content="7aebb38f292f48ba84aae8cf5cb96611" /> So OneMore already has a way of tracking pages even if the pageID attribute changes. (FYI, the intent is to use this strategy for Favorites, Reminders, the Navigator, etc.) We can add a Meta tag to individual paragraphs too. However, I'm not sure we would need to... I like your last option the best - a Safe Move operation. It would require that the user only moves pages through this (not yet developed, just a theory) Safe Move command rather than any of OneNote's move capabilities, including drag/drop or the Move dialog. This way, OneMore can control the move entirely, patching page-to-page hyperlinks along the way. It's writer-makes-right rather than reader-makes-right. It would also depend on a scan of pages that link to this page and patch those in real time, which may take some time to sweep through sections and notebooks; that's the only drawback, but it's fully automated and can't be corrupted by a wayward keystroke that might break a visible hyperlink. |
Ah ha... It had crossed my mind to suggest modifying the actual XML of the OneNote files, but I didn't know if we could trust OneNote to not purge those "out of schema" XML elements or attributes, at some point in the future. I guess I figured, you would tell me if you had better ways of hiding data. And so you did. I don't know if even I would be up for a complete scan of all my notebooks every time I moved a page. I tend to do temporary work in one location (within OneNote), then move it to another location when/if it becomes a bigger project. And I definitely create lots of hyperlinks to specific paragraphs. So, that would be lots of long scans, quite often. Not every day, mind you. But enough to become tiresome if it takes longer than a minute. Now, a massive database of all the hyperlinks between anything in OneNote would make that faster, but... OneMore would likely need to do some combination of:
AND...
To be clear, I am not opposed to said database, unless the background maintenance slowed down OneNote. It is already laggy for some people some of the time. So, allowing the user to turn off background maintenance and opt for "on demand only" maintenance would be nice. Now, one other huge benefit of said massive hyperlink database is that it would enable a "What links here?" feature. Said massive hyperlink database would also enable utilities that could graphically show the network of hyperlinks within one's OneNote notebooks. Even if you aren't into that kind of thing, others could make use of OneMore's hyperlink database for graph data analysis. An alternative to all of that scanning and/or database collecting would be to implement basically what I described in my original post, except with those totally hidden XML elements. Because the XML elements are hidden, it is more practical to simply insert them for every darned paragraph on a page. This could be triggered on demand (for a specified context), or during a "Safe Move" operation. This would allow relatively quick fixes, as broken hyperlinks are found later. But, without all the scanning and/or databases. All the scanning I suggested in my original post would be optional, rather than mandatory to make the system work. My system basically relies on the fact that OneNote will still know what page a hyperlink pointed to, even if it can't find the specific paragraph. So, the amount of scanning/looking necessary to find the correct paragraph is very minimal compared to scanning all of a user's notebooks on the regular. One interesting thing to remember about human psychology is that we tend to ignore features that we never need to worry about any more. (I learned this as a network manager.) If OneMore could completely make the broken hyperlink problem go away (which you could do, with enough coding, background scanning, and getting users to always use OneMore commands to create hyperlinks) then users would forget that OneMore was what was solving their problem. Plus, any time they got a broken link, they would complain that OneMore had dropped the ball, rather than realize that they forgot to use OneMore commands to move pages or to create some hyperlink that they created months ago. ... However, if the user always has to fix the broken links that they find, they will always know that OneMore is the add-in that is allowing them to fix it. So, you actually look better in the end. |
OneMore fix for OneNote broken paragraph linking:
I think I have figured out how OneMore can "fix" the "Broken Paragraph Links" problem in OneNote, which is discussed thoroughly here. And it uses only "technology" that is already contained within OneMore. Do I think it will be easy to code? Oh heck no! That is why I am suggesting it to you. However, I think it will be incredibly useful to lots of people who use OneNote.
Now, to make this work, the user must do a bit of setup, but that can be automated, as I will describe much later in this post.
At a fundamental level, the fix consists of the following:
Setting up the hyperlink:
`OneMore:{current Object ID of paragraph}``
`OneMore:{current Object ID of paragraph},{previous Object ID of paragraph}``
Fixing the hyperlink:
I feel I need to reiterate, that this cannot work automatically if there were no "Safe Bookmark" hashtags in place before the page got moved. So, many users may still be either out of luck, or need to do a lot more manual labor. But, it can still mitigate future disasters.
In actual usage, it would look like this to the user:
There are ways that a lot of this could be automated:
The text was updated successfully, but these errors were encountered: