[BUG] org-agenda-span treats 7 differently [9.4.6 (9.4.6-g3ba46c @ ~/.emacs.d/straight/build/org/)]

2023-01-12 Thread Eppo Math

Many thanks in advance for taking the time to read this!

Issue: In an org agenda block (fed to org-agenda-custom-commands), the
number 7 passed to org-agenda-span causes the resulting block to begin
on the first day of the week, ignoring org-agenda-start-day.

Expected Behaviour: org-agenda-start-day and org-agenda-span should be
options with independent behaviours.

Actual Behaviour: When org-agenda-span is set to 7, the given argument
org-agenda-start-day is ignored.

Steps to Reproduce:
1. Save the following to /any-path/test.el:
#+begin_src elisp
(defun my-generate-agenda-block (START SPAN)
"Generate an agenda block for testing"
`((org-agenda-start-day ,START)
(org-agenda-span ,SPAN)
(org-agenda-overriding-header
(concat "\norg-agenda-start-day: " ,START
"\norg-agenda-span: " (number-to-string ,SPAN)

(setq org-agenda-custom-commands
`(("t" "Test of Agenda Blocks" (
(agenda "" ,(my-generate-agenda-block "-2d" 7))
(agenda "" ,(my-generate-agenda-block "-2d" 5))
(agenda "" ,(my-generate-agenda-block "-5d" 7))
(agenda "" ,(my-generate-agenda-block "-5d" 5))
(agenda "" ,(my-generate-agenda-block "+1d" 7))
(agenda "" ,(my-generate-agenda-block "+1d" 5))

(defun my-org-agenda-test () (interactive) (org-agenda "a" "t"))
#+end_src
2. Run =emacs -Q -l /any-path/test.el= at a terminal.
3. Within Emacs, run =M-x my-org-agenda-test=.

Additional Notes:
1. The order of org-agenda-start-day and org-agenda-span is irrelevant.
2. The emacs manual does not say anything helpful for either variable.
3. I've only tested "+nd" and "-nd" syntax for org-agenda-start-day.
4. My ~init.el~ is irrelevent (bug present when run from =emacs -Q=).

Emacs : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 
3.24.30, cairo version 1.16.0)

of 2022-01-24, modified by Debian
Package: Org mode version 9.4.6 (9.4.6-g3ba46c @ 
~/.emacs.d/straight/build/org/)





Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,

2023-01-12 Thread Max Nikulin

On 07/01/2023 16:04, Ihor Radchenko wrote:


As I said, the requirement to get it into the core is re-creating
previous layout and bindings. The layout and bindings may be
customizable, but they must be available.


I would say, a layout that is not worse than the current one. Org menus 
may have more than 1 column and it is advantage for wide windows. A 
distant goal might be a menu that is more flexible and may adapt for 
single column suitable for a narrow side window.


Another issue is accessibility. Too long menus are likely terrible for 
users relying on Emacspeak. I have no idea how to deal with such case, 
perhaps a better organized hierarchy unveiled level by level. API 
conventions that allows to change menu implementation may be a rescue as 
well.


Tim Cross. Re: Proposal: 'executable' org-capture-templaes. Mon, 06 Jun 
2022 09:05:29 +1000 https://list.orgmode.org/87sfoi1xde@gmail.com/






Re: ob-shell intentions and paperwork (was Bash results broken?)

2023-01-12 Thread Max Nikulin

On 12/01/2023 00:02, Ihor Radchenko wrote:

I was not, thank you.  I've since pushed.


This:
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4f319088ba5f11d4b6adf808f39f11dfa52c08e4
?

It looks like you lost all the individual commits and commit messages in
the process.


Ihor, it is usual merge commit of a branch with multiple commits. Cgit 
shows combined changes, but commits was not squashed. The branch started at

dff9565c2c8bb7fe100c5278136d3de22ce41051 Bastien 2022-12-30 09:17:38 +0100

It would be better to do
git fetch
git rebase origin/main
before merging the branch to make git history more linear. To ensure 
fast forward merge it is possible to add --ff-only option to git merge.





Re: TODO state for heading intersection?

2023-01-12 Thread Jean Louis
* Samuel Wales  [2023-01-12 04:07]:
> i meant bulk.

It helped! After few deviations.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Re: Request to bump up the Org version in Elpa [

2023-01-12 Thread Ihor Radchenko
Bastien  writes:

> Kaushal, it should appear on GNU ELPA in a few hours.

Already there.

> Ihor, feel free to publish bugfix releases with no special permission
> in the future.

Noted, thanks!

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [bug] Org mode 9.6.1: Subtree export without body creates an empty code block on export

2023-01-12 Thread Ihor Radchenko
Kaushal Modi  writes:

> This issue is best explained with this small example.
>
> 1. Create this Org buffer:
>
> =
> #+options: author:nil toc:nil
>
> * Post 1
> :PROPERTIES:
> :EXPORT_FILE_NAME: foo
> :END:
> * Post 2
> =
>
> 2. Place the cursor at the end of :END:
> 3. C-c C-e C-s t A

Thanks for reporting!
Fixed, on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a52d0f091
Now, with a test.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [BUG] Shift-up/down move the cursor to end of timestamp

2023-01-12 Thread Johannes Dahl
On Wed, 7 Dec 2022 at 12:54, Ihor Radchenko  wrote:
>
> Daniel Clemente  writes:
>
> > Using a file with just one header:
> >
> > * something
> >   :CLOCK:
> >   CLOCK: [2022-12-01 Thu 17:15]--[2022-12-01 Thu 17:30] =>  0:15
> >   :END:
> >
> > If I put the cursor on the end timestamp (on the 3 of 17:30) and press
> > shift+up or shift-down, the timestamp is correctly adjusted by 5 minutes,
> > but the cursor jumps some characters to the right and stays at the right of
> > ]
> > It should stay on the same character (the 3), so that I can keep adjusting
> > the minutes with shift-up/down
>
> Thanks for reporting!
> Fixed on bugfix.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4dddbc143

I, too, was affected by this bug, and, with the release of org-mode 9.6.1, can
confirm that it has been fixed. However, the same problem (cursor is positioned
after closing bracket) occurs with the related commands org-shiftcontrolup and
org-shiftcontroldown. (For completeness: in 9.6.0 they were even slightly more
broken in that they shifted the timestamps in different directions.)

Johannes



Re: copying text from links makes it with a starting [[

2023-01-12 Thread General discussions about Org-mode.


> On Jan 12, 2023, at 15:45, Luca Ferrari  wrote:
> 
> On Tue, Dec 27, 2022 at 2:26 PM Ihor Radchenko  wrote:
>> 
>> Luca Ferrari  writes:
>> Could you please provide more details about what is happening?
>> What exactly do you do to copy the link?
>> See https://orgmode.org/manual/Feedback.html#Feedback
>> 
> 
> Imagine I've this org fragment:
> 
> Link: [[https://foo.com]]
> 
> where the link is displayed without brackets, in org mode.
> I place the point at the beginning of the first visibile character,
> hence the 'h', and the C-space M-e M-w and then go to another
> application and paste the content of the clipboard.
> I've seen that sometimes the link is copied as text, so both beginning
> and ending brackets are there, but with long links the ending brackets
> are not there, but it could be they I remove them accidentally.
> I would like to copy only the visible part, but I guess there's no
> solution unless I do something manually or configure a web package to
> open the link into another application.
> 
> 
> Luca

Hi Luca,

If all you want to do is to copy the (visible) URI without its surrounding 
brackets, then maybe you can take a look at how C-c C-l is implemented 
regarding how it gets the URI, and from there figure out how you can put the 
URI into the kill ring. 

Otherwise if you want to copy portions of the URI without also copying the 
opening brackets, then I suppose there might have to be specialized commands 
for C-w and friends that handles opening brackets? 

Best,


RY



Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects

2023-01-12 Thread Ihor Radchenko
Leo Butler  writes:

>> So, the test failure is real.
>>
>> https://orgmode.org/list/94980226-d29a-4969-8640-1143a1979...@bundesbrandschatzamt.de
>> might be related.
>
> Ihor,
>
> How do you want to treat the patch that was included? I think we should
> have something like that to catch errors like these. And the failing
> tests should be marked as known failures (that need to be fixed,
> obviously). I note that both failures 3 & 4 are related to org's
> built-in features.

Are you referring to "failures" in your attachment?
I think that your expectation is wrong here. Org does not clear the
"*Org-Babel Error Output*" buffer upon running next src block during
Emacs session - it is a good thing when you run multiple src blocks and
want to see the errors/warnings produced.

So, if we want to do some definitive assertions about "*Org-Babel Error
Output*", we could kill "*Org-Babel Error Output*" (if any) before
running the test that checks this buffer.

As for ob-octave failures, I suspect that octave throws some warnings on
CI machine. I currently don't have podman setup to run CI tests locally
- you may try to play with the problematic ob-octave tests to identify
the problem as described in https://git.sr.ht/~bzg/org-mode-tests/

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: copying text from links makes it with a starting [[

2023-01-12 Thread tomas
On Thu, Jan 12, 2023 at 08:42:54AM +0100, Luca Ferrari wrote:
> On Tue, Dec 27, 2022 at 2:26 PM Ihor Radchenko  wrote:
> >
> > Luca Ferrari  writes:
> > Could you please provide more details about what is happening?
> > What exactly do you do to copy the link?
> > See https://orgmode.org/manual/Feedback.html#Feedback
> >
> 
> Imagine I've this org fragment:
> 
> Link: [[https://foo.com]]
> 
> where the link is displayed without brackets, in org mode.
> I place the point at the beginning of the first visibile character,
> hence the 'h', and the C-space M-e M-w and then go to another
> application and paste the content of the clipboard.
> I've seen that sometimes the link is copied as text, so both beginning
> and ending brackets are there, but with long links the ending brackets
> are not there, but it could be they I remove them accidentally.
> I would like to copy only the visible part, but I guess there's no
> solution unless I do something manually or configure a web package to
> open the link into another application.

Perhaps what's needed is to teach M-e (org-forward-sentence) to handle
this.

The challenge still is that you don't quite know whether the link
"consumer" wants to have the wrapping [[...]] or not, since the
consumer isn't known at "copy" time.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: ob-shell intentions and paperwork (was Bash results broken?)

2023-01-12 Thread Ihor Radchenko
Matt  writes:

>   On Wed, 11 Jan 2023 12:02:42 -0500  Ihor Radchenko  wrote --- 
>  > It looks like you lost all the individual commits and commit messages in
>  > the process.
>  > 
>  > Could you please revert 4f319088ba5 and re-push in such a way that
>  > individual commits do appear on main?
>
> Goodness!  Sorry!  Thanks for catching that.  I reverted the merge and then 
> applied the patches.

Thanks! Looks fine now.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [BUG] Emacs Org rendering glitch of '*' in '=' inline markup

2023-01-12 Thread Ihor Radchenko
Johan Bolmsjö  writes:

> Org mode renders the following line in bold between the asterisks in the Emacs
> window. It seems to be the last dot after the first asterisk that triggers the
> assumed rendering bug.
>
> ┌
> │ =org-*.css= and =org-*.css.el=
> └
>
> On the other hand, the same line exports properly with both the ASCII and HTML
> exporters.

Confirmed.

This is a known problem resulting from Org fontification limitations.
See https://orgmode.org/list/87ee7c9quk.fsf@localhost for WIP fix.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at