[BUG] Manual says +2h works for date entry, but it doesn't

2021-12-06 Thread Robert Nikander
Hi,

The manual here: https://orgmode.org/manual/The-date_002ftime-prompt.html

says that you can use syntax like `+2h` when entering timestamps. It doesn’t 
seem to work, but `+2d` does. Is the manual simply out of sync with the
implementation?


Emacs  : GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 
Version 10.14.6 (Build 18G95))
 of 2021-11-18
Package: Org mode version 9.5.1 (9.5.1-g36086a @ 
/Users/rob/.emacs.d/elpa/org-9.5.1/)




[BUG] Eval src block does not redisplay inline image [9.5.1 (9.5.1-g36086a @ /Users/rob/.emacs.d/elpa/org-9.5.1/)]

2021-12-09 Thread Robert Nikander
I’m trying to use Org mode like a Jupyter notebook. I’ve got something working, 
but for graphic plots, I have to call `org-display-inline-images` after every 
call to `org-babel-execute-src-block`. I guess there is a work-around, 
described here:

https://stackoverflow.com/questions/54269390/how-to-always-show-inline-images 


But it seems like a bug. ?

My example block:

#+begin_src ess-julia :results output graphics file :file FILENAME.png :session 
*julia* :exports both
  using Plots
  x = 1:0.02:10; y = sin.(10x) 
  plot(x, y, label="test")
#+end_src

After running it inserts this:

#+RESULTS:
[[file:FILENAME.png]]

As described in the stackoverflow Q&A, I can then run 
`org-redisplay-inline-images` or other commands to show the image.

Rob



Emacs  : GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 
Version 10.14.6 (Build 18G95))
 of 2021-11-18
Package: Org mode version 9.5.1 (9.5.1-g36086a @ 
/Users/rob/.emacs.d/elpa/org-9.5.1/)



[BUG] adjacent italic and underline don't render correctly [9.5.1 (9.5.1-g36086a @ /Users/rob/.emacs.d/elpa/org-9.5.1/)]

2021-12-21 Thread Robert Nikander
I have:

(setq org-hide-emphasis-markers t)

…and the following does not render right. In the first line I see the ‘_’ 
characters around “underline”, and it doesn’t underline the text.
In the second line, it works correctly. Apparently it needs some intervening 
text (“foo” in this case). 

The first line should work, no?

— begin example org file —
* Test
Mix /italic/ _underline_.
Mix /italic/ foo _underline_.
— end example org file ---


Re: [BUG] adjacent italic and underline don't render correctly [9.5.1 (9.5.1-g36086a @ /Users/rob/.emacs.d/elpa/org-9.5.1/)]

2021-12-22 Thread Robert Nikander
Thank you for checking. I tried to reinstall the package, but it did not help, 
and it caused another problem where I could not quit emacs.

Details… I ran M-x list-packages, found and deleted my org package, quit emacs. 
Restarted emacs and I saw I had the builtin org (lower version: 9.4.4) and the 
bug I reported is gone. I tried reinstalling the 9.5.1 org package (after 
restarting emacs), and it installed, and then I couldn’t quit emacs without 
killing it. If I ran my usual quit command (save-buffers-kill-terminal) or 
tried to quit from the macOS menu, I got this message:

org-clock-kill-emacs-query: Symbol’s function definition is void: 
org-clocking-buffer

Also the bug I reported is back. 

Maybe I’ll just stick with the builtin org package 9.4.4.  

Am I supposed to somehow delete the builtin one when I install 9.5.1? Here is 
what the buffer looks like when I hit enter on the installed 9.5.1 package:

— begin paste —
Package org is installed.

 Status: Installed in ‘org-9.5.1/’,
 shadowing a built-in package (unsigned). Delete
Version: 9.5.1
Summary: Outline-based notes management and organizer
   Requires: emacs-25.1
   Homepage: https://orgmode.org
   Keywords: outlines hypermedia calendar wp 
 Maintainer: Bastien Guerry 
 Author: Carsten Dominik 
Other versions: 9.5.1 (gnu), 9.4.4 (builtin).
— end paste ---

Rob



