Re: [BUG] inserting notes at end

2022-07-27 Thread Tor Kringeland
Ihor Radchenko writes: > I get note after empty lines below the headline in both the cases. > This behavior is intentional according to org-log-beginning. I see. Maybe this could be noted in the docstring for org-add-note? If org-log-into-drawer is non-nil, then the behavior is different (the

Re: [PATCH] * lisp/org.el (org-store-log-note): Do not indent empty lines

2022-07-27 Thread Tor Kringeland
Ihor Radchenko writes: > See the attached patch. Thanks! This works as expected now.

[BUG] inserting notes at end

2022-07-26 Thread Tor Kringeland
If our Org file is #+begin_example * a heading text #+end_example And we insert an empty note, we get #+begin_example * a heading - Note taken on [2022-07-26 Tue 16:10] text #+end_example instead of the expected #+begin_example * a heading - Note taken on [2022-07-26 Tue 16:10] text

[WISH LIST] Remove leading spaces in notes

2022-07-26 Thread Tor Kringeland
Currently if you insert a note on a heading that has double newlines in it, the empty newlines will be padded with spaces. For example #+begin_example * heading - Note taken on [2022-07-26 Tue 16:00] \\ note with newlines it in #+end_example It would be nice to (if this is not

Re: [BUG] Avoid folding drawers using `org-clock-goto'

2022-07-23 Thread Tor Kringeland
Ihor Radchenko writes: > Could you please elaborate why you prefer not folding drawers in > `org-clock-goto'? If I already unfolded a drawer (for example with notes), then I want to keep it open, at least as long as the heading itself is unfolded. For example if I have #+begin_example * some

[BUG] Avoid folding drawers using `org-clock-goto'

2022-07-23 Thread Tor Kringeland
When calling `org-clock-goto' the drawers of the heading it goes to are closed, if they're open.

Re: Taking notes of videos in Emacs

2022-07-08 Thread Tor Kringeland
Gerardo Moro writes: > Is there something similar in Emacs? mpv.el [1] is a starting point. You can play videos from YouTube (and other websites) in mpv if you install yt-dlp [2] (or another youtube-dl fork). With a little bit of hacking you can get all the features of the package you mention

Re: [BUG] formatting at edges of link

2022-07-04 Thread Tor Kringeland
Ihor Radchenko writes: > All the examples above are not valid links. > Note that Org link consist of link itself and a description: > [[link][description]]. I was a bit fast in my explanation. I mean formatting the description, of course. > > Descriptions will be correctly formatted. > >

Re: [BUG] wrapping links

2022-07-04 Thread Tor Kringeland
Ihor Radchenko writes: > Could you please elaborate? > The above link (if changed to more correct [[https://orgmode.org][this > link looks ugly]] will be exported without the newlines and extra > spaces. Yes. I don't mean in export, but in org-mode itself. Since the second line in the example

[BUG] wrapping links

2022-07-03 Thread Tor Kringeland
When a link goes over a (real) line wrap for indented lines, the leading spaces get formatted as part of the link and this looks ugly. #+begin_example - [[this link looks ugly]] #+end_example It would be nice to at least have an option to disable formatting of the leading (and trailing)

[BUG] formatting at edges of link

2022-07-03 Thread Tor Kringeland
For example [[normal /italic/ normal]] formats correctly as a link, but [[/italic/]] doesn't format to italic. A workaround is to write /[[italic]]/ but sometimes the formatting is part of my link names, so it's a bit annoying to reformat to get correct formatting.

Re: [PATCH] Re: [BUG] Adding note to heading without newline at the end

2022-06-22 Thread Tor Kringeland
Ihor Radchenko writes: > Confirmed. > > Samuel, do you want to try fixing this? > It should be fairly easy to debug. Nice. But these are distinct bugs, it seems like. The one you sent a patch for earlier fixes the former bug (which is also present in Org 9.5). While my original problem is

Re: [PATCH] Re: [BUG] Adding note to heading without newline at the end

2022-06-21 Thread Tor Kringeland
Ihor Radchenko writes: > Aha. Not saving is an important piece of information. > (said the person with compulsive saving syndrome) Thanks! This fixes the bug (which was present in both Org 9.5 and 9.6) for me. However, my original bug, which is only present in Org 9.6, is still there. Do the

Re: [BUG] Adding note to heading without newline at the end

2022-06-20 Thread Tor Kringeland
Samuel Banya writes: > Unable to reproduce this bug with 'emacs -Q -L ./lisp -l org' on the > latest version of Org Mode Hmm ... this occurs to me both in Org 9.5 and in the latest Org version on Emacs 29. The error message I get says Before first headline at position 1 in buffer test.org

[BUG] Editing link hides text

2022-06-20 Thread Tor Kringeland
Using Org 9.6 with Emacs 29, write a link: [[123][test]] Most of the text will then be hidden, with "test" showing as a link, as expected. However if I remove the last ], the link highlighting disappears and only "test" is shown like regular text (/i.e./ instead of "[[123][test]" as would be

Re: [BUG] Adding note to heading without newline at the end

2022-06-20 Thread Tor Kringeland
Ihor Radchenko writes: > Can you reproduce the problem starting from emacs -Q? I did. The bug only occurs if there is no newline at the end. So for example if you open a new buffer and don't save it, the bug should occur. Similarly, in my own config (where I have enabled

[BUG] Adding note to heading without newline at the end

2022-06-19 Thread Tor Kringeland
Consider the following buffer #+begin_example * test #+end_example without a newline at the end. Calling `org-add-note' will result in an error and the note being placed /before/ the heading.

Re: [PATCH] Re: Change in `org-cycle-hook' breaks behavior

2022-05-28 Thread Tor Kringeland
Ihor Radchenko writes: > If you want all the drawers in all the children to be opened, you can > instead do the following: > > (let* ((headline (save-excursion (org-back-to-heading) > (org-element-at-point > (when headline > (org-fold-region > (org-element-property :begin

Re: [PATCH] Re: Change in `org-cycle-hook' breaks behavior

2022-05-28 Thread Tor Kringeland
Tor Kringeland writes: > a part of was opened. (So pressing TAB multiple times would first show > the outline with the first headline open, then the next would show > sub-headlines with their drawers open.) Correction: it wouldn't show the drawer of the headline on the first

Re: [PATCH] Re: Change in `org-cycle-hook' breaks behavior

2022-05-28 Thread Tor Kringeland
Ihor Radchenko writes: > Sure. Now, you need to call a different function to open all the drawers > unconditionally. That function is: > > (let* ((headline (save-excursion (org-back-to-heading) > (org-element-at-point))) >(section (org-element-lineage >

Re: [PATCH] Re: Change in `org-cycle-hook' breaks behavior

2022-05-27 Thread Tor Kringeland
Ihor Radchenko writes: > I assume that you have org-startup-folded set to 't. Then, what you are > seeing is caused by org-cycle-set-startup-visibility that folds all the > drawers unless org-startup-folded is set to 'showeverything. Yes, that is my customization :) > A more efficient way

[BUG] Hide leading space when hiding keyword

2022-05-26 Thread Tor Kringeland
`org-hidden-keywords' was introduced in Org 9.5 and allows hiding keywords like "#+title:" at the beginning of the buffer. However if you have something like #+title: A nice title " A nice title" is displayed at the beginning. AFAIK it's common to have a space after "#+title: " in Org files

Change in `org-cycle-hook' breaks behavior

2022-05-26 Thread Tor Kringeland
In Org 9.5, `org-cycle-hook' includes `org-cycle-hide-drawers', which hides the drawer after opening the contents of a headline with `org-cycle'. However, if you removed `org-cycle-hide-drawers' from the hook, `org-cycle' would show you the drawers (at least the PROPERTIES one). I relied on this

[BUG] `org-fill-paragraph' doesn't respect formatting

2021-12-07 Thread Tor Kringeland
Applying `org-fill-paragraph' to /e.g./ /Some text./ Some more text. when `sentence-end-double-space' is t removes the double space to a single space. The same happens with other formatting like *bold* and _underline_. In other instances it is more context aware. /E.g./ applying it to

Question about using `org-add-note' programmatically

2021-11-30 Thread Tor Kringeland
I'm trying to write a function that adds a note to the current `org-mode' heading. Naively I write it as (defun my/add-note () (interactive) (org-add-note) (insert "some text") (org-ctrl-c-ctrl-c)) but this does not work. Calling the function (on a recent build of Emacs 29)