Re: Some commentary on the Org Syntax document

2021-12-03 Thread Tom Gillespie
Hi Timothy, Replies in line. Some things might seem a bit out of order because I responded from bottom to top. Best, Tom > from heading to bed, so to quote Pascal "I have only made this letter > longer because I have not had the time to make it shorter". Likewise, and I've heard it as Mark

Re: On zero width spaces and Org syntax

2021-12-03 Thread Tom Gillespie
An important note: for intra-word markup you probably want to use word joiner U+2060 and not zero width space, because a zero width space allows layout to break the word, whereas a word joiner does not. We may need to check to make sure that U+2060 counts as whitespace for the purposes of markup.

Re: Some commentary on the Org Syntax document

2021-12-02 Thread Tom Gillespie
Hi Timothy, Replies in line. Best! Tom On Thu, Dec 2, 2021 at 1:32 AM Timothy wrote: > > Hi All (& Nicolas in particular again), > > With my recent efforts to write a parser based on > , I’ve developed a few thoughts > on > that document.

Re: Org-syntax: Intra-word markup

2021-12-02 Thread Tom Gillespie
I don't mean to be a wet blanket, but the edge cases for the current markup syntax are already hard enough to implement correctly, to the point where different parts of Org mode are inconsistent. Intra-word markup isn't viable because there simply isn't any sane way to parse something like *hello

Re: Orgdown: negative feedback & attempt of a root-cause analysis (was: "Orgdown", the new name for the syntax of Org-mode)

2021-11-30 Thread Tom Gillespie
Karl, The exact naming of a thing is nearly always the most contentious step in trying to promulgate it. In my own field we can easily get all parties to agree on a definition, but they refuse to budge on a name. As others have said, I wouldn't worry about kibitizing over the name. I would

Re: noweb and shell heredocs

2021-11-30 Thread Tom Gillespie
Hi Łukasz, One workaround that is fairly reliable is to prefix the names of the blocks to be nowebbed with an &. So #+name: block-name becomes #+name: Then you reference it as <<>> and the heredoc syntax is broken. Best, Tom

Re: Formal syntax for org-cite

2021-11-30 Thread Tom Gillespie
Hi Timothy, Thanks for putting this together. Comments in line. Best! Tom For reference here is the tokenizer pattern I use in laundry at the moment. There are a number of issues with it ...

Re: "Orgdown", the new name for the syntax of Org-mode

2021-11-28 Thread Tom Gillespie
> I believe (IMHO) that it does not make much sense to separately name the > Org Mode syntax (as a markup language). That would only generate > confusion among users. This is unfortunately not the case. Conflating Org mode which is an Emacs major mode with Org syntax is a major communication

Re: "Orgdown", the new name for the syntax of Org-mode

2021-11-28 Thread Tom Gillespie
I had jokingly suggested "orgup" to have a more positive feeling (up instead of down) than markdown. I'm not sure orgdown will be any more confusing than some other name. It could imply a version of the org syntax that uses markdown surface syntax, but it seems that that would probably be called

Re: [PATCH] Accept more :tangle-mode specification forms

2021-11-18 Thread Tom Gillespie
Hi Timothy, The confusion with 755 and "755" could lead to security issues in cases like 600 vs "600" vs #o600. The need to protect against the 600 case is fairly important, however I don't think there is anything we can do about it, because someone might want to enter their modes as base 10

Re: how to org-babel-detangle with nested noweb?

2021-10-18 Thread Tom Gillespie
Hi Edgar, Degangling of nested noweb blocks tangled using :comments noweb is broken at the moment. There are some deep bugs that need to be worked out, and last time I looked at the code I think my conclusion that it was better to do a complete rewrite starting from a new specification of the

Re: Org lint and named source blocks

2021-10-04 Thread Tom Gillespie
Thanks for the pointer! The actual point of contact seems to be https://github.com/milisims/tree-sitter-org. Good to find another group that is working on this. Best, Tom

Re: Org lint and named source blocks

2021-10-04 Thread Tom Gillespie
> By the way, wouldn't it be better to use tree-sitter rather than > something else for the format grammar? Not really since we are going to need more than one implementation using a parser generator to avoid baking implementation specific details into the spec by accident. This is true for more