> On Dec 22, 2021, at 9:32 AM, Ihor Radchenko  wrote:
> 
> Robert Nikander  <mailto:robert.nikan...@icloud.com>> writes:
> 
>> (setq org-hide-emphasis-markers t)
>> 
>> …and the following does not render right. In the first line I see the ‘_’ 
>> characters around “underline”, and it doesn’t underline the text.
>> In the second line, it works correctly. Apparently it needs some intervening 
>> text (“foo” in this case). 
>> 
>> The first line should work, no?
>> 
>> — begin example org file —
>> * Test
>> Mix /italic/ _underline_.
>> Mix /italic/ foo _underline_.
>> — end example org file ---
> 
> I am unable to reproduce it on latest main.
> 
> Note that I remember this error and I believe that fixed it by reverting
> the problematic commit. However, it was before 36086a. I suspect that
> you have a mixed installation of Org. Try to remove and re-install Org.
> 
> Best,
> Ihor



text after sub headings?

2021-12-23 Thread Robert Nikander
I see why this is not possible, given the text format of an org file. But I am 
curious if people think it would be useful. This is a bit off-topic maybe, but 
I’m imagining what I would do if I created something like org-mode using 
another underlying format.

Example: 

* Top
  Some text under “Top”
  ** A level-2 heading 
Text under level-2 heading
  ** Another level-2 heading
Text under the second level-2 heading
  More text under “Top”
  So if the level-2 headings were collapsed we would still see this.
  ** Could have more sub-headings here
  More top level text, etc.


Re: text after sub headings?

2021-12-23 Thread Robert Nikander
Max Nikulin wrote:
> Have you seen the following and links therein?
> https://orgmode.org/worg/org-faq.html#closing-outline-sections

No, I hadn't found that. Thanks. Those links answer my question.

Juan Manuel Macías wrote:
> It is an interesting question; however, I would say that this is not a
> useful or realistic structure. Regardless of the Org trees/subtrees and
> their folding ability (indicating that each thing is at a certain
> level), I think that a content will be more useful and intelligible if
> […]

I see your point.

Maybe it depends on how you use org-mode and how you imagine the meaning of the 
"*" items. I see some disagreement about this in the old threads that Max 
linked to. No need to rehash it deeply here again; I was just curious. 

The way I'm using org-mode so far, I'm not exporting to other formats, and I 
can see a use for collapsible sections in the middle of a larger chunk of text. 
I can already kind of do it with a "-" list item, like this. (Or other things 
like code blocks, etc)

* Heading
Top Text
Top Text
- Sub
  This can be hidden if I hit 'tab' key on "Sub".
More Top Text
More Top Text

If you view a "*" item as "book section", it's confusing. But if you view a "*" 
item as "collapsible thing", then it makes more sense. 





block folding - should this work?

2021-12-24 Thread Robert Nikander
I started reading about “blocks" in the manual. I wanted a chunk of text that I 
could hide, so I tried this:

* Test
Some text
#+BEGIN 
Hide this
#+END

Hitting TAB on the BEGIN line does nothing. But if I add a blank line before 
it, then hitting TAB hides and shows the block. Is that a bug? Or am I doing it 
wrong? Seems like it should work without the blank line.

* Test
Some text

#+BEGIN 
Hide this
#+END

M-x org-version => 9.5.1.


clock reports, group/rollup by tags, properties?

2023-02-07 Thread Robert Nikander
Hi,

I see some previous discussion about this years ago [1], but it looks like it 
never made it into the official code base. (?)

If I use `:scope agenda`, I get a column called “File” that is used as the top 
“group by” in the query. I don’t see a way to change that.

I’d like to see my time divided by different criteria, like the type of work, 
which I would define using properties or tags.

Does org-mode do this now? If not, would people want this feature, or was there 
a reason it was abandoned?

Rob

[1] https://lists.gnu.org/archive/html/emacs-orgmode/2011-05/msg00219.html





[BUG] M-S- does not adjust clock timestamps as described in docs [9.5.5]

2023-02-07 Thread Robert Nikander
Hi,

The docs say this about S-M + arrow keys on clock log lines. (In section: 8.4.1 
- Dates and Times > Clocking Work Time > Clocking Commands)

  ‘S-M-’ (‘org-timestamp-up’)
  ‘S-M-’ (‘org-timestamp-down’)
 On ‘CLOCK’ log lines, increase/decrease the timestamp at point and
 the one of the previous, or the next, clock timestamp by the same
 duration.  For example, if you hit ‘S-M-’ to increase a
 clocked-out timestamp by five minutes, then the clocked-in
 timestamp of the next clock is increased by five minutes.

