Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Ihor Radchenko writes: >> I suggest to keep current defaults. Because I have lot of Org files, if >> changed, I have to do lot of >> work to adopt files and might get wrong. It's very important. > > Org mode does not distinguish the _meaning_ of all keywords regardless > of their case. Including src blocks and results. If it is not the case, > it should be a bug (and please report it then). So, you should have no > need to change keyword case in your existing documents except for your > visual satisfaction. > > What we are discussing here is the visual appearance of how the keywords > are inserted by default. Nothing functional. > > Best, > Ihor That's the best, thanks for explanation. -- [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 signature.asc Description: PGP signature
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
> I suggest to keep current defaults. Because I have lot of Org files, if > changed, I have to do lot of > work to adopt files and might get wrong. It's very important. Org mode does not distinguish the _meaning_ of all keywords regardless of their case. Including src blocks and results. If it is not the case, it should be a bug (and please report it then). So, you should have no need to change keyword case in your existing documents except for your visual satisfaction. What we are discussing here is the visual appearance of how the keywords are inserted by default. Nothing functional. Best, Ihor
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Timothy writes: > Hi Christopher, > >>> Is there a good reason for this? >>> >>> At a glance, I’d personally be tempted to make the use case insensitive, and >>> only use `org-babel-results-keyword’ when inserting, or remove it all >>> together. >> >> Me too, I hope it can be case-insensitive, if org-mode internal has already >> case-sensitive >> processing. I suggest to keep one standard. I remember used to blocks like >> `#+BEGIN_SRC' etc are >> uppercase by default. Latter changed into lowercase. Then I did a lot of >> work to replace them. If we >> need to use lowercase, I suggest to use them all. It might improve regexp >> matching speed? Don’t know…… > > See my reply to Ihor, I actually misread the code. It *is* case insensitive > (as it > should be). So, changing the default capitalisation of > `org-babel-results-keyword' > would have no effect on the interpretation or function of existing documents. > > Based on your comments on converting block case, maybe it would be worth > providing a function to normalise the case in an Org document? > > All the best, > Timothy Indeed, there is a similar purpose function: #+begin_src emacs-lisp (defun modi/lower-case-org-keywords () "Lower case Org keywords and block identifiers. Example: \"#+TITLE\" -> \"#+title\" \"#+BEGIN_EXAMPLE\" -> \"#+begin_example\" Inspiration: https://code.orgmode.org/bzg/org-mode/commit/13424336a6f30c50952d291e7a82906c1210daf0.; (interactive) (save-excursion (goto-char (point-min)) (let ((case-fold-search nil) (count 0)) ;; Match examples: "#+FOO bar", "#+FOO:", "=#+FOO=", "~#+FOO~", ;; "‘#+FOO’", "“#+FOO”", ",#+FOO bar", ;; "#+FOO_bar", "#+FOO". (while (re-search-forward "\\(?1:#\\+[A-Z_]+\\(?:_[[:alpha:]]+\\)*\\)\\(?:[ :=~’”]\\|$\\)" nil :noerror) (setq count (1+ count)) (replace-match (downcase (match-string-no-properties 1)) :fixedcase nil nil 1)) (message "Lower-cased %d matches" count #+end_src -- [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 signature.asc Description: PGP signature
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Hi Christopher, >> Is there a good reason for this? >> >> At a glance, I’d personally be tempted to make the use case insensitive, and >> only use `org-babel-results-keyword’ when inserting, or remove it all >> together. > > Me too, I hope it can be case-insensitive, if org-mode internal has already > case-sensitive > processing. I suggest to keep one standard. I remember used to blocks like > `#+BEGIN_SRC' etc are > uppercase by default. Latter changed into lowercase. Then I did a lot of work > to replace them. If we > need to use lowercase, I suggest to use them all. It might improve regexp > matching speed? Don’t know…… See my reply to Ihor, I actually misread the code. It *is* case insensitive (as it should be). So, changing the default capitalisation of `org-babel-results-keyword' would have no effect on the interpretation or function of existing documents. Based on your comments on converting block case, maybe it would be worth providing a function to normalise the case in an Org document? All the best, Timothy
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Hi Ihor, >> Hmm. Upon inspection I see that some uses of `org-babel-results-keyword’ are >> indeed case-sensitive. This comes as a surprise to me, as I thought that >> /all/ >> keywords were parsed in a case-insensitive manner. >> >> Is there a good reason for this? > > Could you elaborate on this? It should not be case-sensitive, AFAIK. I had a quick glance earlier. Having another look, I misread the code (I thought I saw `(case-fold-search nil)' but it’s actually `(case-fold-search t)'). So, the two uses of `org-babel-results-keyword' are `org-babel-find-named-result' and `org-babel--insert-results-keyword'. `org-babel--insert-results-keyword' just inserts `org-babel-results-keyword' verbatim. `org-babel-find-named-result' searches for it with `(case-fold-search t)'. All the best, Timothy
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Timothy writes: > Hi Christopher, > >> I suggest to keep current defaults. Because I have lot of Org files, if >> changed, I have to do lot of >> work to adopt files and might get wrong. It’s very important. > > Hmm. Upon inspection I see that some uses of `org-babel-results-keyword' are > indeed case-sensitive. This comes as a surprise to me, as I thought that /all/ > keywords were parsed in a case-insensitive manner. > > Is there a good reason for this? > > At a glance, I’d personally be tempted to make the use case insensitive, and > only use `org-babel-results-keyword' when inserting, or remove it all > together. > > All the best, > Timothy Me too, I hope it can be case-insensitive, if org-mode internal has already case-sensitive processing. I suggest to keep one standard. I remember used to blocks like ~#+BEGIN_SRC~ etc are uppercase by default. Latter changed into lowercase. Then I did a lot of work to replace them. If we need to use lowercase, I suggest to use them all. It might improve regexp matching speed? Don't know.. -- [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 signature.asc Description: PGP signature
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Timothy writes: > Hmm. Upon inspection I see that some uses of `org-babel-results-keyword' are > indeed case-sensitive. This comes as a surprise to me, as I thought that /all/ > keywords were parsed in a case-insensitive manner. > > Is there a good reason for this? Could you elaborate on this? It should not be case-sensitive, AFAIK. Best, Ihor
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Hi Christopher, > I suggest to keep current defaults. Because I have lot of Org files, if > changed, I have to do lot of > work to adopt files and might get wrong. It’s very important. Hmm. Upon inspection I see that some uses of `org-babel-results-keyword' are indeed case-sensitive. This comes as a surprise to me, as I thought that /all/ keywords were parsed in a case-insensitive manner. Is there a good reason for this? At a glance, I’d personally be tempted to make the use case insensitive, and only use `org-babel-results-keyword' when inserting, or remove it all together. All the best, Timothy
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
I suggest to keep current defaults. Because I have lot of Org files, if changed, I have to do lot of work to adopt files and might get wrong. It's very important. -- [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 signature.asc Description: PGP signature
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Rudolf Adamkovič writes: > The results so far: > > - For inconsistent defaults: > Colin > > - For consistent defaults: > Rudy (me), Tim, Timothy, Kaushal > > - Unknown: > Gyro > > Four times more people would like to see consistent defaults so far. > Does that count as overwhelming support? :) Bastien would count as overwhelming support :) Though seriously - I am generally in favour of being consistent, but not to the point that I prioritise it over fixing bugs and implementing new features. If someone is bothered enough to spend time scanning all the instances of using uppercase/lowercase keywords in Org sources, I can prepare a patch based on that information. Best, Ihor
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
> Rudolf Adamkovič writes: > Ihor Radchenko writes: >> So, unless there is overwhelming support for changing uppercase >> defaults into lowercase and a thorough patch, I am inclined >> towards preserving the existing behaviour. > The results so far: > - For inconsistent defaults: Colin I did not write that. I wrote that I am for a default remaining a default. Whether it is "consistent" or "inconsistent" is not important. Once chosen it should stay fixed.
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
On 11 January 2022, Rudolf Adamkovič wrote: Four times more people would like to see consistent defaults so far. Does that count as overwhelming support? :) I'm for consistent defaults too, and #+RESULTS looks wrong to me, but I suspect I'm one of many who isn't able to provide patches, doesn't really mind it enough to be terrifically bothered, is happy to live with it, and wouldn't mind if attention was directed to bigger issues. Bill -- William Denton https://www.miskatonic.org/ Librarian, artist and licensed private investigator. Toronto, Canada
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Ihor Radchenko writes: > So, unless there is overwhelming support for changing uppercase > defaults into lowercase and a thorough patch, I am inclined towards > preserving the existing behaviour. The results so far: - For inconsistent defaults: Colin - For consistent defaults: Rudy (me), Tim, Timothy, Kaushal - Unknown: Gyro Four times more people would like to see consistent defaults so far. Does that count as overwhelming support? :) > Changing just RESULTS keyword provides no benefit to making things > consistent. Agreed, like everyone else. Rudy -- "Programming reliably --- must be an activity of an undeniably mathematical nature […] You see, mathematics is about thinking, and doing mathematics is always trying to think as well as possible." -- Edsger W. Dijkstra (1981) Rudolf Adamkovič [he/him] Studenohorská 25 84103 Bratislava Slovakia
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Hi Ihor, > For some more context, other functions are not really consistent about > uppercase/lowercase: > - `org-insert-structure-template' lowercase > - `org-insert-drawer' uppercase > - `org-insert-property-drawer' uppercase > - `org-babel-exp-code-template' defaults to uppercase > - `org-clock-find-position' defaults to uppercase :END: > - `org-feed-write-status' defaults to uppercase > - `org-inlinetask-insert-task' defaults to uppercase > - `org-mobile-write-agenda-for-mobile' defaults to uppercase > - `org-babel-examplify-region' lowercase Ok, I thought we were much closer to consistency than we seem to be. In that case, I don’t see much point in /just/ changing #+results. > So, unless there is overwhelming support for changing uppercase > defaults into lowercase and a thorough patch, I am inclined towards > preserving the existing behaviour. I do think it would be nice if we went one way or the other (and from previous discussion, lower case looks like the direction we’d go in), but it would have to be across the board. > Changing just RESULTS keyword provides no benefit to making things > consistent. Yep. All the best, Timothy
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
> Ihor Radchenko writes: > Colin Baxter writes: >> What is the point of changing a default? Users can change to >> whatever they like, but a default is a default - i.e. remains >> fixed. Why a particular default arose belongs to peculiarities of >> history. Do people really want to revisit this year after year? >> The value of a default is irrelevant: what is important is that >> it does not change, once it is chosen, without some very good >> reason. I have not seen that reason in this particular case. The >> arguments of consistency are ephemeral. > For some more context, other functions are not really consistent > about uppercase/lowercase: - =org-insert-structure-template= > lowercase - =org-insert-drawer= uppercase - > =org-insert-property-drawer= uppercase - > =org-babel-exp-code-template= defaults to uppercase - > =org-clock-find-position= defaults to uppercase :END: - > =org-feed-write-status= defaults to uppercase - > =org-inlinetask-insert-task= defaults to uppercase - > =org-mobile-write-agenda-for-mobile= defaults to uppercase - > =org-babel-examplify-region= lowercase > I just looked for END vs end. > So, unless there is overwhelming support for changing uppercase > defaults into lowercase and a thorough patch, I am inclined > towards preserving the existing behaviour. Agreed. > Changing just RESULTS keyword provides no benefit to making things > consistent. Agreed. Best - Colin
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Colin Baxter writes: > What is the point of changing a default? Users can change to whatever > they like, but a default is a default - i.e. remains fixed. Why a > particular default arose belongs to peculiarities of history. Do people > really want to revisit this year after year? The value of a > default is irrelevant: what is important is that it does not change, > once it is chosen, without some very good reason. I have not seen that > reason in this particular case. The arguments of consistency are > ephemeral. For some more context, other functions are not really consistent about uppercase/lowercase: - =org-insert-structure-template= lowercase - =org-insert-drawer= uppercase - =org-insert-property-drawer= uppercase - =org-babel-exp-code-template= defaults to uppercase - =org-clock-find-position= defaults to uppercase :END: - =org-feed-write-status= defaults to uppercase - =org-inlinetask-insert-task= defaults to uppercase - =org-mobile-write-agenda-for-mobile= defaults to uppercase - =org-babel-examplify-region= lowercase I just looked for END vs end. So, unless there is overwhelming support for changing uppercase defaults into lowercase and a thorough patch, I am inclined towards preserving the existing behaviour. Changing just RESULTS keyword provides no benefit to making things consistent. Best, Ihor
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
> Timothy writes: > Hi Gyro, >> Consider Emerson’s quote: >> >> “A foolish consistency is the hobgoblin of little minds, adored >> by little statesmen and philosophers and divines. With >> consistency a great soul has simply nothing to do.” > I think applying a quote about how societal expectations and norms > can limit the capacity for greatness of individuals, to … > capitalisation is a bit of a stretch. > FWIW, I think it would be good to be internally > consistent. #+RESULTS is currently one of the few keywords > inserted in upper case. Unless there’s a good reason to > distinguish it from other keywords (perhaps an argument could be > made that it should be treated differently because it is usually > generated, not inserted by the user?), I’d be in favour of > changing the default to be consistent. What is the point of changing a default? Users can change to whatever they like, but a default is a default - i.e. remains fixed. Why a particular default arose belongs to peculiarities of history. Do people really want to revisit this year after year? The value of a default is irrelevant: what is important is that it does not change, once it is chosen, without some very good reason. I have not seen that reason in this particular case. The arguments of consistency are ephemeral.
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
On Mon, Jan 10, 2022 at 8:35 AM Timothy wrote: > > FWIW, I think it would be good to be internally consistent. #+RESULTS is > currently one of the few keywords inserted in upper case. Unless there’s a > good > reason to distinguish it from other keywords (perhaps an argument could be > made > that it should be treated differently because it is usually generated, not > inserted by the user?), I’d be in favour of changing the default to be > consistent. +1 for consistency. The Org parser does not care if the keywords are upper or lower case. So inserting the #+results keyword in lower-case would be a good change towards improving the consistency.
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Hi Gyro, > Consider Emerson’s quote: > > “A foolish consistency is the hobgoblin of little minds, adored by little > statesmen and philosophers and divines. With consistency a great soul has > simply > nothing to do.” I think applying a quote about how societal expectations and norms can limit the capacity for greatness of individuals, to … capitalisation is a bit of a stretch. FWIW, I think it would be good to be internally consistent. #+RESULTS is currently one of the few keywords inserted in upper case. Unless there’s a good reason to distinguish it from other keywords (perhaps an argument could be made that it should be treated differently because it is usually generated, not inserted by the user?), I’d be in favour of changing the default to be consistent. All the best, Timothy
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
On 2022-01-09 06:21 PM, Rudolf Adamkovič wrote: Thank you for providing me with such a clear explanation! To make my point clear, I do not care about whether Org uses upper case or lower case keywords, but I do care about consistency. Specifically, I think Emacs should not make new users fiddle with variables just to make its behavior internally consistent. Thus, while I do understand both the "lowercase religion" and the "uppercase religion", I do not understand the "inconsistency religion". Rudy Consider Emerson's quote: "A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines. With consistency a great soul has simply nothing to do." ;-) -gyro
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Tim Cross writes: > The point is, the begin v BEGIN issue is to some extent bordering on > becoming a religious argument and one which is unlikely to gain > consensus. While personally I agree with your point and for > consistency, I think the default should be lower case, it really > doesn't matter. Everyone will have their personal preferences and > while it is trivial to set to your preferred format, it is one of > those issues which will likely generate lots of noise with little > resolution. Thank you for providing me with such a clear explanation! To make my point clear, I do not care about whether Org uses upper case or lower case keywords, but I do care about consistency. Specifically, I think Emacs should not make new users fiddle with variables just to make its behavior internally consistent. Thus, while I do understand both the "lowercase religion" and the "uppercase religion", I do not understand the "inconsistency religion". Rudy -- "I love deadlines. I love the whooshing noise they make as they go by." -- Douglas Adams, The Salmon of Doubt Rudolf Adamkovič [he/him] Studenohorská 25 84103 Bratislava Slovakia
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Rudolf Adamkovič writes: > If I remember well, Org decided to suggest with lowercase keywords (and > use uppercase keywords in the manual, for some reason). Then, we should > change "org-babel-results-keyword" from "RESULTS" to "results". > > (1) Example #1 > > #+begin_src R :results verbatim :wrap example > […] > #+end_src > > #+RESULT: [<--- inconsistent] > #+begin_example > > […] > #+end_example > > (2) Example #2 > > #+begin_src R :results verbatim :wrap EXAMPLE > […] > #+end_src > > > #+RESULT: > > #+begin_EXAMPLE [< still inconsistent] > […] > #+end_EXAMPLE > > P.S. Org should not leak potentially sensitive information, such as > "/Users/salutis/", in the subject of its bug reports. > > Rudy > This is probably a can of worms not worth opening! >From a technical perspective, case does not matter. Originally, the 'styhle' was to use upper case letters for things like #+BEGIN et. al. (which is probably why they are in upper case in the manual). Then (I think it was with the change to the code to insert block markers) there was a change to use #+begin_*. However, I think for those who reverted to the old block insertion method (now based on tempo), you still get things in upper case. The point is, the begin v BEGIN issue is to some extent bordering on becoming a religious argument and one which is unlikely to gain consensus. While personally I agree with your point and for consistency, I think the default should be lower case, it really doesn't matter. Everyone will have their personal preferences and while it is trivial to set to your preferred format, it is one of those issues which will likely generate lots of noise with little resolution.
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Colin Baxter writes: > Change it for yourself. I did. > Please don't change the default. Why? -- "'Contrariwise,' continued Tweedledee, 'if it was so, it might be; and if it were so, it would be; but as it isn't, it ain't. That's logic.'" -- Lewis Carroll, Through the Looking Glass Rudolf Adamkovič [he/him] Studenohorská 25 84103 Bratislava Slovakia
Re: [BUG] Prefer lowercase #+results [9.5.2 (release_9.5.2-3-geb9f34 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
> Rudolf Adamkovič writes: > If I remember well, Org decided to suggest with lowercase keywords > (and use uppercase keywords in the manual, for some reason). > Then, we should change "org-babel-results-keyword" from "RESULTS" > to "results". Change it for yourself. Please don't change the default.