Re: [PATCH] Don't fill displayed equations

2021-10-04 Thread Tom Gillespie
> Does anybody have any other thoughts? >From time to time I encounter random patterns that I don't want to be reformatted during a fill operation. Maybe a custom variable like org-fill-paragraph-skip-regexp or similar that could be set by the user? For Timothy's use case he would set it to the

Re: [PATCH] Don't fill displayed equations

2021-10-03 Thread Tom Gillespie
Some thoughts. > Maybe you are right and Tom was actually assuming \begin{equation*}, not > #+begin_export latex. Correct. My bad on that one. > Just as Timothy, I believe that \begin{equation*} is unnecessary verbose > when \[ works *mostly* in a similar way. \begin{equation*} is absolutely

Re: [PATCH] Don't fill displayed equations

2021-10-02 Thread Tom Gillespie
Hi Timothy, > │ \[ > │ not part of a paragraph > │ \] My point is that that parses first as a paragraph (check org-element-at-point). \[ and \] would be meaningless if it did not first parse as a paragraph. > I also don’t see how footnotes are analogous, as footnotes are placed in the >

Re: Comments break up a paragraph when writing one-setence-per-line

2021-10-02 Thread Tom Gillespie
A general comment (heh) here. This is not a bug and not easily fixed. Line comments are their own top level element distinct from paragraphs. If you need something that fits in a paragraph you can use @@comment:@@ at the start of a line. I agree that it is annoying, but Org line comment syntax

Re: [PATCH] Don't fill displayed equations

2021-10-02 Thread Tom Gillespie
> do not see a reason for idiosyncrasy that markup intended to add LaTeX > snippet that looks like exactly as LaTeX commands for this purpose and > even actually preserved during export to LaTeX should have different > semantics for Org parser. The answer is that \[ \] can only occur inside

Re: [PATCH] Accept more :tangle-mode specification forms

2021-10-01 Thread Tom Gillespie
> I'd like to understand these objections better. Aren't you overstating what is at issue? Yes, after hitting send I realized I overstated my position a bit. In the meantime the comments in this thread are encouraging, however I have finally figured out what I was really trying to say. tl;dr

Re: [PATCH] Accept more :tangle-mode specification forms

2021-09-30 Thread Tom Gillespie
I strongly oppose this patch. It adds far too much complexity to the org grammar. Representation of numbers is an extremely nasty part of nearly every language, and I suggest that org steer well clear of trying to formalize this. With an eye to future portability I suggest that no special cases be

Re: Empty headline titles unsupported: Bug?

2021-09-26 Thread Tom Gillespie
Hi Bastien, I am strongly in favor of this change. It simplifies the grammar significantly, and from my work on the laundry lexer and parser, I'm 99% certain that the current behavior is a bug that is the result of gobbling the space after the stars in the headline. The correct implementation

Re: [PATCH] lisp/ox-html.el: Restore org-svg class

2021-09-21 Thread Tom Gillespie
Bumping this patch for 9.5. On Fri, Jul 30, 2021 at 8:59 PM Tom Gillespie wrote: > > Hi, >This patch restores the addition of class="org-svg" to svg images > during html export. Best! > Tom

Re: Org lint and named source blocks

2021-09-21 Thread Tom Gillespie
> Should we allow syntax like #+KEYWORD:value to be correct or do we > require a whitespace/space after colon all the time? The spec as written is ambiguous/silent on this issue. In my work on laundry tokenizer and grammar I have found keyword syntax to be a thorny issue, and I strongly suggest

Re: [org-cite] citations in property drawers?

2021-09-16 Thread Tom Gillespie
> I understand the problem, but the solution should not be: "let's pretend > export does not exist". >From my perspective any org object that is not in a section that allows org objects could in principle be parsed as such, but it would not be in the core of the grammar, and it also would have to

Re: [org-cite] citations in property drawers?

2021-09-15 Thread Tom Gillespie
> That would be a terrible idea. Exporters are not required to handle all > data contained in properties drawers, so this may introduce errors, > e.g., when trying to number citations. I agree completely. You can't export something that has no anchor in text that would be rendered. Maybe I

Re: [org-cite] citations in property drawers?

2021-09-14 Thread Tom Gillespie
Hi Bruce, I could certainly imagine using it, and I don't see any issue with doing it from the point of view of the grammar. Footnotes can appear in a property drawer without issue, though obviously they don't export. One question though since I may have missed this in the other threads is

Re: Expanding how the new cite syntax is used to include cross-references - thoughts?

2021-08-10 Thread Tom Gillespie
In general I like John's suggestion. Org link syntax can be made to do nearly anything because it is possible to bind link actions to arbitrary elisp functions (I have used them to create buttons that run source blocks for some of my non-technical colleagues). The grouping of cross references

Re: [Concept talk] Org-connector

2021-08-10 Thread Tom Gillespie
Hi Sébastien, I think you are probably looking for org-sync which implements exactly this functionality. You would need to write a new backend for your particular ticketing system, but github, bit bucket, and redmine backends already exist and can serve as an example. Best, Tom

Re: bug: Error handling in source blocks.

2021-08-10 Thread Tom Gillespie
I will also chime in here to say that managing output streams and errors for babel is a major new feature that I am interested in. The issue, as Tim points out, is that there is a lot of complexity lurking here due to the fact that certain languages have fundamentally different capabilities and

Re: [PATCH] Rename headline to heading

2021-08-08 Thread Tom Gillespie
Hi André, Thanks for taking a first pass at this. I think that this patch is difficult to review. Could you break it into two separate patches, one for documentation (non-code, e.g. docstring and comment) changes and one for code changes? That way we could more easily see where we may need to

Re: Help requested: Support for basic Org mode support in tools outside of Emacs

2021-08-03 Thread Tom Gillespie
Hi Karl, Great initiative. For many of the things in the table you will probably want to link to the underlying library For example for github and gitlab there is https://github.com/wallyqs/org-ruby (which I have been trying to find time to submit fixes to). I've linked a couple relevant

[PATCH] lisp/ox-html.el: Restore org-svg class

2021-07-30 Thread Tom Gillespie
Hi, This patch restores the addition of class="org-svg" to svg images during html export. Best! Tom From 4363eec0913ccd0d05ecf3d6346208c62d3597f8 Mon Sep 17 00:00:00 2001 From: Tom Gillespie Date: Fri, 30 Jul 2021 20:53:07 -0700 Subject: [PATCH] lisp/ox-html.el: Restore org-svg clas

Re: Headings and Headlines

2021-07-23 Thread Tom Gillespie
I enthusiastically support changing the documentation to use heading. I use heading in my formal grammar because I have found there are more ways that it can be modified and remain grammatically correct when used in english sentences. The internal implementation in elisp still refers to headlines,

Re: [PATCH] ob-core: tangle check library of babel after current buffer

2021-07-17 Thread Tom Gillespie
Pinging on this to see if anyone can test it so that it can be merged. Tom On Wed, Jun 16, 2021 at 4:29 PM Tom Gillespie wrote: > > Hi, >This is a patch that fixes tangling behavior when a block has been > ingested into the library of babel and then modified. Best! > Tom

Re: A requires/provides approach to linking source code blocks

2021-07-13 Thread Tom Gillespie
We have been receiving many new feature suggestions and requests coming in for org babel. I think that Tim's suggestion is the right one. Nearly all of these need to be implemented as an extension first and tested independently. Further, even if this is done, it should be clear that there is zero

Re: [PATCH] Allow tangling to a list of files

2021-07-07 Thread Tom Gillespie
Reading over this with the new information about the use case, it seems that using noweb to manage the many-to-many nature of a mapping between blocks and files is a much better way to achieve the desired result. In addition it is already supported and does not add more complexity to an already

Re: Large source block causes org-mode to be unusable

2021-06-21 Thread Tom Gillespie
> That said, I think keeping 2000 lines of source code inside an > org src block is neither a standard use case nor a reasonable idea. I would say that it certainly is a standard use case for people who want to keep everything in a single file (e.g. to simplify reproducibility and avoid the mess

[PATCH] ob-core: tangle check library of babel after current buffer

2021-06-16 Thread Tom Gillespie
Hi, This is a patch that fixes tangling behavior when a block has been ingested into the library of babel and then modified. Best! Tom From 22d0689257f977d09b013a143e899f788b45a039 Mon Sep 17 00:00:00 2001 From: Tom Gillespie Date: Mon, 14 Jun 2021 19:18:28 -0700 Subject: [PATCH] ob-core

Re: colored src blocks question

2021-06-01 Thread Tom Gillespie
Hi John, Are you perhaps missing the :extend t directive in the font spec? Best, Tom >

Re: A formal grammar for Org

2021-06-01 Thread Tom Gillespie
Hi Jakob, Thank you for getting in touch. I had been meaning to after someone pointed me to your repo in a reddit thread, but you beat me to it. Replies in line. Best! Tom PS ccing this back to the list for the record. On Tue, Jun 1, 2021 at 1:56 AM Jakob Schöttl wrote: > > Hi Tom, > > I

Re: Empty headline titles unsupported: Bug?

2021-05-29 Thread Tom Gillespie
Hi Ihor, Yes, happy to put my test cases into the org element cases and visa versa. My long term plan is to come up with a set of test cases that are unambiguous and potentially ambiguous so that we can determine the expected behavior in those cases, so this is a great first step. Best, Tom

Re: Empty headline titles unsupported: Bug?

2021-05-29 Thread Tom Gillespie
Hi David, Laundry produces a full s-expression representation of the org parse tree (though it is still evolving). I haven't added a pass that converts it to some Racket internal representation (probably will be structs). If you get it installed and put #lang org at the top of an org file you

Re: Empty headline titles unsupported: Bug?

2021-05-27 Thread Tom Gillespie
Hi all, Here is the 4th (or so) iteration of the grammar for titles that I think deals with most of the issues in this thread along with a bunch of nasty test cases. The previous attempts can be inspected in the git history, but long story short, it is extremely hard to find a grammar that

bug#48676: Arbitrary code execution in Org export macros

2021-05-26 Thread Tom Gillespie
Hi Glenn, The definition for local variables doesn't cover things like org macros, though the spirit of the policy is something worth keeping in mind. Running M-x org-export-dispatch and hitting two keys means that the user has to do something to trigger code execution, much like they would

Re: execute elisp link without prompt

2021-05-21 Thread Tom Gillespie
> In the end I've set as to nil as a local variable If you want something a bit more secure you could use a function that checks the block name ("some-block" in this example). Best! Tom (lambda (_lang _body) (not (string= "some-block" (plist-get (cadr (org-element-at-point))

Re: URLs with brackets not recognised

2021-05-12 Thread Tom Gillespie
A quick fix is to percent encode the troublesome characters, but the underlying issue is in org-link-any-re which is defined in org-link-make-regexps which is what org uses to find the next link. Some improvements might be possible for some of the edge cases there, but a complete solution for bare

Re: Multiple calc commands with orgbabel

2021-05-07 Thread Tom Gillespie
Hi Bastien, Here's a patch to make it official. :) Tom From 3a61289e8fa4442f6d340138dcb67b950e980212 Mon Sep 17 00:00:00 2001 From: Tom Gillespie Date: Thu, 6 May 2021 23:52:21 -0700 Subject: [PATCH] lisp/ob-calc.el: Add Tom Gillespie as the maintainer * lisp/ob-calc.el: Add Tom Gillespie

Re: Multiple calc commands with orgbabel

2021-05-06 Thread Tom Gillespie
Hi Bastien, Given the short length of the file, the fact that I now have a fairly good idea of how it works, and the fact that I share a last name with the original author of calc, I would be happy to. I'll hunt down the steps you mentioned for becoming an ob- maintainer and ping back when

Re: Multiple calc commands with orgbabel

2021-05-05 Thread Tom Gillespie
Here is a quick and dirty implementation that more or less does what you want (I think). The if t would probably need to be replaced by a value that corresponded to an option that indicated that ob-calc should resolve all expressions on the stack. This isn't really an issue of return value, it is

Re: Multiple calc commands with orgbabel

2021-05-05 Thread Tom Gillespie
Looking at ob-calc there is a call to calc-push-list. Knowing the length of that list (i.e. the number of arguments) it should be possible to inspect calc-stack to retrieve the other values on the stack from the current block. You can see this if you run M-: calc-stack. This would probably need a

Re: About multilingual documents

2021-05-03 Thread Tom Gillespie
I like Aleksandar's solution quite a bit because it also works inline e.g. as src_org[:lang de]{Meine deutsch ist zher schlect!}. In principle this means that you could leverage the org-babel and org-src buffer system to get flyspell results in that language in line as well (though I don't think

Re: <> and ?font-lock? fly-check, ...

2021-05-03 Thread Tom Gillespie
Hi Greg, I just checked and it induces a syntax error, which I did not know, but turns out to be quite useful because it means that an untangled or incorrectly tangled file will fail to run beyond that point. Best! Tom On Sun, May 2, 2021 at 9:11 PM Greg Minshall wrote: > > Tom, that is quite

Re: [PATCH] Fontification for inline src blocks

2021-05-02 Thread Tom Gillespie
Hi Timothy, Another thought about this. In some languages (e.g. python) blocks require an explicit return by default. It would be nice to be able to set header arguments in the property drawer separately for inline source blocks in such cases. src_python[:prologue "x = (" :epilogue ")\nreturn

Re: [PATCH] Fontification for inline src blocks

2021-05-02 Thread Tom Gillespie
> I see. I imagine the expected behaviour of such a function would be to > toggle org-inline-src-prettify-results and redisplay? Yeah, see org-toggle-link-display for inspiration I think. ;;;###autoload (defun org-toggle-link-display () "Toggle the literal or descriptive display of links."

Re: [PATCH] Fontification for inline src blocks

2021-05-02 Thread Tom Gillespie
Hi Timothy, It seems to work more or less as expected. A few comments below. Best, Tom 1. I think there needs to be a function to toggle org-inline-src-prettify-results as there is e.g. for hyperlinks. I was quite confused by the prettified results. 2. I'm also not sure that this approach to

Re: [POLL] Setting `org-adapt-indentation' to nil by default?

2021-05-02 Thread Tom Gillespie
Hi Nicolas, Sorry, I did not mean to imply that such things were not possible currently. I was writing in the context of how to specify the current behavior formally. As you point out they absolutely are possible. More replies in line. Best, Tom > This is inaccurate. > > The following is a

Re: [Feature request] String escaped noweb expansion

2021-05-02 Thread Tom Gillespie
Hi Sebastien, I have encountered issues with this before when trying to noweb code into a string that was code to be sent via ssh. I ended up switching to use typeset -f in bash in most cases now, but that is not possible for other languages. Some languages also have enough different types of

Re: <> and ?font-lock? fly-check, ...

2021-05-02 Thread Tom Gillespie
Hi Greg, A slightly different suggestion that doesn't break other org processors (which might not allow users to change org-babel-noweb-wrap- values) is to prefix the names of the blocks with & (e.g. <<>>) as I do in multiple places in

Re: [POLL] Setting `org-adapt-indentation' to nil by default?

2021-05-02 Thread Tom Gillespie
Hi Bastien, Strong +1 here. Users can get the same visual effect without materializing the whitespace into the file. Materializing the whitespace causes many potential issues with source blocks for languages that have significant whitespace, issues with #+begin_src and #+end_src having

Re: [PATCH] ob-tangle.el: Speed up tangling

2021-04-20 Thread Tom Gillespie
Hi Sébastien, The temp -> rename approach is good, but you should probably use make-temp-file to create the file to reduce the risk of collisions/race conditions. For example as (make-temp-file (concat file-name ".tangling")). I think that the location of condition-case is ok, but I wonder

Re: Concerns about community contributor support

2021-04-20 Thread Tom Gillespie
Hi Tim, David, and Gustav, I am fairly certain that with only a few exceptions it is possible to specify a context free grammar for org syntax, followed by a second pass that deals specifically with markup and a few other forms, notably the reassembly of things like plain lists. The fact that

Re: [Patch] to correctly sort the items with emphasis marks in a list

2021-04-19 Thread Tom Gillespie
Hi Greg, seq cannot be used because it is not available in older versions of emacs that org still supports. When support for those older versions is dropped then seq could be used. Best, Tom

Re: [PATCH] ob-tangle.el: Speed up tangling

2021-04-18 Thread Tom Gillespie
Hi Sébastien, Some comments while looking over this (will report back when I have tested it out as well). This is a section of the ob export functionality that I have been looking for on and off for quite a while because it is responsible for some bad and insecure behavior. I think that some of

Re: Bug: inconsistent escaping of coderef regexp

2021-04-07 Thread Tom Gillespie
00:00:00 2001 From: Tom Gillespie Date: Wed, 7 Apr 2021 12:29:01 -0700 Subject: [PATCH] lisp/ob-tangle.el: Fix coderef removal during tangling * lisp/ob-tangle.el (orb-babel-tangle-single-block): Regularize behavior when removing coderefs during tangling. This fixes an issue where trailing whitespace

Re: Bug: inconsistent escaping of coderef regexp

2021-04-05 Thread Tom Gillespie
Missed removing a debug message. Here is the correct patch. Best, Tom On Sun, Apr 4, 2021 at 10:22 PM Tom Gillespie wrote: > > Hi Nicolas, >I've attached a patch with a first pass implementation that I think > resolves most of the issues. It probably needs a few tests

Re: Bug: inconsistent escaping of coderef regexp

2021-04-04 Thread Tom Gillespie
es a standard way to specify a :coderef-prefix regexp so that empty comments can be stripped. From e017fe3f4fb36da2c8560ae526b8bdfd42dc Mon Sep 17 00:00:00 2001 From: Tom Gillespie Date: Sun, 4 Apr 2021 21:40:32 -0700 Subject: [PATCH] improve org-src-coderef-regexp and regularize usage * lisp

Re: Bug: inconsistent escaping of coderef regexp

2021-04-04 Thread Tom Gillespie
Hi Nicolas, After a bit of investigation I understand the issue better now. There are two problems here. One is an easy single line change, the other is a deeper issue, which is that it is impossible for the user to specify their own coderef regexp that can be used in both cases. No matter

A formal grammar for Org

2021-04-04 Thread Tom Gillespie
Dear all, Here is a draft of a formal grammar for Org mode [1]. It is still in a rough state, despite quite a bit of work. However, following some changes to improve performance for parsing real (big) Org files, I think it is time to share it with the community so that we can start to gather

Re: Using backticks for the inline code delimeter?

2021-04-03 Thread Tom Gillespie
Is there any reason why folks couldn't just customize org-emphasis-alist using a file local variable? Just add ("`" org-code verbatim) and see what happens. Knowing a bit about the codebase this will probably lead to trouble during export because the backends are likely unaware, but at least it

Re: Idea for handling timezones

2021-04-03 Thread Tom Gillespie
Time zones are tricky, but there are some requirements that make it possible to rule out many apparent solutions because they violate some critical invariant. For example. Timezone cannot be scoped to the file. This is because many users (myself included) have a single org file that is used in and

Re: Font lock in org+elisp confused with ?\[

2021-04-02 Thread Tom Gillespie
Reposting my reply to the emacs-devel thread here as well. The hack I mention that has performance issues was derived from John's solution for the <> issue (though the performance issues are all of my own creation). Best, Tom This is a known issue with org babel blocks. It is due to the fact that

Re: Syntax Proposal: Multi-line Table Cells/Text Wrapping

2021-04-01 Thread Tom Gillespie
Tim, Your concerns are well founded. Essentially any cosmetic extension to the org table syntax will be an unmaintainable, bug ridden nightmare and would be an eternal burden on any attempts to formalize correct behavior. I have a draft of a grammar for a significant portion of Org syntax

Re: Properties on buffer level

2021-02-12 Thread Tom Gillespie
You should be able to run C-c C-c on #+property: directives before the first headline and they will be updated without reloading the buffer. Best, Tom

Re: Display ellipsis at end of headline instead of after tags

2021-01-10 Thread Tom Gillespie
Not 100% sure about this, but take a look at the hs-set-up-overlay variable, it seems like it might be possible to customize that to achieve this behavior. Best, Tom

Re: Possibility to copy text outside EMACS and send it to orgmode document

2021-01-06 Thread Tom Gillespie
It is built into the core org distribution.

Re: temporary inclusion of a read-only file / inline element into orgmode buffer

2021-01-06 Thread Tom Gillespie
Check out org-transclusion, it covers some of the use cases you describe or could be used to implement them. The issue with giant results, especially those that have very long lines, is more challenging, but being able to specify that different output streams should go to files instead of results

Re: Possibility to copy text outside EMACS and send it to orgmode document

2021-01-05 Thread Tom Gillespie
You can achieve something a bit like this using org-protocol-capture-html https://github.com/alphapapa/org-protocol-capture-html. I'm not entirely sure whether you can bind the equivalent of a hook in javascript to run every time you C-c, but if you can, then it should be possible to match this

Bug: inconsistent escaping of coderef regexp

2021-01-04 Thread Tom Gillespie
It is not possible to strip coderefs when tangling and also search for those coderefs using org-link-search. This is because org-link-search uses org-src-coderef-regexp which calls regexp-quote on the regexp string while org-babel-tangle-single-block does not and uses the regexp string directly

Re: did behaviour of RET change again?

2020-12-23 Thread Tom Gillespie
> possibly i'm misunderstanding, but my sense is that the value of org > adapt indentation doesn't change what you might actually find ("in a > .org file in the wild"). so, whatever its value, your grammar would > have to deal with all cases? Yep, we can't magically change all the files out in

Re: did behaviour of RET change again?

2020-12-23 Thread Tom Gillespie
> in case not obvious, i am suggesting a nil value for org adapt indentation. > thus no physical indentation of all lines including planning lines. > i'd even suggest no physical indentation as default for example and > source blocks, but that is a can of worms. I know that this is a can of

Re: Bug: org-element does not recognize table.el tables [9.4 (release_9.4-53-g23f941 @ /home/nick/elisp/org-mode/lisp/)]

2020-12-21 Thread Tom Gillespie
A few years ago I was trying to format tables in a certain specific way and it was essentially impossible with org tables for reasons that now escape me. However, it was possible to accomplish it using tabels.el tables. I don't think I ended up actually using the tables.el solution, but at the

Re: [PATCH] Enhance org-html--build-meta-info

2020-12-15 Thread Tom Gillespie
Hi Timothy, I understand now. Having a way to implement this in the config is a good thing as it covers a slightly different set of use cases and workflows than always using a common #+setupfile: line. That way if you are working with files that don't have a #+setupfile: specified you can

Re: [PATCH] Enhance org-html--build-meta-info

2020-12-15 Thread Tom Gillespie
A question from the slightly uninformed. Why not just use #+html_head: possibly with a macro to fill in variable values? That is fully extensible and doesn't overload keywords. For title, date, author, etc. those can have clearly defined mappings to the html, but everything else seems to be

Re: Bring up a screen giving option to open a series of orgmode files

2020-12-15 Thread Tom Gillespie
To hop in on the hypothes.is thread. I have spent quite a bit of time working with hypothes.is and related tooling (mostly in python), so here is a brain dump on interactions between org and hypothes.is. As others have mentioned, this could easily be its own thread. Best! Tom A quick note on

Re: Emacs as an Org LSP server

2020-12-14 Thread Tom Gillespie
See also. https://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00798.html and https://www.reddit.com/r/emacs/comments/696pv1/rms_supports_language_server_protocol_integration/ for some discussion. Best, Tom On Mon, Dec 14, 2020 at 4:31 PM Tim Cross wrote: > > > > I am no fan of Microsoft.

Re: Bug fix attached: org-babel sql postgres, fix hardcode

2020-12-12 Thread Tom Gillespie
It looks like the two patches are sequential, there should probably be a rebase into a single patch. I would remove the comment in the second patch because it is a single command to jump to the default value and it might change in the future, so no reason to put it in a comment. One way to

Re: stability of toc links

2020-12-08 Thread Tom Gillespie
It sounds like you are looking for the CUSTOM_ID property. See https://orgmode.org/manual/Handling-Links.html and https://orgmode.org/manual/Internal-Links.html. I don't remember whether there is a way to generate ids matching headlines within org itself, but there is

Re: new website: not easy to find how to ask for help

2020-12-08 Thread Tom Gillespie
Hi Eric, Good point, we are indeed missing a line that says "You can mail the list directly at mailto:emacs-orgmode@gnu.org.; Here's a patch. I assume it is probably ok to put the raw email on the site. Best, Tom From 490c48a9750d04571e63250208ae90b2cd85 Mon Sep 17 00:00:00 2001 From

Re: How to evaluate source code while in the edit buffer?

2020-12-04 Thread Tom Gillespie
While we're on the subject of execution in the edit buffer, it is not entirely clear what such execution would mean. Mirko's desire seems to be to execute the buffer directly without org-babel as an intermediary. However, the most consistent approach would be a command to pop back to the source

Re: How to preserve empty headings

2020-11-30 Thread Tom Gillespie
This is caused by elastic-indent-mode. As foretold https://lists.gnu.org/archive/html/emacs-orgmode/2020-11/msg00325.html. Tom On Mon, Nov 30, 2020 at 1:38 PM Titus von der Malsburg wrote: > > > On 2020-11-30 Mon 19:25, Diego Zamboni wrote: > >> > >> I’m aware of several workarounds and this one

Re: Emacs inserts hardwired org-agenda-files variable, overwriting user options

2020-11-29 Thread Tom Gillespie
> Would this affect my own custom What I did when I migrated was to manually move the existing custom-set-variables and custom-set-faces from .emacs to the new custom-file (in my case ~/.emacs.d/custom.el), that way the old definitions will still be loaded. All new customizations will live in

Re: looking for a macro eval workaround (9.1 vs 9.2 and +) for export backend test

2020-11-29 Thread Tom Gillespie
Not sure if this helps, but the example that I came up with for the quickstart https://orgmode.org/quickstart.html#macros has an example (see below) of using multiple @@ export snippets in a single macro. If you have consistent naming conventions for pdf vs svg you might be able to write a variant

Re: Emacs inserts hardwired org-agenda-files variable, overwriting user options

2020-11-29 Thread Tom Gillespie
Here is a workaround. Emacs klobbering settings in .emacs has caused many issues for me in the past. The solution I finally came up with was to ensure that custom variables are loaded before any of my settings. Near the top of my .emacs (before any calls to setq) I have the following: custom

Re: Multiple named code blocks

2020-11-28 Thread Tom Gillespie
Hi Félix, I think that it is probably not a good idea to implicitly concatenate blocks that share the same name. There are a number of major downsides. One reason is that all the other parts of org-mode assume that there is only a single block with that name, or rather have undefined behavior

Re: Local variables insecurities - Re: One vs many directories

2020-11-25 Thread Tom Gillespie
> As there is the option ! to "apply local variables and permanently > mark these values" but there is no option "not to apply local > variables and permanently mark these values". I have a longer reply that I will send tomorrow, but wanted to respond to this. Yes exactly! I have the equivalent

Re: Local variables insecurities - Re: One vs many directories

2020-11-25 Thread Tom Gillespie
Hi Jean, Some points in summary before a long email. 1. Having an accepting default behavior as a user (i.e., saying yes to all prompts) is bad security practice. The only thing that systems can do is prompt as infrequently as possible in hopes that people don't get prompt fatigue. Emacs

Re: consistent behavior across babel languages

2020-11-25 Thread Tom Gillespie
Hi Ian, Thanks for getting this started. I have been collecting a list of org babel issues and worg is definitely a better place to put them than in one big email. Since there are so many different features that a babel language implementation can support I don't want to try to put them all in

Re: Bug: :prologue and :epilogue are ignored in ob-sql code blocks (inter alia)

2020-11-24 Thread Tom Gillespie
Tim, Thank for the report, and the digging for ob-langs that might be affected. The underlying issue is that prologue and epilogue are part of both the user facing parts of org babel as well as the internal language implementation facing code. This is a fundamental design flaw in org babel

Re: One vs many directories

2020-11-24 Thread Tom Gillespie
> > That is security issue. > > Why is it a security issue? The variables do need to be close to the end > — 3000 characters is only about 50 lines. It isn't a security issue by itself. Emacs never automatically runs eval file local variables unless you have tampered with enable-local-eval, in

Re: ob-python: import local package into a session

2020-11-24 Thread Tom Gillespie
I have also been dissatisfied with the current options for making local python libraries accessible in certain org files. The amount of setup that is required outside the org file itself was too large, especially if you want someone else who is not intimately familiar with python to be able to use

  1   2   >