-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Use local folder(s) #35
Comments
A reference implementation for folder access can be found in GitJournal. |
In v1.18.1 Orgro uses directory permissions to resolve relative file links between Org Mode documents. If there is more or different functionality desired, please provide more detail. But note that I don't intend to implement a directory view. |
Thank you. |
Could you be more specific? |
Sure. The Grant Access buttons (on top and when tapping the actual link) don't seem to do anything. |
Doesn't seem to do "anything"? Does it bring up a directory chooser? What directory did you choose? Where are the root file and the target file relative to the directory you chose?
Images are displayed inline if they can be accessed. Otherwise it's up to the system to know how to handle such a link, but generally the system will not know how to handle a relative link like that. So this is to be expected if you haven't successfully granted access. |
I should note that any amount of work on org_flutter itself can't resolve any of the issues you're having, because pure Dart is insufficient for doing so: links and (local) images must be resolved with cooperation from the platform. org_flutter punts on handling these things because they end up intricately tied up with your app's UI, and there is no one-size-fits-all solution. So to get links and images working you will need to reimplement a lot of the plumbing I have in Orgro inside your own app. |
I get that. Fortunately, these things (links, backlinks, images, etc.) are already taken care of for Markdown so I can borrow them for Org files. |
Nice. I just tested it out in Git Journal and I see that your use case is much simpler: you have direct access to all of the files since you own them by virtue of cloning them into your app's private space. All of the complexity in Orgro is due to trying to work with files that it doesn't own; in particular the Storage Access Framework on Android is extremely limiting. |
That is true (I actually hate going back to native development but hey). However, there is also an option to use external storage. That way I can set the storage to be on my "Internal Storage/notes", which is synchronized using rclone. So, completely outside the private app space. It does require a permission (actually, I've fixed that recently for Android) but works well. If you're interested, check that scenario out. You are more fluent with Dart and Flutter, anyway. |
Are you talking about GitJournal/GitJournal#448? If so, that solution will not work long-term because you will be forced to target API 30 in September 2021 at which point If that's not what you're talking about then I'm curious how you did it. (Also I should point out that this use case is still quite simple since you're guaranteed that all files are located and linked within a directory tree that you have access to. Orgro can't have that guarantee unless it requires you to grant access to the root of the storage tree, which I didn't want to do.) |
Possibly. Do note that it is May 2021 and the solution above works. When it stops, it will be adjusted to whatever the possible solution is at the time.
I would beg to disagree. The use case is identical. My files have been accumulated over the years and are not tied to GitJournal or Orgro. Whichever software adapts to the notes and the way they are linked (because the notes are where the real value lies for me) will be the one I end up using and contributing to. At least that's my view of the situation. |
``` ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════ The following assertion was thrown during a scheduler callback: Layer OffsetEngineLayer was previously used as oldLayer. Once a layer is used as oldLayer, it may not be used again. Instead, after calling one of the SceneBuilder.push* methods and passing an oldLayer to it, use the layer returned by the method as oldLayer in subsequent frames. 'dart:ui/compositing.dart': Failed assertion: line 110 pos 9: '<optimized out>' Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause. In either case, please report this assertion by filing a bug on GitHub: https://github.com/flutter/flutter/issues/new?template=2_bug.md When the exception was thrown, this was the stack: #2 _EngineLayerWrapper._debugCheckNotUsedAsOldLayer (dart:ui/compositing.dart:110:9) #3 SceneBuilder.addRetained.<anonymous closure>.recursivelyCheckChildrenUsedOnce (dart:ui/compositing.dart:695:21) #4 List.forEach (dart:core-patch/growable_array.dart:416:8) #5 SceneBuilder.addRetained.<anonymous closure>.recursivelyCheckChildrenUsedOnce (dart:ui/compositing.dart:701:18) #6 SceneBuilder.addRetained.<anonymous closure> (dart:ui/compositing.dart:704:7) #7 SceneBuilder.addRetained (dart:ui/compositing.dart:707:6) #8 Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:671:15) #9 ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13) #10 OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1421:5) #11 Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5) #12 ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13) #13 ClipRectLayer.addToScene (package:flutter/src/rendering/layer.dart:1590:5) #14 Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5) #15 ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13) #16 OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1421:5) #17 Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5) #18 ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13) #19 OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1421:5) #20 Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5) #21 ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13) #22 OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1421:5) #23 Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5) #24 ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13) #25 TransformLayer.addToScene (package:flutter/src/rendering/layer.dart:1914:5) #26 ContainerLayer.buildScene (package:flutter/src/rendering/layer.dart:1097:5) #27 RenderView.compositeFrame (package:flutter/src/rendering/view.dart:231:37) #28 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:514:18) #29 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:869:13) #30 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:375:5) #31 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1271:15) #32 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1200:9) #33 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1058:5) #34 _invoke (dart:ui/hooks.dart:145:13) #35 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:338:5) #36 _drawFrame (dart:ui/hooks.dart:112:31) (elided 2 frames from class _AssertionError) ════════════════════════════════════════════════════════════════════════════════════════════════════ ```
Let me extract this proposal from #5, to allow some focus.
Preface: As I mentioned in a comment there, Flutter has an option (at least on Android) to request permissions for a folder on external storage. This provides access to the whole tree below the selected location.
Proposal: Allow opening a folder location on the device and reading all the files in there.
This relates closely to #34, as it would use direct access to the files, without the content provider, so the files could simply be re-read after they have been edited in an external editor.
It will actually allow any sort of interaction with other applications in the OrgMode ecosystem, as well as having attachments, relative links, images, etc.
The text was updated successfully, but these errors were encountered: