Re: How to get a block’s contents by name
Well that pains me on a software-engineer-aip-design level but that works! Thanks a lot. On Fri, Nov 27, 2020 at 8:22 PM Kyle Meyer wrote: > George Mauer writes: > > > I'm trying to figure out how I could fetch the contents of another block > by > > name from an elisp script > > > > I've seen `org-sbe` but I just want to get the block contents, (ideally > > with noweb and vars filled in - just as it would be tangled if we were to > > tangle it) > > > > How do I do that? > > How about something like this? > > (save-excursion > (goto-char (org-babel-find-named-block "b")) > (org-babel-expand-src-block)) >
Re: How to get a block’s contents by name
George Mauer writes: > I'm trying to figure out how I could fetch the contents of another block by > name from an elisp script > > I've seen `org-sbe` but I just want to get the block contents, (ideally > with noweb and vars filled in - just as it would be tangled if we were to > tangle it) > > How do I do that? How about something like this? (save-excursion (goto-char (org-babel-find-named-block "b")) (org-babel-expand-src-block))
How to get a block’s contents by name
I'm trying to figure out how I could fetch the contents of another block by name from an elisp script I've seen `org-sbe` but I just want to get the block contents, (ideally with noweb and vars filled in - just as it would be tangled if we were to tangle it) How do I do that?
Re: Thoughts on the standardization of Org
* Maxim Nikulin [2020-11-27 19:51]: > 2020-11-11 Jean Louis wrote: > > > > Do you know how to disable control sequences? > > It is neither directly related to `cat -v` nor specific to org, but still a > notable demonstration that inaccurate treatment of text to be inserted into > a terminal could do some dangerous things due to hidden control characters > (e.g. escape from emacs to shell and execute something weird): > > https://security.stackexchange.com/questions/39118/how-can-i-protect-myself-from-this-kind-of-clipboard-abuse I have read the article, thank you. Valid points.
Re: Thoughts on the standardization of Org
2020-11-11 Jean Louis wrote: Do you know how to disable control sequences? It is neither directly related to `cat -v` nor specific to org, but still a notable demonstration that inaccurate treatment of text to be inserted into a terminal could do some dangerous things due to hidden control characters (e.g. escape from emacs to shell and execute something weird): https://security.stackexchange.com/questions/39118/how-can-i-protect-myself-from-this-kind-of-clipboard-abuse
A glitch in CSS for lists at https://orgmode.org/org.html
Unordered lists are styled a bit incorrectly in the single-page org manual. Compare e.g. "Installation" section: https://orgmode.org/org.html#Installation https://orgmode.org/manual/Installation.html#Installation For some reason whole text of single-page manual is a part of table of contents (div.contents), so bold font and suppressed marker rules are applied for regular ul elements. It is a minor issue. Maybe someone familiar with export settings for the manual could have a look and decide either CSS should be tweaked of main part of the manual should be pulled out of the TOC block.
Re: consistent behavior across babel languages
On Thu, Nov 26, 2020 at 9:42 AM Neil Jerram wrote: > Wonderful, thank you. I have been thinking it would be nice to have a test > suite along these lines, but detailed doc like this is more feasible and > maintainable. A test suite is a good idea as a next step to protect correct behaviors. I want to first look at actual behaviors and get agreement on correct behaviors first. On the other hand, each of the language's test suites should cover the same ground so a separate test suite may not make sense. > When time permits I will work on adding Scheme to this page. Great, thanks! > FWIW, I did not understand the "functional" and "scripting" terms that you > use on this page. > > I've understood now, from > https://orgmode.org/worg/org-contrib/babel/intro.html, that you mean > "results: value" and "results: output". For me it would be better if you > said that instead of "functional" and "scripting", as the former is what I > can actually type in my Org files. yes, it's in the manual as well [1], but I agree that alternating between two sets of terms here is unnecessarily confusing. Will change. [1] https://orgmode.org/manual/Results-of-Evaluation.html#Results-of-Evaluation
Re: Bring up a screen giving option to open a series of orgmode files
Hello Allan, Thank you for references, I am collecting it. * Alan Schmitt [2020-11-27 11:15]: > For that I recommend pdf-tools (great pdf viewer for emacs, supporting > annotations and synctex, https://github.com/politza/pdf-tools ) and > org-pdftools (provides org links for it, That is nice and I have take note for later inspection. The current doc-view functions are already pretty nice and allow to access PDF files by its page number and I also think searching words would work. Maybe I already made it and forgot it. For the built-in doc-view by using function (doc-view-current-page) one can obtain the page number and that allows for creation of a function to create quickly Org link to specific PDF number to be viewed with the built-in doc-view: (defun org-capture-doc-view-page-by-number () (interactive) (let* ((page (doc-view-current-page)) (file (buffer-file-name)) (name (read-from-minibuffer "Hyperlink name: ")) (hyperlink (format "[[elisp:(doc-view-open-file \"%s\" %s)][%s]]" file page name))) (kill-new hyperlink))) Function allows to search by page number, query and match: `(doc-view-open-file FILE &optional PAGE-NUMBER QUERY MATCH)' When making such hyperlinks for Org, I rather like using generic functions to open such files, such as: Instead of: [[elisp:(doc-view-open-file "/home/data1/protected/Downloads/Download.PDF" 1)][Transaction History]] [[elisp:(generic-pdf-open-file "/home/data1/protected/Downloads/Download.PDF" 1)][Transaction History]] Then the generic function could be replaced by user's customization. If somebody would like to open PDF file by pdf-tools, evince, or doc-view, then welcome, customize and go! More than that I like using even more generic links that do not hard code the file path as such are indexed in the database, then it would look like this: Instead of: [[elisp:(generic-pdf-open-file "/home/data1/protected/Downloads/Download.PDF" 1)][Transaction History]] [[elisp:(hyperscope 123)][Transaction History]] As that brings the possibility that I change the file path or rename the file but the unique ID 123 never changes, and again may decide how to open file, by which viewer. In addition it could decide: - to open file and show annotations - while opening file to play some music to read with music together - or I could add any other function to the very generic high level hyperlink I would prefer if authors of pdf-tools would contribute their generic functions if useful to doc-view. It is nice to have such external tools, even nicer is when core Emacs get enhanced. > https://github.com/fuxialexander/org-pdftools). There is also the > org-noter option (https://github.com/weirdNox/org-noter) to link > external annotations to pdfs. Annotations are long time envisioned feature that is very poorly implemented in any hyperdocument systems. Hypothes.is implement it for WWW but WWW could be better designed to allow easier annotations. Browsers are missing it all over. Hypothes.is Annotate the web, with anyone, anywhere. https://web.hypothes.is/ org-noter is great package and peculiar to me I would keep notes related to anything and make it built-in feature in Emacs. Files can be annotated, images can be annotated, videos, email messages. It referenced to interleave, I have not used it but I see it would show PDF on one side and Org file on the other side, Then user can quickly annotate a page and press key and note is stored in Org, that is such good example of what I call integration or combining into one whole. Such functions could become part of Org mode as they are useful. Personally I am using similar divided window functionality where I can quickly insert hyperlinks from other buffer and capture hyperlinks from other buffers straight into the database. How I see that org-noter does it from the video is that when user opens heading the page will automatically appear on the other window. That is useful feature. I just see it is so much hard coding and it reinforced demand for structured meta data. Packages interleave and org-note are good examples where authors try to hard code relations. > > We have browsers that each of them think for themselves. Each can > > store bookmarks but hardly provide such to external programs. > > For that org-protocol was mentioned. There is eww as well to browse > within emacs (and thus have links). Browsers vary in their implementations, if they allow Javascript this may be possible. Without Javascript it requires different hacks. Generally there is no adopted standard on annotations. Mosaic browser had general public annotations as a built-in feature. Netscape did not follow with it and Firefox today still does not have proper annotations. It has bookmark annotation. But it does not have something like page ID, match, query or paragraph annotation, or heading annotation. Then every browser does what they want. We would have more useful computing would developers agree on comm
org-clock-save: possible to invoke more often?
Hello all, I track Emacs development from git. This means that Emacs sometimes crashes on me. When it does, none of my clock history is saved. Question: is there any reason org-clock-save could not be involved on every clock in or clock out operation? At the moment, org-clock-save is added to the kill-emacs-hook. Would there be any problem with adding this to, for instance, org-clock-in-hook? I guess it would need to be protected with a let org-clock-persist set to 'history? I could just try it and see, of course... Thank you, eric -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4-143-g9a1549
Re: One vs many directories
* Texas Cyberthal [2020-11-27 12:01]: > Hi Jean, > > > does using the 10 Bins and Textmind system gives you personal > > satisfaction of being well organized? > > For what it does, yes, amazingly so. Thank you. I was expecting something like that as we are in similar position of having somewhat personally better or could we say idiosyncratically better organizing system for ourselves. > I still need Dbmind, which I haven't developed yet. What should it be or do? > > did you develop having functions similar to store link that > > quickly obtain the hyperlink in memory to be easier inserted in > > Org files? That is similar to org-capture. I think every system of > > organization and storing objects into X should have automated > > quick hyperlink generation. > I find Emacs Org's native facilities adequate. However, I did a bit > of streamlining: > > > C-c l runs the command treefactor-org-store-link-fold-drawer > > (found in global-map), which is in ‘treefactor.el’. As you have specific thought order in directory names then maybe such could be parsed, maybe slashes / removed to show a full path to the file. This becomes long but could be useful in some lists. > > how does 10 Bins and Textmind enhance what you do with Org files? > > It mind-syncs a natural language thought algorithm, which would > otherwise be impossible. > > https://www.geeksforgeeks.org/introduction-to-algorithms/ > > It is clear and unambiguous, has well-defined inputs and outputs, and > is finite and feasible. Alright and I find that it is the case on my side, and previous work of Engelbart, then also within some other information management systems, like Semantic Synchrony. Would you consider that the system I am using would be or could be said to have natural thought algorithm by considering following: That there are many nodes, they have their names, some properties, and tags and other meta data and searchable lines could look like this as one variety of accessing methods: People / Jean / Computer / Free Software / GNU Emacs / Real-time incremental narrowing completion / Helm now imagine 20,000 or 100,000 such lines but not visible to user, just few would be visible as incremental narrowing search such as helm or ivy or filtering functions could quickly locate particular lines. If I think of "GNU" I would get maybe subset of lines related to that thought, if I think of Emacs, I would get references related to GNU and Emacs. If I think of "completion" I would get references to ivy, selectrym, helm, and so on and by watching the dynamical filter in front of me I get new references displayed in real time which I can then add to the query until I find the matching few or matching tree or matching node. Sounds to me it is also one type of natural thought algorithm. > Unlike Getting Things Done by David Allen, it captures the whole > thought-stream, or at least everything worth typing. I have no idea and by reading basic descriptions I do not find myself there. It seems that systems are pretty much idiosyncratic unless training and well written instructions help in making it applicable for a group. There is one "algorithm" that I am using so that every task CAN BE DONE, and that is that tactical plans are divided into projects only when one step of the plan is too complex to be executed without dividing it or chunking it down. Projects fullfil one step of a larger plan and consists of steps. When one step cannot be fullfiled by its own, it probably means it was not written well chunked, so that step is chunked into tasks or orders. Principle of the algorithm would be to never write tasks that are too complex to be executed and finalized and to have each task in itself doabl so that each step becomes simple step of one bigger complex action. We do projects in real life such as purchasing, construction of machinery, negotiations, and so on, and projects are written on the paper and executed and again reused and executed on other places. By following the above principle our staff members in various countries could get things done just by reading instructions as each step has been simplified down to the atomic doable task.
Re: One vs many directories
Hi Jean, > does using the 10 Bins and Textmind system gives you personal satisfaction of > being well organized? For what it does, yes, amazingly so. I still need Dbmind, which I haven't developed yet. > did you develop having functions similar to store link that quickly obtain > the hyperlink in memory to be easier inserted in Org files? That is similar > to org-capture. I think every system of organization and storing objects into > X should have automated quick hyperlink generation. I find Emacs Org's native facilities adequate. However, I did a bit of streamlining: > C-c l runs the command treefactor-org-store-link-fold-drawer (found in > global-map), which is in ‘treefactor.el’. > how does 10 Bins and Textmind enhance what you do with Org files? It mind-syncs a natural language thought algorithm, which would otherwise be impossible. https://www.geeksforgeeks.org/introduction-to-algorithms/ It is clear and unambiguous, has well-defined inputs and outputs, and is finite and feasible. Unlike Getting Things Done by David Allen, it captures the whole thought-stream, or at least everything worth typing. Man is used to thinking alone, with no internal error-checker. Sloppy conclusions abound since biological memory is ephemeral. Textmind creates a team of past and future selves to collaborate asynchronously. It's quite steadying.
Re: Bring up a screen giving option to open a series of orgmode files
Hello, On 2020-11-27 05:40, Jean Louis writes: > Now we have `evince' PDF viewer that can open PDF I think by page > number and by query but it cannot do the equivalent > `evince-store-link' so user has to think about the file name and page > number and so on. For that I recommend pdf-tools (great pdf viewer for emacs, supporting annotations and synctex, https://github.com/politza/pdf-tools) and org-pdftools (provides org links for it, https://github.com/fuxialexander/org-pdftools). There is also the org-noter option (https://github.com/weirdNox/org-noter) to link external annotations to pdfs. > We have browsers that each of them think for themselves. Each can > store bookmarks but hardly provide such to external programs. For that org-protocol was mentioned. There is eww as well to browse within emacs (and thus have links). > File managers do not provide `file-manager-store-link' but they should > as it would be very useful to have programs integrate with each other > that hyperdocument systems can be built. dired is a nice file manager. I agree having something at the level of the OS would be great, but emacs is a pretty good OS ;) Best, Alan signature.asc Description: PGP signature