But it doesn't seem to work like that. For example

   * Testing it out
   :LOGBOOK:
   CLOCK: [2023-02-07 Tue 12:35]--[2023-02-07 Tue 12:45] =>  0:10
   CLOCK: [2023-02-07 Tue 12:20]--[2023-02-07 Tue 12:30] =>  0:10
   CLOCK: [2023-02-06 Mon 12:20]--[2023-02-06 Mon 13:20] =>  1:00
   :END:

If I put point on the minutes of 12:30 (second line) and hit S-M-, it moves 
the time to 12:35, but nothing else moves. Based on the docs, I thought it 
would shift one of the other lines.

Rob


Emacs  : GNU Emacs 28.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 
Version 10.14.6 (Build 18G95))
 of 2022-09-12
Package: Org mode version 9.5.5 (release_9.5.5 @ 
/Applications/Emacs.app/Contents/Resources/lisp/org/)




Re: [BUG] M-S- does not adjust clock timestamps as described in docs [9.5.5]

2023-02-08 Thread Robert Nikander



> On Feb 8, 2023, at 5:14 AM, Ihor Radchenko  wrote:
> 
> Robert Nikander  writes:
> 
>> […]
>> 
>> If I put point on the minutes of 12:30 (second line) and hit S-M-, it 
>> moves the time to 12:35, but nothing else moves. Based on the docs, I 
>> thought it would shift one of the other lines.
> 
> S-M- only considers clock history during current Emacs session. Will
> clarifying this in the manual suffice for your use-case?
> 
> If not limiting the command to current clock history, we would need to
> look across every single Org file searching for intersecting clocks -
> extremely resource-intensive procedure.
> 
> Note that you can use agenda clock check to catch clock inaccuracies.

I’m pretty much a beginner with the clock features, so I don’t have an opinion 
yet on how it should work. But yes, it seems like clarifying the manual there 
would be an improvement. 

I don’t know what agenda clock check is. Is that a certain function, or agenda 
view? Searching the manual and functions for that term didn’t yield anything 
obvious.





emojis in tags?

2023-02-09 Thread Robert Nikander
Hi,

Does anyone else think it might be nice to allow emojis in tags? I used to use 
OmniFocus before I got into org-mode. I had some tags that were certain symbols 
that had meaning to me. 

Rob


Re: [FR] Allow emojis in tags (was: emojis in tags?)

2023-02-10 Thread Robert Nikander



> On Feb 10, 2023, at 6:23 AM, Ihor Radchenko  wrote:
> 
> Robert Nikander  writes:
> 
>> […]
> 
> It is not hard to do, but I am not sure about consequences of such a
> change in Org syntax.
> 
> I see no obvious downsides though.

I noticed that other potentially useful symbols do not work. For example, a 
string with an arrow symbol (a→b) does not parse as a tag.

I’d vote for also enabling things like the arrows, math symbols, and 
pictographs.

I sometimes don’t like how Emojis alter the line height, because to me it 
doesn’t look as nice when lines have different height. But if that can’t be 
controlled, and people don’t like it, then they are free to simply not use 
emojis. 

Rob







How is org-enforce-todo-dependencies supposed to work?

2023-02-11 Thread Robert Nikander
Hi,

I’m trying to use todo dependencies.  I created the following tree, and set the 
variable to `t` by evaluating the setq expression. But nothing changes. I can 
use S- to cycle the TODO state of “Test Project" (none - TODO - DONE) 
even though the children items are not DONE. Is that expected?

** TODO Test Project
:PROPERTIES:
:ORDERED: t
:END:
Test org-enforce-todo-dependencies. (setq org-enforce-todo-dependencies t)
*** DONE One
*** TODO Two
*** TODO Three

thanks,
Rob

(org-version) => 9.6.1
(emacs-version) => GNU Emacs 28.2





org-mode for code comments?

2023-04-10 Thread Robert Nikander
Hi,

I searched the internet and this doesn’t seem to exist. I would like to have 
something like the opposite of code blocks. I could edit a code file, and the 
comments would be in org-mode. I happen to be using C++ and lsp-mode at the 
moment.

//  This C++ comment is all org mode. The font formatting, colors, expand 
and collapse UI.
//  /italic/, *bold*, =code=, [[file:/Some/thing.org][links]], etc.
//  Lists:
//  1. apple
//  2. banana
//  * Headers
//  ** Subheaders
//  *** TODO Fix blah blah blah.
//  Tables, inline images, ...
void foo(int x, std::string str) { … }

Does this exist? I don’t know if Emacs has the necessary features to support 
it. 

Rob