Re: Strategic time planing: Breaking down EFFORT property

2023-10-04 Thread Dr. Arne Babenhauserheide

Sven Bretfeld  writes:

> Ihor Radchenko  writes:
>> For weekly/monthly/total, you can use clock tables to summarize the time
>> spend on different projects during the week/month/in total. See
>> https://orgmode.org/manual/The-clock-table.html
>>
>> You can display additional property values in the clock table using
>> :properties attribute. That will allow seeing clocked time and your
>> estimates stored in EFFORT_* properties.
>
> I think this is what I'm looking for. I considered clock tables to be
> only for reviews, not planning. But I'm just playing with the feature
> and seem to be able to do what I want.

Can you share your setup once it is working as you want it?

What you are doing is much more complex (and useful) than what I used
EFFORT for and I would like to check whether I can adapt part of it.

I usually plan with a gantt chart in a plantuml code block:

#+begin_src plantuml :file THE-TITLE-gantt.png
@startgantt
title THE TITLE
saturday are closed
sunday are closed
2023-08-02 is closed

ganttDiagram {
  task {
BackGroundColor GreenYellow
LineColor Green
unstarted {
  BackGroundColor Fuchsia
  LineColor FireBrick
}
  }
}


' see https://plantuml.com/gantt-diagram
Project starts at 2023-09-18
[init] on {Arne:74%} lasts 2 days
[logging] on {Arne:74%} lasts 1 day
[config] on {Bera:80%} lasts 2 days
[scheduling] on {Arne:74%} lasts 1 day
[documentation] on {Arne:74%} lasts 1 day

[logging] starts at [init]'s end 
[config] starts at [init]'s end
[scheduling] starts at [logging]'s end
[documentation] starts at [scheduling]'s end

@endgantt
#+end_src

This doesn’t have the nice org-mode integration, though.

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de


signature.asc
Description: PGP signature


Re: Strategic time planing: Breaking down EFFORT property

2023-10-04 Thread Sven Bretfeld


Ihor Radchenko  writes:

> Sven Bretfeld  writes:
>
> I am not sure what you mean by `org-clock-alarm'. We have
> `org-clock-sound', which you need to customize for alarm to be played
> when clocked time exceeds EFFORT.

That's what I mean. 

> For weekly/monthly/total, you can use clock tables to summarize the time
> spend on different projects during the week/month/in total. See
> https://orgmode.org/manual/The-clock-table.html
>
> You can display additional property values in the clock table using
> :properties attribute. That will allow seeing clocked time and your
> estimates stored in EFFORT_* properties.

I think this is what I'm looking for. I considered clock tables to be
only for reviews, not planning. But I'm just playing with the feature
and seem to be able to do what I want.

Thank you

Sven




Re: Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX?

2023-10-04 Thread Juan Manuel Macías
Ihor Radchenko writes:

> Further, we also provide :environment and :options attributes that do
> the same thing, but without special treatment of standard
> t/multicolumn/wrap/sideways/nil values in :float.

t/multicolumn/wrap/sideways/nil... and any arbitrary value (see lines 14125
and 14262 in org-manual.org).

>>> What we might do it to introduce something like a new :wrap attribute:
>>>
>>> #+attr_latex: :wrap subfigure,{\textwidht}
>
> So, it might be even better idea to extend :environment/:options
> attributes to more elements - their names make more sense and the values
> do not have a pre-defined special meanings.

