Re: Links to javascript-based websites from orgmode.org: Paypal and Github

2022-06-29 Thread Richard Stallman
[[[ To any NSA and FBI agents reading my email: please consider]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > Yes, sad to say they should not directly offer donation methods.

  > So they should rather link to liberapay, so it is not a direct offer?

You can't make a serious point by twisting words.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





Re: org-agenda-prefix-format and tab stops

2022-06-29 Thread Samuel Wales
i am not understanding what you are trying to do.  do you have headers
before other columns?  are you perhaps looking for
org-agenda-todo-keyword-format ?  or is it the prefix format that is
varying for you?


On 6/29/22, Michael Maurer  wrote:
> hi,
>
> I've discovered org-agenda-prefix-format, but can't figure out how to
> add a tab-stop after every todo-item. So basically that the headlines
> are aligned regardless of the character-length of the todo-item. My
> current setup looks like this:
>
> (setq org-agenda-prefix-format
>   '(
> (agenda  . "  %?-12t% s")
> (timeline  . "  % s")
> (todo  . "  %i %-12:c")
> (tags  . " %i %-12:c")
> (search . " %i %-12:c"))
>
> but messing around with the -12 variable doesn't seem to change
> anything. Probably missing something.
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



Re: Alternatives to clocking in/out for reporting time

2022-06-29 Thread Samuel Wales
i said clocked notation, but i meant closed notation.  clocked
notation, i am not sure of.

On 6/29/22, Samuel Wales  wrote:
> a few things taht are probably all completely obvious or investigated
> or irrelevant just in case.  just brainstorm.
>
> do you have everything relevant in the same subtrees?  i.e. not
> wanting granular, can you search upward for a dominating entry kind of
> like git searching upward for the .git dir or so?  property drawer
> could control what's a dominating entry.  you probably thoguht of this
> or of having whatever categories as tags or categories in entries
> though. in any case that would clock.  you could even have clocking
> clock into that no matter wher eyou are via some timer in principle.
> just a brainstorm.  you said dynamic som perhaps there is no
> dominating entry for each category though.
>
> org-time-stamp-rounding-minutes and org-clock-rounding-minutes .  i
> presume you don't find them relevant.
>
> reminder: inactive ts in the clocked notation is usualy treated
> separately by org [i.e. not hte same type of ts] from bare ia.
>
> perhaps some kind of text property in the following could categorize
> entries and then org can sum them perhaps via some hook you'd
> populate.  it might be possible in principle to re-create most of the
> old agenda L timeline view, but with multiple files instead of a
> single file and with a search filter, by using the search agenda view,
> as there is some intermediate function, perhaps
> org-agenda-before-sorting-filter-function.  idk if you neeed multiple
> bare ia tses [or of various types of tses perhaps if you do decide you
> need more than bare ia] per entry but doing so is probalby possible
> merely by having that function add the duplicates.  the ts would be
> put in the prefix format.  you'd have to have custom sorting by
> whichever ts you are recording [in the total list] for each entry; idk
> if that is straightforward.
>
> above probably useless but just in case somethinghtere is relevant.
>
>  6/29/22, Russell Adams  wrote:
>> I make extensive use of timestamps for billing (timesheet)
>> purposes. I'm looking to automate this more, and I find the existing
>> clocking system inadequate. I'm hoping someone can point me in the
>> right direction.
>>
>> Today I have log mode enabled so that each time I close a TODO item,
>> it records the date and time it was closed. At regular intervals while
>> working I add inactive timestamps to my notes. I've mapped that to a
>> single key, so it's quite fast. If I switch tasks, have an update,
>> made progress I want to note to myself, or leave and return I add an
>> inactive timestamp. I have well over 1000 inactive timestamps in my
>> current file.
>>
>> Later I can open my agenda view on the working file, choose my
>> timespan (week or month), enable log mode to show when items were
>> closed, and then enable inactive timestamps to view all of the
>> timestamps. This itemizes all the events organized by time into a
>> timeline.
>>
>> It's fairly straightforward from that timeline to count my hours based
>> on the record of where I spent my time. It is unfortunately a very
>> manual process.
>>
>> I find Org's clocking to be too detailed, and that it doesn't play
>> well with dynamically organized hierarchies of notes. I frequently
>> create and close subtasks, or switch parts of the tree. Clocking each
>> one is too much overhead, and too granular. I don't need to provide
>> down to the minute reports of each item. It also doesn't appear to
>> allow rounding of values, so I still have to adjust the results.
>>
>> What I envision is a way to count items in the agenda view to produce
>> a time report. Counting any inactive timestamp as 15 minutes, where if
>> a half hour or more is logged I round up to bill the hour. Closed TODO
>> items should count toward billing that whole hour. Clearly this should
>> be customized.
>>
>> The point is that I'm not worried about accounting time by task,
>> instead I'm aggregating tasks into accounting by whole hours.
>>
>> I'm looking at org-element, and it appears I'd have to do my own
>> agenda style scan of the whole tree to find items to classify by
>> hour. While I'm somewhat proficient at elisp, that sounds like a steep
>> wall to climb.
>>
>> Is there an iterative way to review items in an agenda view so I can
>> do the math to produce a report?
>>
>> --
>> Russell Adamsrlad...@adamsinfoserv.com
>> https://www.adamsinfoserv.com/
>>
>>
>
>
> --
> The Kafka Pandemic
>
> A blog about science, health, human rights, and misopathy:
> https://thekafkapandemic.blogspot.com
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



Re: Alternatives to clocking in/out for reporting time

2022-06-29 Thread Samuel Wales
a few things taht are probably all completely obvious or investigated
or irrelevant just in case.  just brainstorm.

do you have everything relevant in the same subtrees?  i.e. not
wanting granular, can you search upward for a dominating entry kind of
like git searching upward for the .git dir or so?  property drawer
could control what's a dominating entry.  you probably thoguht of this
or of having whatever categories as tags or categories in entries
though. in any case that would clock.  you could even have clocking
clock into that no matter wher eyou are via some timer in principle.
just a brainstorm.  you said dynamic som perhaps there is no
dominating entry for each category though.

org-time-stamp-rounding-minutes and org-clock-rounding-minutes .  i
presume you don't find them relevant.

reminder: inactive ts in the clocked notation is usualy treated
separately by org [i.e. not hte same type of ts] from bare ia.

perhaps some kind of text property in the following could categorize
entries and then org can sum them perhaps via some hook you'd
populate.  it might be possible in principle to re-create most of the
old agenda L timeline view, but with multiple files instead of a
single file and with a search filter, by using the search agenda view,
as there is some intermediate function, perhaps
org-agenda-before-sorting-filter-function.  idk if you neeed multiple
bare ia tses [or of various types of tses perhaps if you do decide you
need more than bare ia] per entry but doing so is probalby possible
merely by having that function add the duplicates.  the ts would be
put in the prefix format.  you'd have to have custom sorting by
whichever ts you are recording [in the total list] for each entry; idk
if that is straightforward.

above probably useless but just in case somethinghtere is relevant.

 6/29/22, Russell Adams  wrote:
> I make extensive use of timestamps for billing (timesheet)
> purposes. I'm looking to automate this more, and I find the existing
> clocking system inadequate. I'm hoping someone can point me in the
> right direction.
>
> Today I have log mode enabled so that each time I close a TODO item,
> it records the date and time it was closed. At regular intervals while
> working I add inactive timestamps to my notes. I've mapped that to a
> single key, so it's quite fast. If I switch tasks, have an update,
> made progress I want to note to myself, or leave and return I add an
> inactive timestamp. I have well over 1000 inactive timestamps in my
> current file.
>
> Later I can open my agenda view on the working file, choose my
> timespan (week or month), enable log mode to show when items were
> closed, and then enable inactive timestamps to view all of the
> timestamps. This itemizes all the events organized by time into a
> timeline.
>
> It's fairly straightforward from that timeline to count my hours based
> on the record of where I spent my time. It is unfortunately a very
> manual process.
>
> I find Org's clocking to be too detailed, and that it doesn't play
> well with dynamically organized hierarchies of notes. I frequently
> create and close subtasks, or switch parts of the tree. Clocking each
> one is too much overhead, and too granular. I don't need to provide
> down to the minute reports of each item. It also doesn't appear to
> allow rounding of values, so I still have to adjust the results.
>
> What I envision is a way to count items in the agenda view to produce
> a time report. Counting any inactive timestamp as 15 minutes, where if
> a half hour or more is logged I round up to bill the hour. Closed TODO
> items should count toward billing that whole hour. Clearly this should
> be customized.
>
> The point is that I'm not worried about accounting time by task,
> instead I'm aggregating tasks into accounting by whole hours.
>
> I'm looking at org-element, and it appears I'd have to do my own
> agenda style scan of the whole tree to find items to classify by
> hour. While I'm somewhat proficient at elisp, that sounds like a steep
> wall to climb.
>
> Is there an iterative way to review items in an agenda view so I can
> do the math to produce a report?
>
> --
> Russell Adamsrlad...@adamsinfoserv.com
> https://www.adamsinfoserv.com/
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



Re: Getting rid of org-install.el

2022-06-29 Thread Kyle Meyer
Stefan Kangas writes:

> If we do it your way, does someone need to remember to delete the file
> manually when the time comes to move the emacs.git master branch to
> the latest Org release?  Or will that be done automagically?

My script for syncing the Org tree to the Emacs's does

  rm "$emacsrepo"/lisp/org/*.el
  cp "$orgrepo"/lisp/*.el "$emacsrepo"/lisp/org/

so that deletions/renames on Org's side are propagated.

Those aren't too frequent, but of course still need to be accounted for:

  $ git rev-parse HEAD
  6dc785288d3514af4071f210dac0a18c14a6c45b

  $ git log --since=2015 --format='%cs %s' --diff-filter=D --no-renames \
bugfix -- 'lisp/*.el'
  2021-09-28 lisp/ob-stan.el: Delete
  2021-09-26 Move some ob-*el files to the new org-contrib repo
  2019-03-10 Prefix link-related libraries filenames with "ol"
  2018-10-03 org-keys: Extract key bindings into their own library
  2017-08-18 Remove ob-scala.el



Re: PDF export, table of contents and internal links

2022-06-29 Thread Sébastien Gendre
Thanks for your advice.

You remember me that, in the past, I had modified
"org-latex-pdf-process". I just forget about it.

By looking this variable with "describe-variable", I see its default
value is:
"latexmk -f -pdf -%latex -interaction=nonstopmode -output-directory=%o %f"

I modified it to be:
"%latex -shell-escape -interaction nonstopmode -output-directory %o %f"

Because, when I wanted to add "-shell-escape" option to latexmk, it
seemed too complex to me.

If I learned LaTeX syntax in the past, I never take enough time to learn
how work each compilation possibility. I feel lost with all the
pdflatex, teklive, lualatex, double or quadruple compilation, etc.

Do you have good articles or book to suggest about this part of LaTeX ?

To come back to "org-latex-pdf-process", I only added "-shell-escape"
for the minted package. To have beautify code block. But maybe it exist
better solution ? Someone have experience with Engrave Faces ?


Juan Manuel Macías  writes:

> Hi, Sébastien,
>
> Sébastien Gendre writes:
>
>> To generate the table of contents, I have to compile my .tex file into
>> PDF 2 times. The first time, I got no toc. The second time the toc was
>> here.
>
> I would say It's a normal LaTeX thing. Sometimes LaTeX needs more than
> one compilation to finish processing things like TOC or
> cross-references, because it writes to auxiliary files if there has been
> any change in those elements. What I suggest is that you use latexmk as
> the default 'org-latex-pdf-process'. latexmk is a script that takes care
> of intelligently compiling everything, as many times as necessary.
>
> I have in my init:
>
> (setq org-latex-pdf-process
>   '("latexmk -lualatex -output-directory=%o -e '$lualatex=q/lualatex
>   %%O -shell-escape %%S/' %f"))
>
> (I use LuaTeX instead of pdfTeX).
>
> Best regards,
>
> Juan Manuel 




org-insert-heading-before-current

2022-06-29 Thread Tyler Grinn


Hello,

In general, I like to order my headings from newest to oldest top to
bottom. I'm looking for a function which will prepend a heading at the
current level in the current subtree. Some examples:


  * Subtree  * Subtree
  ** Item 2  >>> ** |
  ** Item 1| ** Item 2
 ** Item 1
  
  
  
  * Parent   * Parent
  ** Child|  ** |
  *** Item 2 >>> ** Child
  *** Item 1 *** Item 2
 *** Item 1



Best,

Tyler



Re: Alternatives to clocking in/out for reporting time

2022-06-29 Thread Russell Adams
On Thu, Jun 30, 2022 at 07:26:20AM +1000, Tim Cross wrote:
> > The point is that I'm not worried about accounting time by task,
> > instead I'm aggregating tasks into accounting by whole hours.
> >
> > I'm looking at org-element, and it appears I'd have to do my own
> > agenda style scan of the whole tree to find items to classify by
> > hour. While I'm somewhat proficient at elisp, that sounds like a steep
> > wall to climb.
> >
> > Is there an iterative way to review items in an agenda view so I can
> > do the math to produce a report?
> >
>
> Russell,
>
> I don't have an answer for your specific problem. However, I was
> wondering if you looked at the options to configure the built-in time
> clocking and report table?

I've looked at it several times, and it just doesn't fit the bill.

Sorry.

--
Russell Adamsrlad...@adamsinfoserv.com
https://www.adamsinfoserv.com/



Re: Alternatives to clocking in/out for reporting time

2022-06-29 Thread Tim Cross


Russell Adams  writes:

> I make extensive use of timestamps for billing (timesheet)
> purposes. I'm looking to automate this more, and I find the existing
> clocking system inadequate. I'm hoping someone can point me in the
> right direction.
>
> Today I have log mode enabled so that each time I close a TODO item,
> it records the date and time it was closed. At regular intervals while
> working I add inactive timestamps to my notes. I've mapped that to a
> single key, so it's quite fast. If I switch tasks, have an update,
> made progress I want to note to myself, or leave and return I add an
> inactive timestamp. I have well over 1000 inactive timestamps in my
> current file.
>
> Later I can open my agenda view on the working file, choose my
> timespan (week or month), enable log mode to show when items were
> closed, and then enable inactive timestamps to view all of the
> timestamps. This itemizes all the events organized by time into a
> timeline.
>
> It's fairly straightforward from that timeline to count my hours based
> on the record of where I spent my time. It is unfortunately a very
> manual process.
>
> I find Org's clocking to be too detailed, and that it doesn't play
> well with dynamically organized hierarchies of notes. I frequently
> create and close subtasks, or switch parts of the tree. Clocking each
> one is too much overhead, and too granular. I don't need to provide
> down to the minute reports of each item. It also doesn't appear to
> allow rounding of values, so I still have to adjust the results.
>
> What I envision is a way to count items in the agenda view to produce
> a time report. Counting any inactive timestamp as 15 minutes, where if
> a half hour or more is logged I round up to bill the hour. Closed TODO
> items should count toward billing that whole hour. Clearly this should
> be customized.
>
> The point is that I'm not worried about accounting time by task,
> instead I'm aggregating tasks into accounting by whole hours.
>
> I'm looking at org-element, and it appears I'd have to do my own
> agenda style scan of the whole tree to find items to classify by
> hour. While I'm somewhat proficient at elisp, that sounds like a steep
> wall to climb.
>
> Is there an iterative way to review items in an agenda view so I can
> do the math to produce a report?
>

Russell,

I don't have an answer for your specific problem. However, I was
wondering if you looked at the options to configure the built-in time
clocking and report table?

The reason I asked is because I had basically the same/similar issue
when I was using Org to do my invoicing. I would have lots of sub tasks
which I would clock in/out and end up with far too many line items and
overly detailed reports. However, I was able to change this just using
tghe built in facilities of the clock table.

I've been meaning to finish cleaning up my org invoicing solution for
ages, but it is one of those projects which doesn't get high enough in
the todo list. I'm also not a great elisp coder (only barely
adequate). However, yu might find some of what I've done useful or might
point you in the right direction. See
https://github.com/theophilusx/org-invoicing

Unfortunately, I cannot guarantee that code currently works. It is code
based on what I use to use for my invoicing, which was pretty hacky, but
worked well for me. I started to pull it together to make it more a
usable module for anyone who needed invoicing support. To be honest, I
cannot remember how far I got before getting distracted by a different
shiny thing. What I can say is that the basic ideas do work and I
successfully used it for invoicing for some time (I'm now retired, which
is partly why I've not finished it off - I don't need to invoice clients
anymore). 

I do think that if you need to go down the inactive timestamp route,
your in for a lot of work. The main point about inactive timestamps is
that they are not involved in any reporting or processing. So, you will
need to write much of the code yourself if yo want to use that to
generate your invoices and calculate billing. You really need to rule
out the custom time table option first as that would be a lot less work
overall and probably easier to maintain. 



Re: PDF export, table of contents and internal links

2022-06-29 Thread Juan Manuel Macías
Hi, Sébastien,

Sébastien Gendre writes:

> To generate the table of contents, I have to compile my .tex file into
> PDF 2 times. The first time, I got no toc. The second time the toc was
> here.

I would say It's a normal LaTeX thing. Sometimes LaTeX needs more than
one compilation to finish processing things like TOC or
cross-references, because it writes to auxiliary files if there has been
any change in those elements. What I suggest is that you use latexmk as
the default 'org-latex-pdf-process'. latexmk is a script that takes care
of intelligently compiling everything, as many times as necessary.

I have in my init:

(setq org-latex-pdf-process
  '("latexmk -lualatex -output-directory=%o -e '$lualatex=q/lualatex
  %%O -shell-escape %%S/' %f"))

(I use LuaTeX instead of pdfTeX).

Best regards,

Juan Manuel 





PDF export, table of contents and internal links

2022-06-29 Thread Sébastien Gendre
Hello,

Recently I wrote a little document in Org-mode and I exported it to
LaTeX then PDF.

But I got a problem: In the PDF, there was no table of contents and the
internal links were absent.

In the PDF I had a "Table of contents" title, but only the title. Below
it, I got nothing.

On Org-mode side, the table of contents is not disable. And in the .tex
file, I got a "\tableofcontents" below the "\maketitle".

To generate the table of contents, I have to compile my .tex file into
PDF 2 times. The first time, I got no toc. The second time the toc was
here.

Same situation with internal links.

Did I got this problem because the generated PDF was 76 pages ?
How can I fix it so I can have toc generated from Org-mode export ?


Best regards.

---
Sébastien





Re: Dates in headlines

2022-06-29 Thread Ypo

Thanks, Jean and Samuel, I will keep using them without remorse then :-)

Best regards!



El 28/06/2022 a las 23:13, Jean Louis escribió:
> On 2022-06-28 12:06, Ypo wrote:
>> I think I've read somewhere that it is a "bad practice" to use dates
>> in headlines, is it correct? I haven't found it in the manual.
>>
>> Like:
>>
>>  <2022-06-29 mi. 10:30> Meeting
>>
>> Best regards
>
> In many of my notes I use dates in titles of the section. Note 
creation is not always equal to date to which not relates. When it is 
useful, use it.


El 29/06/2022 a las 1:23, Samuel Wales escribió:

this iirc has been obsolete for many years and ime and on ml never was
an issue.  i tried to find out why it was mentioned but did not find
anything.  it might have been an ambiguity in the manual to do with
active tses like in your example?  e.g. the agenda will remove the
active ts at least in certain cases, but that is a deliberate feature.

i successfully rely on inactive as below.  they are sorted by the ts.
a capture template inserts them.

much better than date trees for my case.  always show, sorted at
bottom, no hierarchy, nothing out of sync, can scan and bisect to find
an entry or get a sense of number, can change a ts and sort again,
looks the same in the agenda, etc.


* LOG [2021-07-01 Thu] vulcans mediating with klingons
* LOG [2021-06-28 Mon 15:44] brawl.  scottie of course :(.
* LOG [2021-06-28 Mon 15:44] hauled away AS garbage?
* LOG [2021-06-28 Mon 15:44] klingons said garbage scow


On 6/28/22, Ypo  wrote:

I think I've read somewhere that it is a "bad practice" to use dates in
headlines, is it correct? I haven't found it in the manual.

Like:

 <2022-06-29 mi. 10:30> Meeting

Best regards


Re: [STYLE] :version tags in defcustom definitions (was: [PATCH] Improve look of agenda on graphical displays)

2022-06-29 Thread Bruce D'Arcus
On Wed, Jun 29, 2022 at 10:23 AM Timothy  wrote:
>
> Hi Ihor and Stefan,
>
> >> Sure. Just trying to clarify my confusion. The inconsistency with some
> >> defcustoms using :version and some not is bugging me.
> >
> > Agreed.  It would be better to be consistent with this.
>
> Given that org-mode is distributed separately to Emacs, and I get the 
> impression
> having a newer org-mode version that Emacs version is not uncommon, I think it
> would make sense to have /just/ org-mode version tags.

+1

Bruce



Re: Proposal: 'executable' org-capture-templaes

2022-06-29 Thread Max Nikulin

On 26/06/2022 11:50, Arthur Miller wrote:

Max Nikulin writes:


By state I mean some structure opaque to menu package. It just receives it from
caller as an optional argument and (when given) later passes it to
handler. Maybe it is alien approach in LISP, but in C (where closures are
impossible) it is a widely used technique. Functions having callback argument
usually have another void* one that is later passed as an argument of the
callback function in addition to other data.


I understand, I have done my share of C, and know what you mean. Say
posix thread will take a void* to user data, and pass it on. This is
exactly what this is about. It is just that we don't need an extra
structure to pass around. We have a menu entry, which *is* the user
data.


You a right, it is not strictly necessary that menu should be aware of 
state. I expect some helper though, e.g.


;;; -*- lexical-binding: t; -*-
(defun org-menu-multiinstance-stateful (menus  args)
  (let* ((buffer-name (or (plist-get args :buffer-name)
  "*Select menu*"))
 (state (plist-get args :state))
 (handler (plist-get args :handler))
 (handler-closure
  (and handler
   state
   (lambda (entry  _)
 (funcall handler entry state)
(when state (org-plist-delete args :state))
(when handler (org-plist-delete args :handler))
(plist-put args
   :buffer-name
   (generate-new-buffer-name buffer-name))
(apply #'org-select
   (if handler-closure
   (mapcar
(lambda (menu)
  (append menu (list :org-select-handler
 handler-closure)))
menus)
 menus)
   args)))
(provide 'org-multimenu)

To be able to call menu as

(load (expand-file-name "org-multimenu"))
(org-menu-multiinstance-stateful
 `((("1" "one" 1)
("2" "two" 2)))
 :state (format-time-string "%T")
 :text "Some heading"
 :buffer-name "*Test menu*"
 :handler (lambda (entry state)
(org-select-quit) ; it does not kill the buffer
(message "handler %S %S" entry state)))

I do not like how to closures are represented in elisp stack traces 
(e.g. JavaScript engines in browsers tries hard to give some debug names 
for anonymous functions). It should not be a problem when passed handler 
is a named function (not a lambda) despite closure in the adjacent frame.


However I would expect that menu handler is not aware if menu is 
implemented using buffers. From my point of view handler should not have 
buffer argument.


What I missed in your current implementation is ability to change text 
of menu entries in response to action. E.g. "C-c C-e" ox dispatcher has 
some options and user should see current values.


P.S. I am sorry for long delay.




[PATCH] worg - Reflect the removal of org-mac-link.el from org-contrib

2022-06-29 Thread Aimé Bertrand

Bonjour,

org-mac-link was removed from org-contrib with 
https://git.sr.ht/~bzg/org-contrib/commit/c6aef31ccfc7c4418c3b51e98f7c3bd8e255f5e6.


This is a patch (attached) for Worg to reflect the changes.

>From a15e9ba318ce6e13b2b405bc8a5067ee2e80d787 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aim=C3=A9=20Bertrand?= 
Date: Wed, 29 Jun 2022 18:10:59 +0200
Subject: [PATCH] Reflect the removal of org-mac-link.el from org-contrib

* org-contrib/index.org: Remove listing of org-mac-link.el
* org-contrib/org-mac-link.org: deleted
* org-mac.org: Update package URL
---
 org-contrib/index.org|  8 --
 org-contrib/org-mac-link.org | 55 
 org-mac.org  |  7 +
 3 files changed, 1 insertion(+), 69 deletions(-)
 delete mode 100644 org-contrib/org-mac-link.org

diff --git a/org-contrib/index.org b/org-contrib/index.org
index 308168fc..ca3052f1 100644
--- a/org-contrib/index.org
+++ b/org-contrib/index.org
@@ -110,14 +110,6 @@ the package -- it will hopefully have some documentation.
   Written by /Christopher Suckling/.
   [[contribfile:lisp/org-mac-iCal.el][Link to raw file]].
 
-- [[file:org-mac-link.org][/org-mac-link.el/ -- grab links from various mac applications]] ::
-  Grab the current link or selection from an open mac application and
-  insert it as a hyperlink at point in an org-mode document. Written
-  by /Anthony Lander/, /John Wiegley/ and /Christopher Suckling/.
-  This file replaces the earlier org-mac-message.el and
-  org-mac-link-grabber.el.
-  [[contribfile:lisp/org-mac-link.el][Link to raw file]].
-
 - /org-mairix.el/ -- hook mairix search into Org for different MUAs ::
   Written by /Georg C. F. Greve/.
   [[contribfile:lisp/org-mairix.el][Link to raw file]].
diff --git a/org-contrib/org-mac-link.org b/org-contrib/org-mac-link.org
deleted file mode 100644
index 2b2582e9..
--- a/org-contrib/org-mac-link.org
+++ /dev/null
@@ -1,55 +0,0 @@
-#+TITLE: org-mac-link.el -- Grab links from open Mac applications
-#+OPTIONS:   ^:{} author:nil
-#+STARTUP: odd
-#+HTML_LINK_UP:index.html
-#+HTML_LINK_HOME:  https://orgmode.org/worg/
-
-# This file is released by its authors and contributors under the GNU
-# Free Documentation license v1.3 or later, code examples are released
-# under the GNU General Public License v3 or later.
-
-* Overview 
-
-  This code will allow you to grab the current link or selection from
-  an open mac application and insert it as a hyperlink at point in an
-  org-mode document.
-
-*** Supported Applications
-
-The following applications are currently supported:
-- Finder.app
-- Mail.app
-- Address Book.app
-- Safari.app
-- Skim.app
-- Firefox.app
-- Firefox.app with the Vimperator plugin
-- Google Chrome.app
-- Together.app
-  
-* Installation
-  
-  Customize the org group by typing =M-x customize-group RET org RET=, then
-  expand the /Modules/ section, and enable =mac-link=.
-
-  You may also optionally bind a key to activate the link grabber menu, like
-  this:
-
-  : (add-hook 'org-mode-hook (lambda () 
-  :   (define-key org-mode-map (kbd "C-c g") 'org-mac-grab-link)))
-
-* Usage
-
-  Activate the grabber by typing =C-c g= (or whatever key you decided to bind,
-  as above), or type =M-x org-mac-grab-link RET=. This will give you a menu in
-  the modeline allowing you to select an application. The current selection in
-  that application will be inserted at point as a hyperlink in your org-mode
-  document.
-
-* Customizing
-
-  You may customize which applications appear in the grab menu by customizing
-  the group /org-mac-link/. Changes take effect immediately. If you are using
-  the org-mode version >=8.2, you can also customize whether the
-  =org-mac-link= should highlight the selected text when grabbing the link from
-  Skim.app.
diff --git a/org-mac.org b/org-mac.org
index e5721eca..3c99e2f1 100644
--- a/org-mac.org
+++ b/org-mac.org
@@ -27,15 +27,10 @@ applications other than Emacs...
 ** [[file:org-contrib/org-mac-iCal.org][org-mac-iCal]] -- import OS X iCal.app events into Emacs diary
Written by /Christopher Suckling/.
 
-** [[file:org-contrib/org-mac-link.org][org-mac-link]] -- Hyperlink to items in mac applications
-   grab the current link or selection from an open mac application and
-   insert it as a hyperlink at point in an org-mode document. Written
-   by /Anthony Lander/.
-
 ** [[file:org-contrib/org-mac-mail-link.org][org-mac-mail-link]] -- Hyperlink to messages in Mail.app
A small elisp file that addresses linking to Mail.app messages
directly via the =org-capture= system. For wider application
-   support check out [[file:org-contrib/org-mac-link.org][org-mac-link]].
+   support check out [[https://gitlab.com/aimebertrand/org-mac-link][org-mac-link]].
 
 * For use outside Emacs
 
-- 
2.32.1 (Apple Git-133)




Salut

--
Aimé Bertrand
aime.bertr...@macowners.club


Re: [PATCH] New remote resource download policy

2022-06-29 Thread Timothy
Hi Max,

Max Nikulin  writes:

>>> I see your intention to add something fancy to the dialog. May `org-mks’ be
>>> reused instead to avoid proliferation variants of rather similar UI code?
>> Well, the thing here is that I’m explicitly trying to mimic the
>> file-local-variable dialog, and since a general form isn’t exposed by Emacs, 
>> a
>> little bit of proliferation seems like the best option to me.
>
> From my point of view the result is rather close (prompt should be adjusted):
>
> (let ((uri “”))
>   (org-mks
>nil
>(format “An org-mode document would like to download %s, which is not
>   considered safe.
>
> Do you want to download this?”
>  (propertize uri ’face ’(:inherit org-link :weight normal)))
>nil ; prompt
>`((,(propertize “!” ’face ’success)
>   “download this resource, and permanantly mark it as safe.”)
>  (,(propertize “y” ’face ’warning)
>   “to download this resource, just this once.”)
>  (,(propertize “n” ’face ’error)
>   “skip this resource.”

I just tried this snippet and it looked quite different to me, that said I have
tweaked `org-mks' a bit in my config… (I initially found org-capture quite
ugly).

I also really don’t like how `org-mks' so forcefully grabs all keyboard input. I
can see it being nice to jump back to the buffer and see where the resource is
being used, which isn’t really possible using `org-mks'.

All the best,
Timothy


Re: [PATCH] Fix caption format for custom latex src block

2022-06-29 Thread Timothy
Hi Matt,

As mentioned by Ihor, you’ll want to take a look at the curent version of
ox-latex, specifically `org-latex-src-block--custom' which now contains `(?c .
,caption)'. You may want to consider modifying 
`org-latex--caption/label-string' to
accept the form `(element info  content-only)' or reimplementing just 
the
bits needed for this purpose — which ever works out nicer. Looking at
`org-latex--caption/label-string' a substring approach looks quite fragile, 
though
you might be able to get away with an application of `replace-regexp-in-string',
though I’d personally consider this a bit of a last resort.

Matt Huszagh  writes:

> Ihor Radchenko  writes:
>
>> I think that it will be better if you use
>> org-latex–caption/label-string instead. It will take care about short
>> captions as well.
>
> Changing this to (?c . ,caption-str) yields for the original example
>
> {Perform inter-sample interpolation.
> }
>
> I could use substring to remove the leading { and trailing
> }. What do you think?

All the best,
Timothy


Re: [PATCH] Fix caption format for custom latex src block

2022-06-29 Thread Timothy
Hi Ihor,

> Timothy, looking at the new implementation of org-latex-src-block, I do
> not see custom-env being passed as an argument of
> org-latex-src-block–custom. This is likely a bug.

Ah yes, this was an oversight. Corrected in 
30953bd7b701c870152cd60f52f2d484970caeb9.

All the best,
Timothy


Alternatives to clocking in/out for reporting time

2022-06-29 Thread Russell Adams
I make extensive use of timestamps for billing (timesheet)
purposes. I'm looking to automate this more, and I find the existing
clocking system inadequate. I'm hoping someone can point me in the
right direction.

Today I have log mode enabled so that each time I close a TODO item,
it records the date and time it was closed. At regular intervals while
working I add inactive timestamps to my notes. I've mapped that to a
single key, so it's quite fast. If I switch tasks, have an update,
made progress I want to note to myself, or leave and return I add an
inactive timestamp. I have well over 1000 inactive timestamps in my
current file.

Later I can open my agenda view on the working file, choose my
timespan (week or month), enable log mode to show when items were
closed, and then enable inactive timestamps to view all of the
timestamps. This itemizes all the events organized by time into a
timeline.

It's fairly straightforward from that timeline to count my hours based
on the record of where I spent my time. It is unfortunately a very
manual process.

I find Org's clocking to be too detailed, and that it doesn't play
well with dynamically organized hierarchies of notes. I frequently
create and close subtasks, or switch parts of the tree. Clocking each
one is too much overhead, and too granular. I don't need to provide
down to the minute reports of each item. It also doesn't appear to
allow rounding of values, so I still have to adjust the results.

What I envision is a way to count items in the agenda view to produce
a time report. Counting any inactive timestamp as 15 minutes, where if
a half hour or more is logged I round up to bill the hour. Closed TODO
items should count toward billing that whole hour. Clearly this should
be customized.

The point is that I'm not worried about accounting time by task,
instead I'm aggregating tasks into accounting by whole hours.

I'm looking at org-element, and it appears I'd have to do my own
agenda style scan of the whole tree to find items to classify by
hour. While I'm somewhat proficient at elisp, that sounds like a steep
wall to climb.

Is there an iterative way to review items in an agenda view so I can
do the math to produce a report?

--
Russell Adamsrlad...@adamsinfoserv.com
https://www.adamsinfoserv.com/



Re: [STYLE] :version tags in defcustom definitions (was: [PATCH] Improve look of agenda on graphical displays)

2022-06-29 Thread Timothy
Hi Ihor and Stefan,

>> Sure. Just trying to clarify my confusion. The inconsistency with some
>> defcustoms using :version and some not is bugging me.
>
> Agreed.  It would be better to be consistent with this.

Given that org-mode is distributed separately to Emacs, and I get the impression
having a newer org-mode version that Emacs version is not uncommon, I think it
would make sense to have /just/ org-mode version tags.

All the best,
Timothy


Re: [PATCH] Improve "Speeding Up Your Agendas" chapters

2022-06-29 Thread Stefan Kangas
Ihor Radchenko  writes:

> Applied onto main via a722f6f8e with amendment to the commit message.

It seems like i bungled the patch: two typos are fixed in the attached.  Thanks.
From 29be11122821b18ffb56e109b4a9c457c65d1142 Mon Sep 17 00:00:00 2001
From: Stefan Kangas 
Date: Wed, 29 Jun 2022 15:01:09 +0200
Subject: [PATCH] * doc/org-manual.org (Speeding Up Your Agendas): Fix typos.

---
 doc/org-manual.org | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index b7bb9570a..a4f5eee17 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -21043,11 +21043,11 @@ number.  Here are tips to speed up:
   (setq org-agenda-use-tag-inheritance nil)
   #+end_src
 
-  #+vindex: org-agenda-ignore-drawer-properties
+  #+vindex: org-agenda-ignore-properties
 - Disable parsing of some drawer properties:
 
   #+begin_src emacs-lisp
-  (setq org-agenda-ignore-drawer-properties '(effort appt stats category))
+  (setq org-agenda-ignore-properties '(effort appt stats category))
   #+end_src
 
   The drawer properties you can disable in the agenda are effort
-- 
2.30.2



[STYLE] :version tags in defcustom definitions (was: [PATCH] Improve look of agenda on graphical displays)

2022-06-29 Thread Ihor Radchenko
Stefan Kangas  writes:

>> I am wondering if this is meaningful considering that Org is not always
>> distributed together with Emacs. Will this :version tag make any sense
>> for people using the newest Org with older Emacs versions?
>
> I think it won't really, but that's okay.  Also, this is how Org has
> used these tags historically, try grepping for ":version" to see.

I did try. Only ~40% of defcustoms are supplied with :version tags.
Also, ~75% of the tags were introduced long time ago: Emacs 24.
The rest, except the 4 (four in total) Emacs 27 are all Emacs 26.

> IOW, changing this is orthogonal to this patch.

Sure. Just trying to clarify my confusion. The inconsistency with some
defcustoms using :version and some not is bugging me.

Best,
Ihor



Re: Orgmode plain list bullet : change automatically with list depth

2022-06-29 Thread DEBRY . Edouard


Finally, it has nothing to do with my own settings.

It happens with this :
- zeze
- ghrghrgh
- lqlqsqs

1. sdsdsd
   - sdsd
   - mcpscls

because there is only one line between both lists and (I did not know
it) orgmode thinks they are the same, then any depth change in second
list changes the 1. into a bullet. Putting two lines between both lists
makes them independent.

Regards

Ihor Radchenko  writes:

> ---
> Attention, ce courriel provient d'Internet. L'emetteur n'est peut-etre pas 
> celui que vous pensez. 
> Merci de considerer ce point en lisant ce courriel, avant d'y repondre, de 
> cliquer sur
> les liens ou d'ouvrir les pieces jointes.
> ---
>
> DEBRY.Edouard  writes:
>
>> if I perform Alt-leftarrow on mmd, this element is shift on the left
>> but then the whole list is turned into :
>> - first
>>- ssdsd
>>- mmd
>> - second
>>
>> Is there a way to avoid that ?
>
> I am unable to reproduce on the latest main and bugfix.
>
> Best,
> Ihor
>
> __
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> __

___

This email and any attachments are confidential to the intended recipient and 
may also be privileged.
If you are not the intended recipient please delete it from your system and 
notify the sender. 
You should not copy it or use it for any purpose nor disclose or distribute its 
contents to any other person.
 

Ce courriel et ses pieces-jointes sont envoyes de maniere confidentielle et 
doivent etre traites avec attention.
Si vous n'etes pas le destinataire, merci de le detruire et d'en informer son 
auteur. 
Vous ne devez pas copier, utiliser, reveler ou diffuser son contenu a quiconque.




Re: [STYLE] :version tags in defcustom definitions (was: [PATCH] Improve look of agenda on graphical displays)

2022-06-29 Thread Stefan Kangas
Ihor Radchenko  writes:

> Sure. Just trying to clarify my confusion. The inconsistency with some
> defcustoms using :version and some not is bugging me.

Agreed.  It would be better to be consistent with this.



Re: Getting rid of org-install.el

2022-06-29 Thread Stefan Kangas
Kyle Meyer  writes:

> In my view it'd be better to drop the first item.  Org has removed
> plenty of obsolete features in its time, but searching the emacs.git
> history, I can't find a case where an Org-related file has been in
> lisp/obsolete/.  I'd vote against setting that precedent, as I don't
> want to introduce any more discrepancies between the Org files in
> org-mode.git and emacs.git than necessary.

Fine by me, though I don't think it's a very strong precedent; it
could be a one-off.

If we do it your way, does someone need to remember to delete the file
manually when the time comes to move the emacs.git master branch to
the latest Org release?  Or will that be done automagically?



Re: Getting rid of org-install.el

2022-06-29 Thread Ihor Radchenko
Stefan Kangas  writes:

> Ihor Radchenko  writes:
>
>> > 2. Delete the file from org-mode.git
>> > ...
>> > What do you think?
>>
>> Sounds good to me.
>
> Patch attached.

Applied onto main via ea05f4343.
I removed the dot after the commit message.

Best,
Ihor



Re: [PATCH] Improve look of agenda on graphical displays

2022-06-29 Thread Stefan Kangas
Ihor Radchenko  writes:

> >:group 'org-agenda
> > +  :version "29.1"
> > ...
> > -  :version "24.1"
> > +  :version "29.1"
> >:type 'string)
>
> I am wondering if this is meaningful considering that Org is not always
> distributed together with Emacs. Will this :version tag make any sense
> for people using the newest Org with older Emacs versions?

I think it won't really, but that's okay.  Also, this is how Org has
used these tags historically, try grepping for ":version" to see.

IOW, changing this is orthogonal to this patch.



Re: [PATCH] describe how to override Author

2022-06-29 Thread Ihor Radchenko
Robert Pluim  writes:

>> On Mon, 27 Jun 2022 17:53:30 +0800, Ihor Radchenko  
>> said:
>
> Ihor> Robert Pluim  writes:
> >> diff --git a/org-contribute.org b/org-contribute.org
>
> Ihor> Maybe add the details to org-maintenance.org instead?
> Ihor> This is more of a technical detail needed for maintainers, not for 
> the
> Ihor> committers.
>
> Iʼd be worried if the org maintainer(s) didnʼt know how to override
> Author :-)

I have bad news for you... Simply because I never ever had a need to do
it :) Not like selecting this option from Magit dispatch is difficult.

> Occasional committers would probably not read org-maintenance.org, and
> those are the people this section is aimed at, I think. Plus itʼs the
> kind of thing you need to catch early: once the commit has been pushed
> itʼs too late.

Not really. org-contribute.org is the page directly linked from
orgmode.org. It is aiming for new contributors with no write access.

More elaborate things like backwards compatibility, copyright process
assistance, etc are documented in org-maintenance.org.
Modifying submitted diffs/patches appears to lay within the more
elaborate category IMHO.

> >> +1. Command line: src_sh{git commit --author='First Last 
> '}
>
> Ihor> I think we usually prefer source blocks to inline source blocks.
>
> OK, changed.
>
> >> +2. =VC=: Set the 'Author:' field in log-edit mode (requires setting
> >> +   `log-edit-setup-add-author').
>
> Ihor> 'Author:' -> =Author:=
> Ihor> `log-edit-setup-add-author' -> ~log-edit-setup-add-author~ 
>
> OK, changed.

I guess that you intended to attach the updated patch, but haven't?

Best,
Ihor



Re: [PATCH] Fix behavior of lambda default header arg vars

2022-06-29 Thread Ihor Radchenko
Matt Huszagh  writes:

> Modifications made and split into two patches. Let me know if any
> remaining issues.

> From 7af7ad3990410ca388c841e045ec66ce694b404a Mon Sep 17 00:00:00 2001
> From: Matt Huszagh 
> Date: Mon, 27 Jun 2022 20:42:27 -0700
> Subject: [PATCH 2/2] ob-core.el: Improve org-babel-default-header-args
>  docstring

This patch does not apply. It does not appear to be based on the
original main branch:

Applying: ob-core.el: Improve org-babel-default-header-args docstring
error: sha1 information is lacking or useless (lisp/ob-core.el).
error: could not build fake ancestor

Best,
Ihor



Re: [PATCH] Improve look of agenda on graphical displays

2022-06-29 Thread Ihor Radchenko
Stefan Kangas  writes:

> The attached patch improves the look of the agenda time grid and
> separator line on graphical displays.  It was inspired by
> org-modern.el by Daniel Mendler.

Thanks! Looks good.

>:group 'org-agenda
> +  :version "29.1"
> ...
> -  :version "24.1"
> +  :version "29.1"
>:type 'string)

I am wondering if this is meaningful considering that Org is not always
distributed together with Emacs. Will this :version tag make any sense
for people using the newest Org with older Emacs versions?

Best,
Ihor



Re: [PATCH] Improve "Speeding Up Your Agendas" chapters

2022-06-29 Thread Ihor Radchenko
Stefan Kangas  writes:

> Note that the "." is on the next line (you can't see it in the patch though).
>
>> Thanks, I'll update the patch.
>
> Please see the attached.

Thanks!
Applied onto main via a722f6f8e with amendment to the commit message.
I have added quoting to the variable name:
`org-agenda-ignore-properties'.

Best,
Ihor



org-agenda-prefix-format and tab stops

2022-06-29 Thread Michael Maurer
hi,

I've discovered org-agenda-prefix-format, but can't figure out how to
add a tab-stop after every todo-item. So basically that the headlines
are aligned regardless of the character-length of the todo-item. My
current setup looks like this:

(setq org-agenda-prefix-format
  '(
(agenda  . "  %?-12t% s")
(timeline  . "  % s")
(todo  . "  %i %-12:c")
(tags  . " %i %-12:c")
(search . " %i %-12:c"))

but messing around with the -12 variable doesn't seem to change
anything. Probably missing something.