Currently it is not possible in inline images (if I don't miss anything) this:

#+ATTR_LaTeX: :environment minipage :options {\textwidth}
[[file:/usr/share/texmf-dist/tex/latex/mwe/example-image-a.jpg]]

Implementing :environment/:options here would result in redundancy with:

#+ATTR_LaTeX: :float minipage :placement {\textwidth}
[[file:/usr/share/texmf-dist/tex/latex/mwe/example-image-a.jpg]]

which produces the same.

In tables there is more consistency because :float is a float
environment (table or any arbitrary value) and :environment is a table
environment (tabular or any arbitrary value). Here :placement :options
and :align act as what is expected of them:

#+ATTR_LaTeX: :environment foo :float var :placement [!h] :options [blah] 
:align 
|a|a|a|a|

===>

\begin{var}[!h]
\centering
\begin{foo}[blah]{}
a & a & a & a\\[0pt]
\end{foo}
\end{var}
\end{document}

-- 
Juan Manuel Macías

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com




Re: [PATCH] ob-maxima.el, etc. (was Re: [MAINTENANCE] On how much we can expose internals into defcustom)

2023-10-04 Thread Leo Butler
On Wed, Oct 04 2023, Ihor Radchenko  wrote:

> Leo Butler  writes:
>
>> Attached is:
>>
>> - my previous patch, rebased against the latest HEAD and only modified
>>   to include a patch to etc/ORG-NEWS
>> - a patch to the worg docs that corrects the urls
>> - a patch to the worg docs that documents the new header arguments and
>>   provides examples of usage (two new graphics files are included as
>>   part of that patch).
>
> Thanks!
> Applied, onto main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2ba45fcb7
>
> Updated Worg as well:
> https://git.sr.ht/~bzg/worg/commit/16ef094a
> https://git.sr.ht/~bzg/worg/commit/525a1355

Thanks, Ihor, for your time and feedback.

Leo


Completion of links to man pages

2023-10-04 Thread Max Nikulin

Hi,

I am unsure if the code below is appropriate for :complete property of 
"man" link. It does not rely on any double-dash functions or variables, 
but it still uses some implementation details since there is no suitable 
high level functions in man.el and woman.el from Emacs.


(defun org-man-complete ( _arg)
  "Helper for completion of links to man pages."
  (concat
   "man:"
   (let ((completion-ignore-case t)) ; See `man' comments.
 (funcall
  (if (eq org-man-command 'woman)
  #'org-man--complete-woman
#'org-man--complete-man)
  "Manual entry: "

(defun org-man--complete-man (prompt)
  (require 'man)
  (let (Man-completion-cache)
(completing-read
 prompt
 'Man-completion-table)))

(defun org-man--init-woman-cache ( re-cache)
  (unless (and (not re-cache)
   (or
(and woman-expanded-directory-path
 woman-topic-all-completions)
(woman-read-directory-cache)))
(setq woman-expanded-directory-path
  (woman-expand-directory-path woman-manpath woman-path))
(setq woman-totic-all-completions
  (woman-topic-all-completions woman-expand-directory-path))
(woman-write-directory-cache)))

(defun org-man--complete-woman (prompt)
  (require 'woman)
  (org-man--init-woman-cache)
  (completing-read prompt woman-topic-all-completions))




Re: Strategic time planing: Breaking down EFFORT property

2023-10-04 Thread Ihor Radchenko
Sven Bretfeld  writes:

> ...
> Now, it is the beginning of the first week of October. I make my weekly
> planning and decide to spent 15 hours of this week with Project 1 and 5
> with Project two. Today I would want to work on Project 1 for 4 hours, 3
> on Project 2. I'm clocking in to Project 1, setting a org-clock-alarm to
> remind me when it is time to switch to Project 2: 
>
> * Project 1
>   :PROPERTIES:
>   :EFFORT_TOTAL: 100:00
>   :EFFORT_THIS_MONTH: 54
>   :EFFORT_THIS_WEEK: 15
>   :EFFORT_TODAY: 4
>   :CLOCK_MODELINE_TOTAL: today
>   :END:
>   DEADLINE: <2023-12-24>
> ...
> Does anybody have an idea how to realize this scenario?

I am not sure what you mean by `org-clock-alarm'. We have
`org-clock-sound', which you need to customize for alarm to be played
when clocked time exceeds EFFORT.

For weekly/monthly/total, you can use clock tables to summarize the time
spend on different projects during the week/month/in total. See
https://orgmode.org/manual/The-clock-table.html

You can display additional property values in the clock table using
:properties attribute. That will allow seeing clocked time and your
estimates stored in EFFORT_* properties.

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



Re: [BUG] wrong-type-argument integer-or-marker-p nil [9.6.8 ( @ /Users/dirkjimtheis/.emacs.d/elpa/org-9.6.8/)]

2023-10-04 Thread Ihor Radchenko
Dirk Oliver Theis  writes:

> When I re-loaded my org file after killing the buffer (because Org got
> confused and behaved erratically), this appeared:
>
> ⛔ Warning (org-element-cache): org-element--cache: Org parser error in
> rydberg-jl.org::32516. Resetting.
>  The error was: (wrong-type-argument integer-or-marker-p nil)
>  Backtrace:
> nil
>  Please report this to Org mode mailing list (M-x org-submit-bug-report).

Thanks for reporting!
May you please set `debug-on-error' to t in your config and post the
backtrace next time you see the error?

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



Re: [BUG] backtrace nil error bug [9.7 (9.7-??-e90a8a69a @ /Users/fixerfixingfix/.emacs.d/.local/straight/build-30.0.50/org/)]

2023-10-04 Thread Ihor Radchenko
carlos monteiro  writes:

> Emacs  : GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin23.1.0, NS 
> appkit-2485.20 Version 14.1 (Build 23B5046f))
> of 2023-09-29
> Package: Org mode version 9.7 (9.7-??-e90a8a69a @ 
> /Users/fixerfixingfix/.emacs.d/.local/straight/build-30.0.50/org/)

> backtrace nil error bug

Thanks for reporting, but may you please also post the warning text?

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



Re: [BUG] Warning (org-element-cache): org-element--cache: Warning(Checkliste-Updates.txt): Org parser error in Checkliste-Updates.txt [9.7-pre (release_9.6.9-790-ge42b7a @ /home/grfz/src/org-mode/lis

2023-10-04 Thread Ihor Radchenko
Gregor Zattler  writes:

> Dear org mode maintainers, developers, Ihor, I caught the
> following warning/backtrace while calling
> 'my/org-goto-agenda-heading´ which in turn is just
> "(org-refile '(4))".
>
> HTH/Ciao; Gregor 
>
>  ■  Warning (org-element-cache): org-element--cache: 
> Warning(Checkliste-Updates.txt): Org parser error in 
> Checkliste-Updates.txt::94. Resetting.
>  The error was: (wrong-type-argument integer-or-marker-p nil)

Thanks for reporting!
May you please set `debug-on-error' to t in your config and report the
full backtrace next time you see the error? It is currently not possible
to judge what caused the problem.

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



Re: [PATCH] update urls in ob-doc-maxima.org

2023-10-04 Thread Ihor Radchenko
Leo Butler  writes:

> The current project urls in ob-doc-maxima.org are out-of-date (the .net
> urls redirect to the new .io ones). The project image file has moved and
> no longer loads. This patch corrects those problems.

For record.
Applied, onto master.
https://git.sr.ht/~bzg/worg/commit/16ef094a

The applied patch is not from here, but a part of another patchset in
https://orgmode.org/list/878r8lvwsk@t14.reltub.ca

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



Re: ICalendar export

2023-10-04 Thread Henrik Frisk
Den sön 17 sep. 2023 kl 11:49 skrev Ihor Radchenko :

> Jack Kamm  writes:
>
> >> Does the attached patch fix the problem for you?
> >
> > I can reproduce the bug by calling `org-icalendar-export-current-agenda'
> > in my agenda buffer. It seems to mainly happen when subsequent agenda
> > entries originate from different files.
> >
> > Ihor's patch fixes the problem on my end.
>
> Thanks for testing!
> Applied, onto main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=14bde5aba
> Fixed.
>
> Thank you both, I ran in to some other work issues, sorry for not replying
earlier. Thanks for fixing Ihor!

/Henrik


Re: Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX?

2023-10-04 Thread Ihor Radchenko
Juan Manuel Macías  writes:

>> I am not sure about obsolete - I see not reason to obsolete the intended
>> use case. Your example is rather an abuse.
>
> Why abuse? First, it works like a charm. Second, if :float can support
> any string as an environment name, why not minipage or subfigure? As for
> :placement, the term would seem more precise to me if it were really
> "placement" (as :align in tables is actually "align"), not LaTeX code
> passed directly after the \begin{...}. That a user can put things like
> this (I do it often, and I think I'm not the only one):
>
> :placement [htbp]\SomeExtraLaTeXCode...
>
> it is a consequence of the above. It is not an "orthodox" use (I mean,
> it's not described in the manual), but it works without problems. Again,
> I don't want to seem too picky about the names, but a user who doesn't
> understand the source code might think that :placement only supports
> things like [htbp]. My idea here is: instead of implementing new
> features, recycle and take advantage of those that arise unexpectedly
> :-). Although :placement was created thinking about putting code related
> to placement figures, as it is implemented I would have called it
> :latex-code or something similar.

:float is only used for (1) tables; (2) src-blocks; (3) inline images
that are a sole element in their paragraph. But not for other Org syntax
elements - you cannot, for example, wrap a paragraph or heading into
custom environment with :float.

Further, we also provide :environment and :options attributes that do
the same thing, but without special treatment of standard
t/multicolumn/wrap/sideways/nil values in :float.

>> What we might do it to introduce something like a new :wrap attribute:
>>
>> #+attr_latex: :wrap subfigure,{\textwidht}

So, it might be even better idea to extend :environment/:options
attributes to more elements - their names make more sense and the values
do not have a pre-defined special meanings.

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



Re: [PATCH] Clarify that REST is not supported on the start TIME in a time-range timestamp.

2023-10-04 Thread Ihor Radchenko
"Tom Alexander"  writes:

> Potentially related, org-mode is accepting this malformed timestamp from[1]:
> ```
> <2016-02-14 Sun ++y>
> ```
>
> The org-mode documentation[2] only includes REST with TIME, defining TIME as 
> "H:MMREST". The above does not have any TIME but it accepts the timestamp 
> anyway:
> ...
> Perhaps that grammar is wrong and REST needs to be separated from TIME?

We have no internal consistency here, AFAIR.
The actual matching is done with

(defconst org-element--timestamp-regexp
  (concat org-ts-regexp-both
  "\\|"
  "\\(?:<[0-9]+-[0-9]+-[0-9]+[^>\n]+?\\+[0-9]+[dwmy]>\\)"
  "\\|"
  "\\(?:<%%\\(?:([^>\n]+)\\)>\\)")
  "Regexp matching any timestamp type object.")

with org-ts-regexp-both matching

(rx (seq
   (= 4 digit) "-" (= 2 digit) "-" (= 2 digit)
   (optional " " (*? nonl

(and also brackets)

Then, `org-element-timestamp-parser' looks for DATE/TIME/REPEATERS/etc
inside the above match, disregarding any order:

(string-match

"[012]?[0-9]:[0-5][0-9]\\(-\\([012]?[0-9]\\):\\([0-5][0-9]\\)\\)"
date-start)

(string-match "\\([.+]?\\+\\)\\([0-9]+\\)\\([hdwmy]\\)"
 raw-value)

(string-match "\\(-\\)?-\\([0-9]+\\)\\([hdwmy]\\)" raw-value)

However, not all the Org code is using org-element parser yet. Certain
parts of Org are matching manually using a separate, more strict
regexps, like org-ts-regexp0, org-ts-regexp1, ...

So, we chose to use a more strict definition in org-syntax for the time
being, before we consolidate things together in more uniform ways.

As for the problem with REST you raised, I am inclined to remove it from
syntax doc for the time being - it only creates more confusion,
unfortunately.

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



Re: [BUG] org-agenda column view error: wrong type markerp, nil [9.6.9 ( @ /path/to/org-9.6.9/)]

2023-10-04 Thread Ihor Radchenko
John Borwick  writes:

> Hello! After updating org-mode, when I do the below:
>
>   1. Run a custom org-agenda =C-c a w= that has a column view format. (This 
> works correctly)
>   2. Open a different buffer
>   3. Re-run org-agenda
>
> I get the error =Wrong type argument: markerp, nil=.
>
> Using the debugger, I found the error occurred in =org-colview.el=. I no 
> longer have the error when using the below workaround.
>
> #+begin_src patch
> --- #
> +++ #
> @@ -525,6 +525,8 @@
>(setq header-line-format org-previous-header-line-format)
>(kill-local-variable 'org-previous-header-line-format)
>(remove-hook 'post-command-hook #'org-columns-hscroll-title 'local))
> +(setq org-columns-begin-marker (make-marker))
>  (set-marker org-columns-begin-marker nil)

Thanks for reporting! The reproducer is not sufficient to replicate the
bug on my side, but the code can indeed fail with the error you are
seeing.

I applied an alternative patch onto bugfix:
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=bd3705c05

Let me know if the patch fixes the problem for you.

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



Re: [PATCH] ob-maxima.el, etc. (was Re: [MAINTENANCE] On how much we can expose internals into defcustom)

2023-10-04 Thread Ihor Radchenko
Leo Butler  writes:

> Attached is:
>
> - my previous patch, rebased against the latest HEAD and only modified
>   to include a patch to etc/ORG-NEWS
> - a patch to the worg docs that corrects the urls
> - a patch to the worg docs that documents the new header arguments and
>   provides examples of usage (two new graphics files are included as
>   part of that patch).

Thanks!
Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2ba45fcb7

Updated Worg as well:
https://git.sr.ht/~bzg/worg/commit/16ef094a
https://git.sr.ht/~bzg/worg/commit/525a1355

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



Strategic time planing: Breaking down EFFORT property

2023-10-04 Thread Sven Bretfeld
Hi everybody

My aim is to create workload plans distributing large projects over
several months. These are considered to distribute the
total effort of several projects into monthly, weekly and daily
planing. I cannot figure out how to do this.

Guess I have two projects, both with a deadline at the end of the year,
one project has a time estimate of 100 hours, the second 50 hours:

* Project 1
  :PROPERTIES:
  :EFFORT: 100:00
  :END:
  DEADLINE: <2023-12-24>

* Project 2
  :PROPERTIES:
  :EFFORT: 50:00
  :END:
  DEADLINE: <2023-12-24>

In order to get them done in time, I would assign a certain workload to
the three months Oct, Nov, Dec. Say, with an unequal distribution:

Project 1:
   Oct: 54 hours
   Nov: 16 hours
   Dec: 30 hours

Project 2:
   Oct: 10 hours
   Nov: 25 hours
   Dec: 15 hours

Now, it is the beginning of the first week of October. I make my weekly
planning and decide to spent 15 hours of this week with Project 1 and 5
with Project two. Today I would want to work on Project 1 for 4 hours, 3
on Project 2. I'm clocking in to Project 1, setting a org-clock-alarm to
remind me when it is time to switch to Project 2: 

* Project 1
  :PROPERTIES:
  :EFFORT_TOTAL: 100:00
  :EFFORT_THIS_MONTH: 54
  :EFFORT_THIS_WEEK: 15
  :EFFORT_TODAY: 4
  :CLOCK_MODELINE_TOTAL: today
  :END:
  DEADLINE: <2023-12-24>

* Project 2
  :PROPERTIES:
  :EFFORT_TOTAL: 50:00
  :EFFORT_THIS_MONTH: 10
  :EFFORT_THIS_WEEK: 5
  :EFFORT_TODAY: 3
  :CLOCK_MODELINE_TOTAL: today
  :END:
  DEADLINE: <2023-12-24>

Does anybody have an idea how to realize this scenario? Is there a
solution that I overlook? I'm not a elisp programmer and have just
started to use org-clock, but to me the solution seems to involve breaking down 
the
EFFORT property into several sub-properties as shown above. Of course,
each project has several sub-tasks feeding the EFFORT_TODAY property.

Thanks for help,

Sven

-- 
Sven Bretfeld
Department of Philosophy and Religious Studies
NTNU Trondheim