Re: How to export to markdown programmatically without the table of contents?

2022-05-04 Thread Karl Voit
* Jeremie Juste  wrote:
> Hello Karl,

Hi Jeremie,

> On Tuesday,  3 May 2022 at 11:15, Karl Voit wrote:
>>
>> I tried this neat code snippet today with Emacs 26.3 and Org-mode
>> 9.1.9 and I got an error:
>>
>> | org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export
>>
>> When I execute the following code, I get the same error:
>> | (setq region "/foo/ *bar* https://example.com baz")
>> | (org-export-string-as region 'md t '(:with-toc nil))
>>
>> Could it be that I don't have "md" as backend somehow? Is there a
>> hidden requirement?
>
> And I still work with (require 'ox-md).

Unfortunately, I did not write down why I thought this is not
necessary any more. However, with the require statement, the error
is gone and the function works now.

Thanks!

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Agenda without todos only if there is no other timestamp

2022-05-04 Thread Karl Voit
Hi,

* TRS-80  wrote:
>
>> On 2022-04-05 04:48, Karl Voit wrote:
>>> Hi,
>>> I've got following custom agenda for exporting:
>>> | ("n" "no TODO events +180d"
>>> |  ((agenda "no TODO events +180d"
>>> |   ((org-agenda-span 180)
>>> |(org-agenda-time-grid nil)
>>> |(org-agenda-entry-types '(:timestamp :sexp))
>>> |(org-agenda-skip-function
>>> | '(or
>>> |   (org-agenda-skip-entry-if 'todo 'any);; skip if any
>>> TODO state is found
>>> |   (org-agenda-skip-entry-if 'category "errors");; skip
>>> if any TODO state is found
>>> |   (my-skip-tag "lp")
>>> |   )
>>> |  nil (,(concat my-org-files-path "agenda_180d_filtered_raw.html")))
>>> (don't mind the stupid name - I may fix this as it is misleading
>>> here)
>>> This results in an HTML file that contains my appointments without
>>> the tasks.
>>> Unfortunately, I sometimes seem to schedule appointments within open
>>> todos such as:
>>> | * NEXT talk with Steve about the project X
>>> | SCHEDULED: <2022-04-05 Tue>
>>> |
>>> | - [X] ask him for a time-slot
>>> | - we settled for: <2022-04-05 Tue 14:00-15:00>
>>> Of course, those appointments are lost in my agenda export as
>>> specified above. This is a bummer and I want to fix this somehow.
>>> Tasks should be omitted only if there is no other time-stamp than
>>> deadline or scheduled.
>>> org-agenda-skip-if lists:
>>> | scheduled Check if there is a scheduled cookie
>>> | notscheduled  Check if there is no scheduled cookie
>>> | deadline  Check if there is a deadline
>>> | notdeadline   Check if there is no deadline
>>> | timestamp Check if there is a timestamp (also deadline or
>>> scheduled)
>>> | nottimestamp  Check if there is no timestamp (also deadline or
>>> scheduled)
>>> | regexpCheck if regexp matches
>>> | notregexp Check if regexp does not match.
>>> | todo  Check if TODO keyword matches
>>> | nottodo   Check if TODO keyword does not match
>>> How is it possible to accomplish this? I think this would require
>>> something like "Check if there is a timestamp (except deadline or
>>> scheduled)" which isn't available yet.
>>> Any ideas on that one?
>>
>> I think you will need to write a custom ~org-agenda-skip-function~.
>>
>
> I realized there is probably an even easier way (no custom ELisp
> required), simply by creating a separate child heading for the meeting,
> which should then show up.

Thanks for the idea. This is my current workaround. However, it
happens in longer headings that I insert a time/datestamp at the end
without realizing that I'm working in a todo heading. This is an
issue for me because I do have to check every time I'm using
timestamps. It's rather obvious that I fail from time to time and I
lose the entry on my non-todo-agenda.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: How to export to markdown programmatically without the table of contents?

2022-05-03 Thread Karl Voit
Hi,

* Marcin Borkowski  wrote:
>
> On 2022-05-01, at 22:01, Berry, Charles  wrote:
>
>>> On May 1, 2022, at 2:20 AM, Marcin Borkowski  wrote:
>>> 
>>> I'd like to export a Org-mode formatted string to markdown, but without
>>> the table of contents.
>>> 
>>> (org-export-string-as my-string 'md t '(toc nil))
>>
>>
>> It does seem odd that BODY-ONLY as `t' gives a toc. With latex it does not 
>> regardless of `:with-toc'.
>> : (org-export-string-as my-string 'md t '(:with-toc nil))
>> seems to give what you want.
>
> http://mbork.pl/2021-05-02_Org-mode_to_Markdown_via_the_clipboard

I tried this neat code snippet today with Emacs 26.3 and Org-mode
9.1.9 and I got an error:

| org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export

When I execute the following code, I get the same error:
| (setq region "/foo/ *bar* https://example.com baz")
| (org-export-string-as region 'md t '(:with-toc nil))

Could it be that I don't have "md" as backend somehow? Is there a
hidden requirement?

Do I need something like "(require 'ox-md)"? I somehow noted that
those export requirements are not necessary any more. Maybe this is
wrong?

Thanks!

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Agenda without todos only if there is no other timestamp

2022-04-05 Thread Karl Voit
Hi,

I've got following custom agenda for exporting:

| ("n" "no TODO events +180d"
|  ((agenda "no TODO events +180d"
|   ((org-agenda-span 180)
|(org-agenda-time-grid nil)
|(org-agenda-entry-types '(:timestamp :sexp))
|(org-agenda-skip-function
| '(or
|   (org-agenda-skip-entry-if 'todo 'any);; skip if any TODO state 
is found
|   (org-agenda-skip-entry-if 'category "errors");; skip if any 
TODO state is found
|   (my-skip-tag "lp")
|   )
|  nil (,(concat my-org-files-path "agenda_180d_filtered_raw.html")))

(don't mind the stupid name - I may fix this as it is misleading
here)

This results in an HTML file that contains my appointments without the tasks.

Unfortunately, I sometimes seem to schedule appointments within open todos such 
as:

| * NEXT talk with Steve about the project X
| SCHEDULED: <2022-04-05 Tue>
| 
| - [X] ask him for a time-slot
| - we settled for: <2022-04-05 Tue 14:00-15:00>

Of course, those appointments are lost in my agenda export as
specified above. This is a bummer and I want to fix this somehow.

Tasks should be omitted only if there is no other time-stamp than
deadline or scheduled.

org-agenda-skip-if lists:
| scheduled Check if there is a scheduled cookie
| notscheduled  Check if there is no scheduled cookie
| deadline  Check if there is a deadline
| notdeadline   Check if there is no deadline
| timestamp Check if there is a timestamp (also deadline or scheduled)
| nottimestamp  Check if there is no timestamp (also deadline or scheduled)
| regexpCheck if regexp matches
| notregexp Check if regexp does not match.
| todo  Check if TODO keyword matches
| nottodo   Check if TODO keyword does not match

How is it possible to accomplish this? I think this would require
something like "Check if there is a timestamp (except deadline or
scheduled)" which isn't available yet.

Any ideas on that one?

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [BUG] org-element--cache gives "Unregistered buffer modifications" warning [9.5 (9.5-g859984 @ /home/john/.emacs.d/straight/build/org/)]

2022-01-06 Thread Karl Voit
Hi,

* John Mathena  wrote:
>
> First time sending mail to the list; please let me know if I commit any
> breaches of etiquette or convention (e.g. on attaching backtraces as a file
> vs sending in message body).

You're doing fine. Thanks for handing in your issue and welcome to
the list.

I do get the same warning in a different situation so I just add my
situation to this thread as well:

Every time I execute =my-title-capitalization()= from
https://github.com/novoid/dot-emacs/blob/master/config.org I get this:

#+BEGIN_EXAMPLE
Warning (emacs): Unrecognized key: _i_
Warning (emacs): org-element--cache: Unregistered buffer modifications 
detected. Resetting.
If this warning appears regularly, please report it to Org mode mailing list 
(M-x org-submit-bug-report).
The buffer is: README.org
 Current command: nil
 Backtrace:
nil
#+END_EXAMPLE

Current versions:
: Org mode version 9.5 (release_9.5-243-g048f47 @ mixed installation! 
/home/vk/.emacs.d/contrib/org-mode/lisp/ and /home/vk/.emacs.d/contrib/)
: GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.14) of 
2020-03-26, modified by Debian

Any thoughts?

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Concrete suggestions to improve Org mode third-party integration :: an afterthought following Karl Voit's Orgdown proposal

2021-12-06 Thread Karl Voit
Hi,

* Ihor Radchenko  wrote:
>
> Now, we need to understand what kind of people may be looking to
> orgmode.org website.
>
> 1. Existing emacs users
> 2. Non-emacs users interested in plain text markup
> 3. Non-emacs users interested in GTD/project management, etc
>"Org mode: your life in plain text" is somewhat relevant when people
>are looking to manage "life" (typically true for GTD enthusiasts).
> 4. Researchers looking for ipython-like environment
> 5. ??? (Suggestions are welcome)

I don't think that you can come up with a good website that is able
to serve all of them properly.

For Orgdown I had in mind number 2 and 3. For supporting the idea
for Orgdown, I thought of number 1. (Well, that turned out in a
mixed way[1]).

If you do want to have a go-to for people who should use the
Org-mode syntax without the GNU/Emacs tool, you need to have a
separate site.

[1] https://karl-voit.at/2021/12/02/Orgdown-feedback

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Concrete suggestions to improve Org mode third-party integration :: an afterthought following Karl Voit's Orgdown proposal

2021-12-06 Thread Karl Voit
Hi,

* Ihor Radchenko  wrote:
>
> The fact is that e.g. Github already provides support for Org markup.
> They do it for their own profit and we cannot stop them. If we have a
> controlled criteria about quality of third-party Org mode support, there
> will be means to interfere with non-free software attempting to makes
> profits out of Org mode. For example, if Github do not integrate our
> recommended test suite (with all the legal consequences defined in
> GPLv3), we will be able to have a list of third-party tools and, among
> free alternatives, mention that Github support for Org is not verified
> and most likely not consistent with other _free_ tools. We cannot do it
> now.

This is the main reason why I came up with the concept of Orgdown
levels in the first place. Tools may choose their featureset
independently and Orgdown assessments show the users the amount of
features they can get.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Orgdown: negative feedback & attempt of a root-cause analysis

2021-12-01 Thread Karl Voit
Hi,

I've summarized my current state of mind about the whole Orgdown
fiasco into a blog article:
https://karl-voit.at/2021/12/02/Orgdown-feedback/

Don't worry, I tried to analyze my own faults as well so that others
might be able to learn from this unfortunate situation.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Orgdown: negative feedback & attempt of a root-cause analysis (was: "Orgdown", the new name for the syntax of Org-mode)

2021-11-30 Thread Karl Voit
Hi,

* M  ‘quintus’ Gülker  wrote:
>
> Am Montag, dem 29. November 2021 schrieb Karl Voit:
>> It seems to be the case that the name "Orgdown" is the reason why
>> the Org-mode community does not support the idea of an
>> implementation-agnostic definition of the syntax. Which is ... kinda
>> funny if you think about it.
>>
>> Well if the project is not working out, at least I made my point and
>> we continue to have all those misunderstandings and lack of Orgdown
>> support in 3rd party tools (because Org-mode is way too big).
>
> I think the project has value; better tooling outside of Emacs is
> something org can only profit from in my opinion. One point that has not
> been raised yet are scenarios of collaborative work; I would enjoy it
> quite a bit if I could work on documents together with people who do not
> like Emacs as an editor for whatever reason. Currently, org as a file
> format is pretty much excluded if collaboration is intended with someone
> who does not use Emacs. The natural choice in these cases is Markdown.

I agree.

One of the next things I do have on my list is to try out crdt as
I've learned at EmacsConf21 that it is mature enough to be used in
practice. 

If that holds true, we can start dreaming of having a Etherpad-like
session from our GNU/Emacs while peers are connected to the same
session via some web-based tool/service.

> I agree that the name is kind of odd as it seems as if it is necessary
> to invoke some association to Markdown. Other markup languages also do
> not need that -- Textile, Asciidoc, etc. Perhaps it is best to simply
> ignore the naming issue and focus on the actual work instead. It is far
> more important to get the compatibility levels defined. After that you
> can still reconsider the naming.

The dominant feedback of
https://www.reddit.com/r/emacs/comments/r4cq3o/orgdown_the_new_name_for_the_syntax_of_orgmode/
was negative comments on the name and nothing else. Even here,
although due to a much more civilized style, the name choice was the
dominant topic and not the idea. I have to take this as a strong
signal here and I'm very close in giving up on Orgdown as a project.

I did underestimate the power of the name choice as I clearly was
impatient because I was looking forward to interesting discussions
on the idea itself like in this sub-thread.

There were two possible generic approaches for me: start from zero
with an open process, involving peers in all choices such as naming,
Orgdown1 syntax elements, ...

While this approach offers maximum community involvement, my fear
was to get into too many long discussions about details before I
could express my vision to anybody in a concise way.

Second approach: define everything myself up to Orgdown7 (as an
example) and publish with a big bang. The downsides here are
obvious.

I chose an in-between approach: defining only a minimal set (name,
common structure/idea/documentation, Orgdown1, providing a
collaborative home on GitLab) and hope for a project community that
will take over (or at least support) from there, discussing syntax
elements for Orgdown2 and taking the project to its next logical
steps.

In hindsight, this decision was wrong.

Quite frankly, I don't have the energy to throw away everything and
start from zero with a different name.

People do not seem to realize what it took to get there - which is
partly understandingly because I had to learn by doing what it takes
to get the idea into a coherent and consistent form. 

Simply switching to a different name is not just search It
would reset the project almost to its very start again, losing the
go-live effect of previous weekend (whose effect might be
questionable considering the name discussion), its project URL that
is now out there, the motivation video which aims to explain the
motivation to users of Emacs, the EmacsConf21 talk publicity, and it
would require much effort to reach the status where Orgdown is now.

>> Oh, there is a very large danger here of getting something that is
>> not compatible with Org-mode any more. I don't think that this would
>> be a good thing. At least the different flavors killed the fun of
>> Markdown for me.
>
> The astonishing thing is that most people manage to get along despite of
> the incompatibilities of the different Markdown flavours. Otherwise
> Markdown would not be such a success. Why is this? What can be learned
> from this for creating org tools outside of Emacs? Actually surveying
> this might be of interest.

I agree and I have thought about it myself already.

My guess is that most people do not suffer much from different
Markdown flavors because they rarely mix them in their workflows. I
guess most people are using Markdown only in their text editor OR
only in GitHub/GitLab org files OR only within any other
Markdown-tool.

I might b

Re: "Orgdown", the new name for the syntax of Org-mode

2021-11-29 Thread Karl Voit
Hi Tim,

* Tim Cross  wrote:
>
> Hi Karl,
>
> while I can appreciate the point you are making, I'm doubtful your
> suggestion will gain the traction necessary to work. 

You might be right. Only time will tell. ;-)

> To me, it feels a little like the frequent posts from RMS in the
> emacs-devel list where he gets upset when people refer to Linux
> instead of GNU Linux. 

I disagree here. 

Linux vs. GNU/Linux are two different names for the same thing.
Org-mode is an Elisp implementation and Orgdown is just a syntax
definition. So they are completely different things.

> To some extent, the distinction will be too subtle for many and
> often, it isn't clear whether an issue is a syntax definition
> (orgdown) or an implementation bug or just simply user
> misunderstanding.

It seems to be the case that the name "Orgdown" is the reason why
the Org-mode community does not support the idea of an
implementation-agnostic definition of the syntax. Which is ... kinda
funny if you think about it.

Well if the project is not working out, at least I made my point and
we continue to have all those misunderstandings and lack of Orgdown
support in 3rd party tools (because Org-mode is way too big).

> Perhaps we just need a name for the markup syntax which doesn't actually
> reference 'org' at all - it simply is the markup syntax which org
> happens to use. A completely separate name might avoid confusion and
> would make it very clear that the markup syntax is not org mode. Problem
> is, naming is terribly difficult and I have no suggestions on what would
> be a good name.

Oh, there is a very large danger here of getting something that is
not compatible with Org-mode any more. I don't think that this would
be a good thing. At least the different flavors killed the fun of
Markdown for me.

> I have not yet viewed your video, but will certainly be doing so. Again,
> agree with the sentiment of what your trying to do, just not convinced
> it is compatible with basic human nature. 

Maybe we need to differ between the Org-mode community with
potential bias and the main target group of people who did use
Markdown in the past and never have heard of Org-mode before?

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




"Orgdown", the new name for the syntax of Org-mode

2021-11-28 Thread Karl Voit
Hi Org-mode community,

At this year's EmascsConf, I had a 12 minute video where I explain why
we do need a different name for the syntax of Org-mode in contrast to
the Elisp implementation of GNU/Emacs Org-mode.

I would like you to read my rationale and motivate you to use the term
"Orgdown" for the syntax and "Orgdown1" for the first (very basic)
level of Orgdown syntax elements.

- The EmacsConf21 talk: https://emacsconf.org/2021/talks/org-outside
- Orgdown site: https://gitlab.com/publicvoit/orgdown (please contribute!)
- My motivation article: https://karl-voit.at/2021/11/27/orgdown/
  - This is the longer version of my 12 minute EmacsConf21 video.
- My personal copy of the video: 
https://tube.graz.social/w/bgJVfjPLQAoJwLJQZoo3Hu


Just as a sneak preview (not as a replacement for my motivation article):

Orgdown is and will be defined in a set of levels, starting with very
basic Orgdown1 (or OD1 or O↓1 or ⧬1 - depending on your coolness
factor of choice :-) )

- OD1 → 
https://gitlab.com/publicvoit/orgdown/-/blob/master/doc/Orgdown-Levels.org
- OD2 → will be defined in future
- OD3 → will be defined in future
- ...
- OD∞ = Org-mode (by definition)

Any OD-level needs to be compatible with Org-mode as implemented in
Elisp for GNU/Emacs Org-mode according to https://orgmode.org. Any ODx
is a sub-set of the syntax elements of ODy (with y>x).

With introducing a new term specific for the syntax, we do get the
benefit of getting a better way to handle Org-mode support in
3rd-party tools such as listed on
https://gitlab.com/publicvoit/orgdown/-/blob/master/doc/Tool-Support.org
(please extend!).

Having a well-defined sub-set of Org-mode, I also do think that formal
definitions of the Org-mode syntax will be easier to develop, starting
with the very simple OD1 level.

It would be awesome if we start referring to syntax support in
3rd-party tools with the corresponding OD levels.

I want to emphasize that the goal of Orgdown is NOT and will never be
something that is an alternative to our golden standard Org-mode. We
will try hard not to get into the Markdown situation where you need to
know the exact flavor of the markup in order to produce text.

So far, the response was great at the conference and I do hope that
this idea will get a life of its own, developing the standard further,
bringing this magnificent lightweight markup to the digital world.
This also eases some pain for users of GNU/Emacs when it comes to
exchanging text-based data.

Thanks for your support here!


-- 
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Help requested: Support for basic Org mode support in tools outside of Emacs

2021-08-06 Thread Karl Voit
* M  ‘quintus’ Gülker  wrote:
> Am 04. August 2021 um 12:57 Uhr +0200 schrieb Karl Voit:
>> My focus is on Emacs-independent tools, emphasizing the argument
>> that Org mode is not Emacs-only and its syntax does have
>> applications outside of Emacs as well because it is a well-defined
>> syntax in the sense of
>> https://karl-voit.at/2017/09/23/orgmode-as-markup-only/
>
> It is an interesting post, thank you for sharing. Indeed, a list of
> non-Emacs org tools would benefit org's popularity as a markup
> language. Good luck with building one!
>
> The problem with the approach you describe in this article is that the
> org markup is not really separatable from org as a part of Emacs.

This is absolutely true and I'm going to try something to change
that in the upcoming months. ;-)

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Help requested: Support for basic Org mode support in tools outside of Emacs

2021-08-04 Thread Karl Voit
* Jens Neuhalfen  wrote:
> Hi
>
> on iOS the (really amazing) git client „working copy“ has support for org 
> rendering 

Interesting.

Could you provide me a syntax compatibility row according to the
table at the bottom of
https://github.com/novoid/github-orgmode-tests/blob/master/orgmode_support.org ?

> Jens
>
>> On 3. Aug 2021, at 11:32, Karl Voit  wrote:
>> 
>> Hi,
>> 
>> I'm collecting information on basic Org mode support in tools that
>> are not Emacs.
>> 
>> I already have: GitHub, GitLab (exactly like GitHub), OrgModeWeb,
>> Orgzly, Orgro, Emacs, vim-orgmode.
>> 
>> What I need is information on much more tools.
>> 
>> I have set up a syntax checking file on
>> https://github.com/novoid/github-orgmode-tests/blob/master/orgmode_support.org
>> which also contains my current compatibility table for the most
>> basic set that makes sense as a Markdown-pendant outside of Emacs
>> according to my subjective judgement on Org mode at the bottom.
>> 
>> My focus is on tools that - at least - offer text formatting syntax
>> highlighting for *bold* /italic/ and so forth. The rest could be
>> "works as text but has no special support for outlining and more".
>> 
>> The goals is to emphasize that there are much more tools that allow
>> for viewing and/or editing data in Org mode syntax.
>> 
>> Since I don't have an iPhone, iOS-based tools supporting Org mode
>> syntax is very much appreciated.
>> 
>> Please do hand in more lines for the table either here, via email or
>> as a GitHub pull request.
>> 
>> Thank you!
>> 
>> -- 
>> get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
>>> get Memacs from https://github.com/novoid/Memacs <
>> Personal Information Management > http://Karl-Voit.at/tags/pim/
>> Emacs-related > http://Karl-Voit.at/tags/emacs/
>> 
>> 
>
>


-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Help requested: Support for basic Org mode support in tools outside of Emacs

2021-08-04 Thread Karl Voit
Hi Timothy,

* Timothy  wrote:
>
> Hi Karl,
>
> Just to check, have you seen  ?

Yes, but thanks for reminding!

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Help requested: Support for basic Org mode support in tools outside of Emacs

2021-08-04 Thread Karl Voit
Hi Tom,

Great list you compiled here!

* Tom Gillespie  wrote:
> Hi Karl,
>Great initiative. For many of the things in the table you will
> probably want to link to the underlying library For example for github
> and gitlab there is https://github.com/wallyqs/org-ruby (which I have
> been trying to find time to submit fixes to). I've linked a couple
> relevant threads and repos. Best!
> Tom
>
> python https://github.com/novoid/Memacs
> python https://github.com/karlicoss/orgparse
> python https://github.com/bjonnh/PyOrgMode
> racket https://github.com/tgbugs/laundry/tree/next
> racket https://github.com/jeapostrophe/org-mode
> racket https://github.com/antoineB/org-mode
> See https://github.com/tgbugs/laundry/blob/next/laundry/cursed.org for
> an org file that github fails to render
> clojure https://github.com/200ok-ch/org-parser/blob/master/resources/org.ebnf
>
> https://orgmode.org/list/ca+g3_pobab1qx1zv8q9sjfh4khuhvmanxp3xo7__6eosdxk...@mail.gmail.com/
> https://orgmode.org/list/ca+g3_pnj6pekqv+twfkwbd778xhw9wsfx+kjjhjsoreplhu...@mail.gmail.com/

Thanks for this list.

Since my focus is on non-Emacs tools, many of those tools do not
qualify although I found it very flattering that you were mentioning
Memacs to me. :-)

Parsers is a very good keyword. However, I will link
https://orgmode.org/worg/org-tools/index.html because it already has
a comprehensive list of Org mode parsers we should re-use here.
Maybe you want to add the racket parsers to it? (I can't contribute
to Worg any more because of some strange technical issue I can't
solve myself).

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Help requested: Support for basic Org mode support in tools outside of Emacs

2021-08-04 Thread Karl Voit
Hi,

Thanks for all the feedback so far. It's really cool!

I would like to add a clarification: the list of tools I'm
collecting is a list *outside* of Emacs. Emacs is mentioned once
because it needs to be there. However, I'm not interested in listing
Emacs-related modules, projects like Memacs (thanks for mentioning
that!), and such.

My focus is on Emacs-independent tools, emphasizing the argument
that Org mode is not Emacs-only and its syntax does have
applications outside of Emacs as well because it is a well-defined
syntax in the sense of
https://karl-voit.at/2017/09/23/orgmode-as-markup-only/

And if you do mention a tool, it would be awesome when you could add
a syntax compatibility check according to my table on
https://github.com/novoid/github-orgmode-tests/blob/master/orgmode_support.org
as well since I don't have the resources to try out all tools
myself.

Thanks!

* Karl Voit  wrote:
> Hi,
>
> I'm collecting information on basic Org mode support in tools that
> are not Emacs.
>
> I already have: GitHub, GitLab (exactly like GitHub), OrgModeWeb,
> Orgzly, Orgro, Emacs, vim-orgmode.
>
> What I need is information on much more tools.
>
> I have set up a syntax checking file on
> https://github.com/novoid/github-orgmode-tests/blob/master/orgmode_support.org
> which also contains my current compatibility table for the most
> basic set that makes sense as a Markdown-pendant outside of Emacs
> according to my subjective judgement on Org mode at the bottom.
>
> My focus is on tools that - at least - offer text formatting syntax
> highlighting for *bold* /italic/ and so forth. The rest could be
> "works as text but has no special support for outlining and more".
>
> The goals is to emphasize that there are much more tools that allow
> for viewing and/or editing data in Org mode syntax.
>
> Since I don't have an iPhone, iOS-based tools supporting Org mode
> syntax is very much appreciated.
>
> Please do hand in more lines for the table either here, via email or
> as a GitHub pull request.
>
> Thank you!
>


-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Help requested: Support for basic Org mode support in tools outside of Emacs

2021-08-04 Thread Karl Voit
Hi Robert,

* Robert Horn  wrote:
>
> Karl Voit writes:
>
>> I'm collecting information on basic Org mode support in tools that
>> are not Emacs.
>>
>
> If email integration is considered support, you can add
>
> mu (searching for mu4e will eliminate most of the false positives for
> "mu" when searching)
> notmuch
>
> They both have org-mode integrations.  E.g., create an org-mode task
> from within the email reader, with link back to the email.

Good to know but my focus are tools outside of Emacs. I just
mentioned Emacs once in the table to make sure it's there. However,
I won't collect all org-related modules within Emacs as it is a
different use-case.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Help requested: Support for basic Org mode support in tools outside of Emacs

2021-08-04 Thread Karl Voit
* Kristian Grönberg  wrote:
>
> Beorg for iOS (https://beorgapp.com) , would be one.

I don't have access to iOS devices. Could you hand in a
compatibility row according to my table?

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Help requested: Support for basic Org mode support in tools outside of Emacs

2021-08-03 Thread Karl Voit
Hi,

I'm collecting information on basic Org mode support in tools that
are not Emacs.

I already have: GitHub, GitLab (exactly like GitHub), OrgModeWeb,
Orgzly, Orgro, Emacs, vim-orgmode.

What I need is information on much more tools.

I have set up a syntax checking file on
https://github.com/novoid/github-orgmode-tests/blob/master/orgmode_support.org
which also contains my current compatibility table for the most
basic set that makes sense as a Markdown-pendant outside of Emacs
according to my subjective judgement on Org mode at the bottom.

My focus is on tools that - at least - offer text formatting syntax
highlighting for *bold* /italic/ and so forth. The rest could be
"works as text but has no special support for outlining and more".

The goals is to emphasize that there are much more tools that allow
for viewing and/or editing data in Org mode syntax.

Since I don't have an iPhone, iOS-based tools supporting Org mode
syntax is very much appreciated.

Please do hand in more lines for the table either here, via email or
as a GitHub pull request.

Thank you!

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Dynamic block tables: adding prefix of "id:" to %ID

2021-07-28 Thread Karl Voit
* Ihor Radchenko  wrote:
> Karl Voit  writes:
>> Thanks, this sounds clever and I think I understand the code.
>> Although I would have preferred not to overwrite a function. I
>> always have a fear that this leads to nasty side-effects with future
>> updates.
>
> That's not overwriting. org-columns-modify-value-for-display-function is
> not a function, but a custom variable defaulting to nil. You have all
> rights to set it to whatever you wish.

Oh, this is reassuring. Thank you!

>> Without deeper knowledge, I was astonished that C-h f
>> org-columns-modify-value-for-display-function did not lead to a
>> matching function and C-h v ... to a matching variable.
>
> Hmm. You are right. This should be a bug. It happens because
> org-colview.el is only loaded after you actually run column view or
> corresponding dblock. Before that, Emacs is not aware about this
> variable (unless you require org-colview manually in your config).
>
>> When I applied the new change to update a table in a file of 71k
>> lines of org, I had to cancel the process after over two hours
>> without a result. Before the change, updating this table took
>> roughly 20 minutes.
>
> That's probably because the function I provided tries to compute the
> description part of the link by querying the headline for each result.
> You may get much better performance using the following version:
>
> (defun yant/org-columns-custom-formatter (column-title value)
>   "Format column values for columns with ID-LINK title as proper Org mode id: 
> link."
>   (pcase column-title
> ("ID-LINK"
>  (format "[[id:%s]]" value))
> (_ nil)))

I can confirm that this version does not have any negative impact
compared to the version without your code.

If anybody is interested why this is taking roughly 20min to update
one table:

| - command-execute  553233  93%
|  - call-interactively  553233  93%
|   - funcall-interactively  553233  93%
|- org-ctrl-c-ctrl-c 553233  93%
| - org-update-dblock553228  93%
|  - org-dblock-write:columnview 553228  93%
|   - org-columns--capture-view  553212  93%
|- org-columns   540042  91%
| - org-columns--display-here536947  90%
|  - face-remap-add-relative 527000  88%
|   - face-remap-order   526004  88%
|- sort  521312  88%
|   face-attrs-more-relative-p   458136  77%
|  + org-columns--new-overlay  2008   0%
|face-attribute 205   0%
|  + org-columns--overlay-text   44   0%
|org-get-level-face   4   0%
| + org-map-entries1506   0%
| + org-columns-compute-all1441   0%
| + org-columns--set-widths   8   0%
|+ org-map-entries12126   2%
|+ org-columns-quit  16   0%
|   + org-table-align12   0%
|   + org-columns--clean-item 4   0%
| + org-element-context   5   0%
| + ...   38956   6%
| + timer-event-handler 166   0%
| + redisplay_internal (C function)  28   0%


> Best,
> Ihor

Thank Ihor, you have improved yet another part of my Emacs life!

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Dynamic block tables: adding prefix of "id:" to %ID

2021-07-27 Thread Karl Voit
Hi Ihor,

* Ihor Radchenko  wrote:
> Karl Voit  writes:
>
>> I do have a dynamic block table like this:
>> ...
>> | NEXT| [0/0] proj bar | bar | :bar:project: |
>>
>> Is there a way to get the ID column with working ID links such as:
>> ...
>> | NEXT| [0/0] proj bar | id:bar | :bar:project: |
>
> You may customise org-columns-modify-value-for-display-function:
>
> (defun yant/org-columns-custom-formatter (column-title value)
>   "Format column values for columns with ID-LINK title as proper Org mode id: 
> link."
>   (pcase column-title
> ("ID-LINK"
>  (format "[[id:%s][%s]]"
>value
>(org-with-point-at (org-id-find value 'marker)
>(org-get-heading t t t t
> (_ nil)))
> (setq org-columns-modify-value-for-display-function 
> #'yant/org-columns-custom-formatter)
>
> Then, you can use the following dblock. Note that I renamed the column
> name to "ID-LINK"
>
> #+BEGIN: columnview :id global :match 
> "+project-focus/!+STARTED|+NEXT|+WAITING" :format "%TODO(State) %ITEM(What) 
> %ID(ID-LINK) %TAGS(Tags)"
> #+END:

Thanks, this sounds clever and I think I understand the code.
Although I would have preferred not to overwrite a function. I
always have a fear that this leads to nasty side-effects with future
updates.

Without deeper knowledge, I was astonished that C-h f
org-columns-modify-value-for-display-function did not lead to a
matching function and C-h v ... to a matching variable.

However, I set up following test file and it worked:

#+BEGIN: columnview :id global :match 
"+project+focus/!+STARTED|+NEXT|+WAITING" :format "%TODO(State) %ITEM(What) 
%ID(ID-LINK) %TAGS(Tags)"
| State | What   | ID-LINK| Tags|
|---+++-|
| NEXT  | [/] focus proj | [[id:2021-07-27-focus-proj][[/] focus proj]] | 
:focus:project: |
#+END:

* Test

** NEXT [/] focus proj  
 :focus:project:
:PROPERTIES:
:CREATED:  [2021-07-27 Tue 13:59]
:COOKIE_DATA: todo recursive
:ID:   2021-07-27-focus-proj
:END:

** NEXT [/] non-focus proj  
:project:
:PROPERTIES:
:CREATED:  [2021-07-27 Tue 13:59]
:COOKIE_DATA: todo recursive
:ID:   2021-07-27-non-focus-proj
:END:

When I applied the new change to update a table in a file of 71k
lines of org, I had to cancel the process after over two hours
without a result. Before the change, updating this table took
roughly 20 minutes.

Therefore, this somehow makes a poor performance even worse.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Dynamic block tables: adding prefix of "id:" to %ID

2021-07-25 Thread Karl Voit
Hi,

* Kristian Grönberg  wrote:
>
> I didn't read your question properly.
> Would it work for you to use the "<>"?
>
> *** <> barheading
>:PROPERTIES:
>:ID: [[bar][barheading]]
>:END:
>
> /Kris

I'm afraid not because the dynamic block would duplicate the
target definition and not generating a link. 

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Dynamic block tables: adding prefix of "id:" to %ID

2021-07-23 Thread Karl Voit
Hi Kristian,

* Kristian Grönberg  wrote:
>
> hi Karl,
>
> I had to solve this by putting the link inside of the heading, like so:
>
> * STARTED proj foo
>:PROPERTIES:
>:ID: [[foo][id]]
>:END:

I can't follow you here.

How does a working link to your heading look like?

Here are some of my tests:

- id:bar → works

- id:foo → not working

- id:baz → not working

- id:myfoo → not working
- id:myid → not working

*** barheading
:PROPERTIES:
:ID:   bar
:END:

*** fooheading
:PROPERTIES:
:ID:   [[foo]]
:END:

*** bazheading
:PROPERTIES:
:ID:   id:baz
:END:

*** example
:PROPERTIES:
:ID: [[myfoo][myid]]
:END:

> However this is not optimal since viewing the same ID property with "org-a=
> genda-custom-commands" includes the link as well (which for me is not good=
>  since I have long links).
>
> Perhaps someone else has a better solution.
>
> /Kris
>
> On Friday, July 23rd, 2021 at 11:46, Karl Voit  wrot=
> e:
>
>> Hi,
>> =
>
>
>> I do have a dynamic block table like this:
>> =
>
>
>> #+BEGIN: columnview :id global :match "+project-focus/!+STARTED|+NEXT|+W=
> AITING" :format "%TODO(State) %ITEM(What) %ID(ID) %TAGS(Tags)"
>> =
>
>
>> | State | What | ID | Tags |
>> =
>
>
>> |-++-+---|
>> =
>
>
>> | STARTED | [12/14] proj foo | foo | :foo:project: |
>> =
>
>
>> | NEXT | [0/0] proj bar | bar | :bar:project: |
>> =
>
>
>> | STARTED | [191/191] proj baz | baz | :baz:project: |
>> =
>
>
>> #+END:
>> =
>
>
>> Is there a way to get the ID column with working ID links such as:
>> =
>
>
>> #+BEGIN: columnview :id global :match "+project-focus/!+STARTED|+NEXT|+W=
> AITING" :format "%TODO(State) %ITEM(What) %ID(ID) %TAGS(Tags)"
>> =
>
>
>> | State | What | ID | Tags |
>> =
>
>
>> |-+++---|
>> =
>
>
>> | STARTED | [12/14] proj foo | id:foo | :foo:project: |
>> =
>
>
>> | NEXT | [0/0] proj bar | id:bar | :bar:project: |
>> =
>
>
>> | STARTED | [191/191] proj baz | id:baz | :baz:project: |
>> =
>
>
>> #+END:
>> =
>
>
>> Thanks!
>> =
>
>
>> =
> --=
> --=
> --=
> --=
> --=
> --=
> --=
> --=
> --=
> --=
> --=
> -
>> =
>
>
>> get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mod=
> e:
>> =
>
>
>> > get Memacs from https://github.com/novoid/Memacs <
>> =
>
>
>> Personal Information Management > http://Karl-Voit.at/tags/pim/
>> =
>
>
>> Emacs-related > http://Karl-Voit.at/tags/emacs/
> ---a8d906ea5b9eed33670cb7379910ea33--
>
> ---34bede87e6eb1c0d1b98c778939fee68
> Content-Type: application/pgp-signature; name="signature.asc"
> Content-Description: OpenPGP digital signature
> Content-Disposition: attachment; filename="signature.asc"
>
>
>
> ---34bede87e6eb1c0d1b98c778939fee68--
>
>
>


-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Dynamic block tables: adding prefix of "id:" to %ID

2021-07-23 Thread Karl Voit
Hi,

I do have a dynamic block table like this:

#+BEGIN: columnview :id global :match "+project-focus/!+STARTED|+NEXT|+WAITING" 
:format "%TODO(State) %ITEM(What) %ID(ID) %TAGS(Tags)"
| State   | What   | ID  | Tags  |
|-++-+---|
| STARTED | [12/14] proj foo   | foo | :foo:project: |
| NEXT| [0/0] proj bar | bar | :bar:project: |
| STARTED | [191/191] proj baz | baz | :baz:project: |
#+END:

Is there a way to get the ID column with working ID links such as:

#+BEGIN: columnview :id global :match "+project-focus/!+STARTED|+NEXT|+WAITING" 
:format "%TODO(State) %ITEM(What) %ID(ID) %TAGS(Tags)"
| State   | What   | ID | Tags  |
|-+++---|
| STARTED | [12/14] proj foo   | id:foo | :foo:project: |
| NEXT| [0/0] proj bar | id:bar | :bar:project: |
| STARTED | [191/191] proj baz | id:baz | :baz:project: |
#+END:

Thanks!

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: how to document/comment a complex org table formula

2021-07-05 Thread Karl Voit
Hi Uwe,

* Uwe Brauer  wrote:
>
> Is there any way to document or comment such a formula, since I am sure
> that within days I don't remember why I chose that formula?

This is not a solution for really complex formulas. However, please
do note that standard org has:

Named references: https://orgmode.org/manual/References.html
Name assignment:
https://orgmode.org/manual/Advanced-features.html#Advanced-features

For some cases, this may help.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Export Org mode files to (gag, barf) MS Office?

2021-07-01 Thread Karl Voit
Hi Brandon,

* Brandon Taylor  wrote:
> --_000_SA1PR13MB4799DBE017BDC4DA869BA10BA2059SA1PR13MB4799namp_
> Content-Type: text/plain; charset="Windows-1252"
> Content-Transfer-Encoding: quoted-printable
>
> I know we=92re not supposed to really even TALK about proprietary software =
> in FOSS communities like this one, but I can=92t help but wonder if someone=
>  might consider making (an) Emacs plugin(s) that allow(s) a user to export =
> Org mode files to Microsoft Office file formats such as .docx, .xlsx and th=
> e like? Or is/are there already (a) plugin(s) in the MELPA that can do this=
> ?

If you go down the pandoc path and you need to comply with company
templates and such, you might want to read
https://karl-voit.at/2017/12/17/pandoc-docx-reference/ where you can
place a docx file at a specific path and you end up with nice end
results.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Feature request: M-u M-x org-babel-mark-block -> mark block including block definition

2021-06-22 Thread Karl Voit
Hi,

I'd like to propose a new universal argument functionality for
org-babel-mark-block: it should mark the block content (as without
universal argument) and the whole block definition as well.

Current behavior with and without universal argument:

#+NAME: my-example
#+BEGIN_SRC python
print('hello world!') <-- marked
#+END_SRC

Proposed behavior:

Without universal argument:

#+NAME: my-example
#+BEGIN_SRC python
print('hello world!')<-- marked
#+END_SRC

With universal argument:

#+NAME: my-example   <-- marked
#+BEGIN_SRC python   <-- marked
print('hello world!')<-- marked
#+END_SRC<-- marked


Personal background/motivation:

I often add blocks of all kind to list items:

- foobar
  #+BEGIN_SRC python
  print('hello world!') <-- marked
  #+END_SRC

This enables me to collapse and expand the list item together with
the block.

So far, my process of adding a block to a list item was:

- create list item
- press RET (which goes to column 1, not the indented list column)
- create the block (by using custom yankpad snippets, simulating the
  outdated quick templates(?) with, e.g.,  THIS should be addressed
  here
- move block to the right to match the desired column
  - so far, I'm using "C-x r t SPC SPC RET" but I should switch to
indent-rigidly which I covered on
https://karl-voit.at/2021/04/10/GLT21-emacs-org-features/

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Changed list indentation behavior: how to revert?

2020-11-13 Thread Karl Voit
Hi!

I'm on Org mode maint git repo, currently v9.3.6.

I recently upgraded from an older git commit version.

Since the upgrade I do have a different behavior:

- Consider this list itemX
A 1
2

When I press RET at the "X" above, I end up at position "1". With
another RET, cursor ends up at "2". I'd love to get back the
previous behavior where RET at "X" always ended up at "A".

Unfortunately, there are tons of org*indent* variables out there.
I'd appreciate it very much if somebody knows what variable I need
to modify to get back to the previous behavior.

Thanks!


If somebody is interested why I do find the old one much better:
When I need one multi-line list item, I just keep on typing while
auto-wrap is active or I press M-q to re-format the item
accordingly. For a new list item, I'm using M-RET which solves the
indentation correctly.

When I press RET after the last list item to continue with a
non-list item, I prefer the old behavior which does not add the
extra spaces.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [bug] Display issue with broken links

2020-06-05 Thread Karl Voit
* Nicolas Goaziou  wrote:
> Hello,

Hi Nicolas,

> Karl Voit  writes:
>
>> I've found an issue that leads to broken Org mode syntax without
>> noticing. Considering the following example:
>>
>> : foo [[https://Karl-Voit.at][bar]] baz
>>
>> When I put my cursor right after "foo" and press the DEL key, my Org
>> mode shows this:
>>
>> : foo bar baz
>>
>> ... as if the link was removed properly, keeping only the
>> description text.
>>
>> However, in reality, the remaining thing is different:
>>
>> : foo [https://Karl-Voit.at][bar]] baz
>>
>> This snippet is displayed properly at least after reloading the file
>> or switching to text-mode and back to org-mode.
>
> FWIW I cannot reproduce it.

Oh. Good to know.

>> I've made a screencast to demo this:
>> https://karl-voit.at/temp/2020-06-05T11.28.16_Org_mode_display_issue_with_broken_link_--_emacs_screencasts.gif
>
> Proofs including an animated Nyan Cat are not considered valid, sorry.

Don't discriminate my horizontal scroll bar cat! :-)

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[bug] Display issue with broken links

2020-06-05 Thread Karl Voit
Hi!

I've found an issue that leads to broken Org mode syntax without
noticing. Considering the following example:

: foo [[https://Karl-Voit.at][bar]] baz

When I put my cursor right after "foo" and press the DEL key, my Org
mode shows this:

: foo bar baz

... as if the link was removed properly, keeping only the
description text.

However, in reality, the remaining thing is different:

: foo [https://Karl-Voit.at][bar]] baz

This snippet is displayed properly at least after reloading the file
or switching to text-mode and back to org-mode.

I've made a screencast to demo this:
https://karl-voit.at/temp/2020-06-05T11.28.16_Org_mode_display_issue_with_broken_link_--_emacs_screencasts.gif

This happens with Emacs 26.1 as well as 26.3 with Org mode from
maint git (9.3.6).


Fun fact: I initially thought, this is a hidden feature which I
started to use happily ;-)
Considering
https://www.reddit.com/r/orgmode/comments/gwa2i4/i_want_to_remove_the_link_and_preserve_the_text/
I would love to see something like
org-remove-link-and-keep-description-text built-in.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: ox-confluence.el: omit radio target links (that end up being dead links)

2020-05-23 Thread Karl Voit
Bastien (b...@gnu.org) wrote:

> Hi Karl,

Hi Bastien,

> I fixed this here:
> https://code.orgmode.org/bzg/org-mode/commit/ceb0ef95fb
> Thanks for the report,

Perfect timing for the fix - thank you!

-- 
Karl Voit



Re: [patch suggestion] Mitigating the poor Emacs performance on huge org files: Do not use overlays for PROPERTY and LOGBOOK drawers

2020-05-07 Thread Karl Voit
Hi,

* Karl Voit  wrote:
> Hi Ihor,
>
> * Ihor Radchenko  wrote:
>>
>> So far, I came up with the following partial solution searching and
>> showing hidden text.
>>
>> (defun org-find-text-property-region (pos prop)
>> (define-advice isearch-search-string (:after ( _) put-overlay)
>> (defun org-restore-invisibility-specs ( _)
>> (add-hook 'post-command-hook #'org-restore-invisibility-specs)
>> (defun org-flag-region (from to flag spec)
>> (defun org-unfontify-region (beg end  _maybe_loudly)
>
> After a couple of hours working with these patches, my feedback is
> very positive. Besides some visual glitches when creating a new
> heading with org-expiry-insinuate activated (which automatically
> adds :CREATED: properties), I could not detect any side-effect so
> far (will keep testing).
>
> The visual glitch looks like that:
>
>:PROPERTIES:X:CREATED:  [2020-05-04 Mon 18>54]
> X
>
> ... with "X" being my character that symbolizes collapsed content.
> The way it looked without the patch was a simple collapsed property
> drawer.

Here some hard numbers to demonstrate the impact:

my-org-agenda: from 11-16s down to 10 -> not much of a difference

helm-org-contacts-refresh-cache: 29-59s down to 2½ -> HUGE

Emacs boot time: 50-65s down to 10 -> HUGE

Navigating the cursor in large Org files -> HUGE subjective impact

>>> Anyway, the real fix should come from Emacs itself. There are ways to
>>> make overlays faster. These ways have already been discussed on the
>>> Emacs devel mailing list, but no one implemented them. It is a bit sad
>>> that we have to find workarounds for that.
>>
>> I guess that it is a very old story starting from the times when XEmacs
>> was a thing [1]. I recently heard about binary tree implementation of
>> overlays (there should be a branch in emacs git repo) [2], but there was
>> no update on that branch for a while. So, I do not have much hope on
>> Emacs implementing efficient overlay access in the near future. (And I
>> have problems with huge org files already).
>
> I can not express how this also reflects my personal situation.
>
>> [1] 
>> https://www.reddit.com/r/planetemacs/comments/e9lgwn/history_of_lucid_emacs_fsf_emacs_schism/
>> [2] https://lists.gnu.org/archive/html/emacs-devel/2019-12/msg00323.html
>
> [3] https://karl-voit.at/2020/05/03/current-org-files
>

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [patch suggestion] Mitigating the poor Emacs performance on huge org files: Do not use overlays for PROPERTY and LOGBOOK drawers

2020-05-04 Thread Karl Voit
Hi Ihor,

* Ihor Radchenko  wrote:
>
> So far, I came up with the following partial solution searching and
> showing hidden text.
>
> (defun org-find-text-property-region (pos prop)
> (define-advice isearch-search-string (:after ( _) put-overlay)
> (defun org-restore-invisibility-specs ( _)
> (add-hook 'post-command-hook #'org-restore-invisibility-specs)
> (defun org-flag-region (from to flag spec)
> (defun org-unfontify-region (beg end  _maybe_loudly)

After a couple of hours working with these patches, my feedback is
very positive. Besides some visual glitches when creating a new
heading with org-expiry-insinuate activated (which automatically
adds :CREATED: properties), I could not detect any side-effect so
far (will keep testing).

The visual glitch looks like that:

:PROPERTIES:X:CREATED:  [2020-05-04 Mon 18>54]
X

... with "X" being my character that symbolizes collapsed content.
The way it looked without the patch was a simple collapsed property
drawer.

To me, this is acceptable considering the huge performance gain I
got.

THANK YOU VERY MUCH! I can't remember where I had this way of
working within my large Org files[3] since ages.

>> Anyway, the real fix should come from Emacs itself. There are ways to
>> make overlays faster. These ways have already been discussed on the
>> Emacs devel mailing list, but no one implemented them. It is a bit sad
>> that we have to find workarounds for that.
>
> I guess that it is a very old story starting from the times when XEmacs
> was a thing [1]. I recently heard about binary tree implementation of
> overlays (there should be a branch in emacs git repo) [2], but there was
> no update on that branch for a while. So, I do not have much hope on
> Emacs implementing efficient overlay access in the near future. (And I
> have problems with huge org files already).

I can not express how this also reflects my personal situation.

> [1] 
> https://www.reddit.com/r/planetemacs/comments/e9lgwn/history_of_lucid_emacs_fsf_emacs_schism/
> [2] https://lists.gnu.org/archive/html/emacs-devel/2019-12/msg00323.html

[3] https://karl-voit.at/2020/05/03/current-org-files

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: ox-confluence.el: omit radio target links (that end up being dead links)

2020-03-17 Thread Karl Voit
Hi,

* Karl Voit  wrote:
>
> As stated on [1] I do have an issue with export to Confluence markup
> via org-mode/contrib/lisp/ox-confluence.el and radio targets[2].
>
> When I am using a snippet like:
>
>| - <> :: this is the explanation to this weird term
>| 
>|   [...]
>| 
>|   Please respect the foo bar everyhere.
>
> ... it gets exported like that:
>
>| - *foo bar* - this is the explanation to this weird term
>| 
>|   [...]
>| 
>|   Please respect the [foo bar|foo bar] everyhere.
>
> These "[foo bar|foo bar]" snippets are then interpreted by
> Confluence as links to the Confluence pages named "foo bar" which
> usually don't exist.
>
> I think it would be a good improvement to ignore radio links in the
> ox-confluence output.

Meanwhile, somebody posted a fix on [1]:

(defun export-radio-links-as-plain-text (link desc info)
  (when (string= "radio" (org-element-property :type link))
desc))

(advice-add #'org-confluence-link :before-until
#'export-radio-links-as-plain-text)

Maybe this is a good idea to include this in the official source code?

> [1] 
> https://www.reddit.com/r/emacs/comments/fk5z1b/how_to_remove_foo_barfoo_bar_links_via/
> I'm asking how to search/replace current expressions as a
> short-term workaround.
>
> [2] https://orgmode.org/manual/Radio-Targets.html

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




ox-confluence.el: omit radio target links (that end up being dead links)

2020-03-17 Thread Karl Voit
Hi!

As stated on [1] I do have an issue with export to Confluence markup
via org-mode/contrib/lisp/ox-confluence.el and radio targets[2].

When I am using a snippet like:

| - <> :: this is the explanation to this weird term
| 
|   [...]
| 
|   Please respect the foo bar everyhere.

... it gets exported like that:

| - *foo bar* - this is the explanation to this weird term
| 
|   [...]
| 
|   Please respect the [foo bar|foo bar] everyhere.

These "[foo bar|foo bar]" snippets are then interpreted by
Confluence as links to the Confluence pages named "foo bar" which
usually don't exist.

I think it would be a good improvement to ignore radio links in the
ox-confluence output.

Thanks!


[1] 
https://www.reddit.com/r/emacs/comments/fk5z1b/how_to_remove_foo_barfoo_bar_links_via/
I'm asking how to search/replace current expressions as a
short-term workaround.

[2] https://orgmode.org/manual/Radio-Targets.html

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)

2020-02-28 Thread Karl Voit
This week, the error re-appeared.

* Karl Voit  wrote:
>
> Thanks for the advice. I ran three test runs in order to find out how output 
> is
> affected:
>
>
> Testrun with disabled org-depend:
> emacs-snapshot --batch --load /home/vk/.emacs.d/init.el --eval '(progn 
> (my-export-agenda))
>261.95s user 1.57s system 99% cpu 4:24.01 total
>
> → I got a result without error
>
>
> Testrun with enabled org-depend:
> emacs-snapshot --batch --load /home/vk/.emacs.d/init.el --eval '(progn 
> (my-export-agenda))'
>117.58s user 1.46s system 99% cpu 1:59.60 total
>
> → much faster result without error :-)  (probably caching?)
>
>
> revoking the two suggested changes and do another test run with org-depend, 
> expecting error:
> emacs-snapshot --batch --load /home/vk/.emacs.d/init.el --eval '(progn 
> (my-export-agenda))'
>114.38s user 1.53s system 99% cpu 1:56.33 total
>
> → much faster result without error (contrary to expection)
>
>
> → the two setting changes do not have an effect for now regarding
>   error/no error due to the fact that I can not reproduce the
>   error.
>
> Retrying when error re-appears.

- setting `org-agenda-before-write-hook' to nil
- `org-icalendar-include-body': 42
- enabled org-depend

: emacs-snapshot --batch --load /home/vk/.emacs.d/init.el --eval '(progn 
(my-export-agenda))'

→ did not finish after running for 4 hours (aborted)


- setting `org-agenda-before-write-hook' to nil
- `org-icalendar-include-body': 42
- *disabled org-depend*

→ produced output within 4min39s


- setting `org-agenda-before-write-hook' to default
- `org-icalendar-include-body': to default
- disabled org-depend

→ produced output within 2min07s


Any other test you want me to run?

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)

2020-02-24 Thread Karl Voit
Hi Bastien,

* Bastien  wrote:
>
> Karl Voit  writes:
>
>> Easy: I could not find any change of the defaults in my
>> configuration[1]. So all of them have to be the default values.
>>
>> [1] https://github.com/novoid/dot-emacs/blob/master/config.org
>
> I would try setting `org-agenda-before-write-hook' to nil (it is set
> to `org-agenda-add-entry-text' by default.
>
> Also, I see `org-icalendar-include-body' is set to 1000 in your setup.
>
> That's a lot and this will generate a lot of strings replacements,
> I suggest trying a lower value for your export-and-write function.

Thanks for the advice. I ran three test runs in order to find out how output is
affected:


Testrun with disabled org-depend:
emacs-snapshot --batch --load /home/vk/.emacs.d/init.el --eval '(progn 
(my-export-agenda))
   261.95s user 1.57s system 99% cpu 4:24.01 total

→ I got a result without error


Testrun with enabled org-depend:
emacs-snapshot --batch --load /home/vk/.emacs.d/init.el --eval '(progn 
(my-export-agenda))'
   117.58s user 1.46s system 99% cpu 1:59.60 total

→ much faster result without error :-)  (probably caching?)


revoking the two suggested changes and do another test run with org-depend, 
expecting error:
emacs-snapshot --batch --load /home/vk/.emacs.d/init.el --eval '(progn 
(my-export-agenda))'
   114.38s user 1.53s system 99% cpu 1:56.33 total

→ much faster result without error (contrary to expection)


→ the two setting changes do not have an effect for now regarding
  error/no error due to the fact that I can not reproduce the
  error.

Retrying when error re-appears.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)

2020-02-23 Thread Karl Voit
* Bastien  wrote:
> Hi Karl,
>
> Karl Voit  writes:
>
>> So maybe I have to invest a weekend or so to bisect the issue. My
>> gut feeling tells me that I won't like the output somehow.
>
> In the meantime, can you share the values of your org-id-* options?

Easy: I could not find any change of the defaults in my
configuration[1]. So all of them have to be the default values.

[1] https://github.com/novoid/dot-emacs/blob/master/config.org

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Feature request: shared radio targets with archive files

2020-02-21 Thread Karl Voit
Hi Bastien,

* Bastien  wrote:
>
> Karl Voit  writes:
>
>> Can somebody estimate on the effort and potential negative
>> implications (performance, caching issues, ...) when this feature
>> would be extended, so that radio targets of foo.org also work[2] in
>> foo.org_archive and vice versa?
>
> Radio targets only work within the same file.
>
> Just like HTML anchor links: voila.
>
> Allowing a radio target to be reached outside the current file would
> lead to blur the distinction between radio targets and... links.

Oh, what a bummer.

> That said, you can write your own function, taking inspiration from
> org-link--search-radio-target and adding it to org-open-link-functions,
> where your function searches the target outside of the current buffer.
>
> Not sure, of course, whether this is trivial or not :)

Hehe.

OK, it was worth the (short) discussion.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)

2020-02-21 Thread Karl Voit
Bonjour Bastien,

* Bastien  wrote:
>
> Karl Voit  writes:
>
>> With disabled org-depend, it is working and finishes in ~5 minutes. With
>> enabled org-depend it (sometimes) end up in an error as described.
>
> Do you need org-depend when exporting?

Well: in all cases where I defined a dependency of task B to a task
A, with disabled org-depend I end up seeing task B on the agenda
although I can not do it at the moment.

So as long as I don't use dependencies, it does not matter. However,
I'm organizing a lecture in the summer term using a very large and
complicated yankpad/yasnippet template for the whole term that is
using many dependencies for approx. 70 todos. With disabled
org-depend, I end up seeing all 70 todos although I may be able to
work on two or three of them at any moment in time.

> If not, I simply suggest to turn org-depend off... or to let-bind
> `org-trigger-hook' and `org-blocker-hook' to nil in your function.
>
> Probably org-depend does a lot of moving back and forth in files to
> check for IDs, and that may explain the time spend by this command
> when you export many files.

This sounds reasonable.

I'm fine with - let's say - +50% 1-day agenda duration and I'm fine
with even an hour of 60d agenda export to ics with enabled
org-depend.  The show-stopper is, when org-depend does run in an
error after hours of exporting without a result. This way, I'm
losing my Org->Android/Radicale workflow or my dependencies.

The longer this thread gets, the more I have to accept that I might
be the only one using dependencies in Org mode. I'm puzzled here
because I do think that dependencies are such a natural thing to
want and use. (I also have several ideas to improve usability of
them to minimize manual effort when defining dependencies.)

So maybe I have to invest a weekend or so to bisect the issue. My
gut feeling tells me that I won't like the output somehow.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Feature request: shared radio targets with archive files

2020-02-20 Thread Karl Voit
Hi!

Only recently, I found radio targets[1] very handy to implement a
glossary within an Org file. This way, any instance of "PIM" can be
linked to one single definition of "- <<>> :: Personal
Information Management" for example.


My question (and feature request):

Can somebody estimate on the effort and potential negative
implications (performance, caching issues, ...) when this feature
would be extended, so that radio targets of foo.org also work[2] in
foo.org_archive and vice versa?


I often have the use-case that I wrote down some definitions as
sub-heading to a task. Its related radio target gets a broken one as
soon as I archive the associated and finished task heading.


Example:

** Reading a paper on keyboards

This is highly relevant to PIM research.

[...]

** DONE Reading a paper about notebooks

*** Notes on the paper about notebooks

- <<>> :: Personal Information Management
  - mentioned in the research chapter
- <<>> :: Another common mediocre example
  - rings a bell somehow

The first PIM instance is highlighted and linked to its definition
below. As soon as the DONE task gets archived, the first PIM
instance is no longer linked to its definition since the related
target got moved to the archive.

Of course, *all* instances within the archive file are unlinked to
their definition targets in the non-archive file as well. The
example works both ways.


Thanks for your ideas


[1] https://orgmode.org/manual/Radio-Targets.html
[2] as in: "links in both files get highlighted" and "all links can 
be followed to their target"

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)

2020-02-20 Thread Karl Voit
* Bastien  wrote:
> Hi Karl,

Hi,

> another suggestion: just send us a minimal extract of your files so
> that we see how org-depend is called, together with what you do and
> what goes wrong when you do it.  Perhaps this will lead to something.

Sure.

https://github.com/novoid/dot-emacs/blob/master/config.org contains:

| (setq my-user-emacs-directory "~/.emacs.d/")
| (use-package org-depend
|   :load-path  (lambda () (expand-file-name (concat my-user-emacs-directory 
"contrib/org-mode/contrib/lisp/")))
| )

... which loads org-depend from my maint Org mode (currently: 9.3
(release_9.3-102-gd20e45.dirty @ mixed installation![...]).

I only use org-depend for:

* TODO Example 1
:PROPERTIES:
:ID: 2020-02-20-foo
:END:

* TODO Example 2
:PROPERTIES:
:BLOCKER: 2020-02-20-foo
:END:

Very rarely, I am using:

* TODO Example 3
:PROPERTIES:
:TRIGGER: 2020-02-20-foo
:END:

Most of the time, source-destination are within the same file. However, in some
cases of using BLOCKER, the two headings might be in two different files.

That's basically it: mostly BLOCKER and a few TRIGGER. I'm unsure if there is
currently a TRIGGER that is still waiting to be activated.

(By the way: is there a built-in feature to look for IDs that are linked
somewhere (BLOCKER properties or ID links) that are broken?)

Ad "what goes wrong when you do it": in my daily work, org-depend is
working fine. The only thing that does not work is exporting my
agenda with:

| emacs --batch --load /home/vk/.emacs.d/init.el --eval '(progn 
(my-export-agenda))'

and:

|  (defun my-export-agenda()
|"Exports Org-mode agenda to ics file"
|(interactive)
|(save-some-buffers)
|
|;; I don't want the error messages in my exported agenda:
|(setq org-agenda-files (remove "~/org/errors.org" org-agenda-files))
|
|(setq max-specpdl-size 1) ;; does not solve issue
|(setq max-lisp-eval-depth 5) ;; does not solve issue
|
|(org-agenda-list nil nil 60)
|(org-agenda-write (concat my-user-emacs-directory 
"var/export/agenda-export.ics"))
|)

With disabled org-depend, it is working and finishes in ~5 minutes. With
enabled org-depend it (sometimes) end up in an error as described. This can
take hours.

> I've never used org-edna, I'm curious to know if there are many users.

Me too ;-)

It's a bit more complicated in syntax but has advanced features org-depend does
not offer. The main reason why I'm thinking of switching is that org-edna
supports something like TRIGGER that also adds relative SCHEDULED date-stamps.
This allows for "if $THAT task gets done, mark $NEXT task as a TODO item and
add a SCHEDULED with three days in the future" which is very handy in some
cases.

> Thanks,

Oh, it's me, who is very thankful, considering the tricky situation to
investigate this issue.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)

2020-02-20 Thread Karl Voit
Hi,

* Bastien  wrote:
>
> Karl Voit  writes:
>
>> A couple days ago, the issue re-appeared (with org-depend being
>> active again). To me, this is a clear indicator, that the issue is
>> content-related and not config/binary-related:
>
> Can you bisect and deduce what part of your contents is producing
> this?  

This is not trivial in my case since I'd have to merge all my Org
mode content into one single large file and make sure that I remove
content during bi-secting that has no link destination from the
remaining content. 

Personally, I'm not convinced that this method will lead to a
minimum example in any case. I can imagine that "number of Org mode
headings/lines" might be involved here which would not trigger the
error when bi-secting via removing.

Currently, I don't see that this is possible without half a day work
or (IMHO more likely) longer which I can't afford right now. :-(

> When you have a clue, could you also bisect and see what
> change in Org introduced this problem for the problematic contents?

This would be trivial when I could locate the issue in a minimal
example.

> Such issues are difficult to reproduce and track outside your files.

Totally agree. I thought somebody else might have faced the same
issue. As long as I am the only person affected, I don't assume that
it can be solved in a proper way. :-(

I ran another test with Emacs 27.0.50 and disabled org-depend. The
task finished after 4½ minutes without any error. Therefore,
following dependencies has to be the culprit here.

Moving from org-depend to org-edna is not trivial for me as well,
considering the amount of meta-data to be modified. On the other
hand, this would be interesting to see if org-edna can handle this
use-case in a better way. In case somebody has experience with
migration process and/or dependency lookup performance, I'm very
interested.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)

2020-02-19 Thread Karl Voit
Hi Bastien,

* Bastien  wrote:
> Hi Karl,
>
> did you manage to fix this one?
>
> I read "Property drawers allowed before first headline" in
> etc/ORG-NEWS from the master branch:
>
>   Property drawers are now allowed before the first headline.
>
>   Org mode is moving more towards making things before the first
>   headline behave just as if it was at outline level 0.  Inheritance
>   for properties will work also for this level.  In other words:
>   defining things in a property drawer before the first headline will
>   make them "inheritable" for all headlines.
>
> I guess your problem might be related to this new behavior.

A couple days ago, the issue re-appeared (with org-depend being
active again). To me, this is a clear indicator, that the issue is
content-related and not config/binary-related:

Emacs 26.3:

: emacs --batch --load /home/vk/.emacs.d/init.el --eval '(progn 
(my-export-agenda))'
: [...]
: Garbage collecting...
: Garbage collecting...done
: Garbage collecting...
: Garbage collecting...done
: Garbage collecting...
: Garbage collecting...done
: Position saved to mark ring, go back with ‘C-c &’.
: Position saved to mark ring, go back with ‘C-c &’.
: Position saved to mark ring, go back with ‘C-c &’.
: Position saved to mark ring, go back with ‘C-c &’.
: Position saved to mark ring, go back with ‘C-c &’.
: Position saved to mark ring, go back with ‘C-c &’.
: Garbage collecting...
: Garbage collecting...done
: Variable binding depth exceeds max-specpdl-size
: emacs --batch --load /home/vk/.emacs.d/init.el --eval   8029,80s user 4,30s 
system 99% cpu 2:14:02,16 total

Yes, that's over two hours.

With Emacs 27.0.50, the same job is currently running for over five hours. I
guess this will end with an error as well some day.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Emacs hangs sometimes for no reason

2020-02-12 Thread Karl Voit
* briangpowell .  wrote:
>
> Emacs periodically saves all files that you are visiting; this is called
> auto-saving . Auto-saving prevents you from losing more than a limited
> amount of work if the system crashes. By default, auto-saves happen every
> 300 keystrokes, or after around 30 seconds of idle time.
>
> Suggest you try making your auto-save-interval variable much larger and see
> if that helps

I had to disable auto-save because I'm using org-crypt which would
leak sensitive information to my disk (+ git repository).

I'm using real-auto-save instead.

> Also suggest making smaller .org files when practical

Way too late for that ;-) So far, I've found no one with bigger Org
files. I plan to blog about small versus big Org files in the
upcoming weeks.


However, your suggestions are valid points for the general
situation.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)

2020-02-11 Thread Karl Voit
* Bastien  wrote:
> Hi Karl,
>
> Karl Voit  writes:
>
>> So the issue seems to be gone (for now) but I don't know why it
>> appeared in the first place nor why it disappeared in the meantime.
>
> /me looks for a good xkcd quote. :)

Alternatively: https://en.wikipedia.org/wiki/Haiku_in_English  ;-)

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)

2020-02-11 Thread Karl Voit
* Bastien  wrote:
> Hi Karl,

Hi Bastien,

> did you manage to fix this one?

Well ...

> I read "Property drawers allowed before first headline" in
> etc/ORG-NEWS from the master branch:
>
>   Property drawers are now allowed before the first headline.
>
>   Org mode is moving more towards making things before the first
>   headline behave just as if it was at outline level 0.  Inheritance
>   for properties will work also for this level.  In other words:
>   defining things in a property drawer before the first headline will
>   make them "inheritable" for all headlines.
>
> I guess your problem might be related to this new behavior.

Since I'm not using drawers before the first headline, I don't
understand how this might relate to my issue.

However, I just re-enabled org-depend which I had disabled for
batch mode only in order to get the export done. Then I ran the
batch process for the export and it finished without an error within
1min53sec. :-)

So the issue seems to be gone (for now) but I don't know why it
appeared in the first place nor why it disappeared in the meantime.

I'm using Org mode from maint. Currently on my side: d20e45b18 (3
days ago). The version that had the issue was from November or
December. I could provide the exact ID hash if anybody is
interested.

Thanks anyway and thanks for the pointer with the new feature. That
might come handy when there is a property which does not have a
file-local version.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Emacs hangs sometimes for no reason

2020-02-11 Thread Karl Voit
* Sebastian Christ  wrote:
> Hi list,
>
> in the last couple weeks (perhaps months?) Emacs hangs for no specific
> reason for me. The single constant is, that when it hangs, it hangs
> while I'm in org-mode. This occurs on multiple circumstance as
>
> - changing the outline structure by demoting and promoting headline
> - when refiling
> - re-schedule in agenda
> - yanking
> - perhaps more

Same here with 3 different Emacs versions.

> The strange thing is that it happens unpredictably, e.g. I re-schedule
> 11 items without problems and the 12th one lets Emacs crash. Sometimes
> it works for days without problems and then I promote a headline and
> Emacs crashes. Very sad :(

I did not have a crash here, though.

> My actual question is, had someone had similar issues? Or is it just me
> with my configuration?
>
> Perhaps someone can guide me on how I can find the root cause for this?
> I pretty much lost here.
>
> Thanks in advance for any hints.

In a discussion on Org/Emacs scalability issues, I got a hint[1] to use
gcmh.el which indicates garbage collecting activity. My
freeze-moments are almost entirely related to garbage collecting.

You might want to try that.

I've got no solution or workaround so far.

[1] 
https://www.reddit.com/r/orgmode/comments/e9p84n/scaling_org_better_to_use_more_medsize_files_or/fcm5bsc/

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)

2020-01-19 Thread Karl Voit
Hi all,


BACKGROUND:

I'm using org-depend since ages[1]. As a matter of fact, it was the
initial reason why I started with Org mode in the first place.

One of my many workflows[2] exports the agenda for the upcoming 60
days into an ICS file via a cron job during night:

: emacs-snapshot --batch --load /home/vk/.emacs.d/init.el --eval '(progn 
(my-export-agenda))'

my-export-agenda[6] basically consists of:
: (org-agenda-list nil nil 60)
: (org-agenda-write (concat my-user-emacs-directory 
"var/export/agenda-export.ics"))

This ICS file is then postprocessed and uploaded to my calendar server
so that my mobile phone calendar is able to display events and
appointments.


This workflow stopped working end of December.


ERRORS and INVESTIGATION:

Error message when this batch run of Emacs exits after 5 hours(!):
: Lisp nesting exceeds ‘max-lisp-eval-depth’

I updated my Org version[3] recently to get v9.3 from git maint. This
was Wed Dec 4 10:37:19 2019 +0100. So the issue with the ICS export
did not appear at the same time of the update.

I also get:
: [...]
: Preparing diary...done
: Preparing diary...done
: Position saved to mark ring, go back with ‘C-c &’. [1038 times]
: org-before-first-heading-p: Variable binding depth exceeds max-specpdl-size

I changed the value for the variables without changing the result:
: (setq max-specpdl-size 1)
: (setq max-lisp-eval-depth 5)

I even upgraded my Emacs version from 25 to 27[3]. No change.

I reduced my set of org-agenda-files and did some test runs: most
single org files resulted in an ICS export. Some single org files did
result in the error.

Reducing the export period from 60 to 7 days did not change the error.

I also get following as execution cancellation error:
: Before first headline at position 586 in buffer  *temp*-99684

When running the job, I see *lots* lines like[4]:
: Garbage collecting...
: Garbage collecting...done

To me, it's a data-related issue with my Org mode files so that others
most likely are not able to reproduce my issue at all.

Disabling org-depend results in a working ICS export that took much
less time. I'm not sure if org-depend is directly related or just
reduces "the complexity" such that the job is able to be finalized.


QUESTIONS:

I'm looking for ideas what I may check in order to be able to use
org-depend again.

Should I do a profiler report? How do I have to do this in order to
get good results?

Further more: is here somebody able to tell if org-edna[5] does have
this issues as well? After all, org-edna is somewhat more complex than
org-depend.


A migration from org-depend to org-edna would be doable to me but with
a decent effort. (I'm thinking of migrating only tasks that are not
DONE or CANCELLED as I do think closed tasks do not irritate org-edna
with old org-depend syntax.)



[1] https://karl-voit.at/2016/12/18/org-depend/
Almost everything I use is :BLOCKER: properties and very
rarely :TRIGGER: events.

[2] just a selection is described on 
https://karl-voit.at/2019/09/25/using-orgmode/

[3] Org mode version 9.3 (release_9.3-3-g46319b.dirty @ mixed installation!
GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
   3.22.11) of 2019-12-15, unofficial emacs-snapshot build

[4] I setup up "gcmh" package because of a comment on:

https://www.reddit.com/r/orgmode/comments/e9p84n/scaling_org_better_to_use_more_medsize_files_or/fcm5bsc/

[5] https://elpa.gnu.org/packages/org-edna.html

[6] https://github.com/novoid/dot-emacs/blob/master/config.org


-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: ox-latex: missing :LATEX_HEADER:

2019-12-04 Thread Karl Voit
* Kaushal Modi  wrote:
>
> On Wed, Dec 4, 2019 at 1:32 PM Karl Voit  wrote:
>
>> Hi,
>>
>> For LaTeX export, I'd love to use ::LATEX_HEADER: instead of
>> file-based settings with #+LATEX_HEADER.
>
> Typically all Org export keywords work in properties too, but with an
> "EXPORT_" prefix.
>
> See if the ":EXPORT_LATEX_HEADER:" property works ..

Of course. Stupid me. I forgot the changed prefix when exporting my
very old heading. AFAIR, this got changed a while ago and I did not
update my current drawers. :-(

Thanks for reminding me!

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




ox-latex: missing :LATEX_HEADER:

2019-12-04 Thread Karl Voit
Hi,

I tend to have everything within larger Org mode file. Therefore, I
mostly rely on export settings I'm able to control via PROPERTY
drawer values instead of file-based methods. Most of the time, there
is always a property version as well as a file-based version for
settings.

For LaTeX export, I'd love to use ::LATEX_HEADER: instead of
file-based settings with #+LATEX_HEADER.

Is there a reason why this important variable is not available as
per-sub-hierarchy/drawer?

Thanks!

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




orgformat.py: util library for generating Org mode from Python

2019-11-06 Thread Karl Voit
Hi,

In the recent days, I've been busy migrating orgformat[1] from Memacs[2] and
lazyblorg[3] to a repository on its own. It's a utility library that provides a
variety of Python functions that help dealing with generating non-trivial Org
mode content such as date- or time-stamps. I've added good documentation,
valuable unit tests to all functions and even added type annotations to the
library itself (playing around with mypy[4] which I recommend).

You may find some of the functions interesting for your project and I'm happy
to receive pull requests of functions that you'll move out from your project to
this general purpose Org mode library as well.

Find the (horrible coloured) HTML docu at [5].

HTH

[1] https://github.com/novoid/orgformat
[2] https://github.com/novoid/Memacs
[3] https://github.com/novoid/lazyblorg
[4] https://mypy.readthedocs.io/en/latest/introduction.html
[5] 
http://htmlpreview.github.io/?https://github.com/novoid/orgformat/blob/master/orgformat.html

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




":COOKIE_DATA: todo recursive" as elisp for everything

2019-11-03 Thread Karl Voit
Hi!

I plan to use the following property for all of my projects:

:COOKIE_DATA: todo recursive

You can find details on this about this on [3].

In order to get this behavior for all of my headings that are using
progress cookies, I'd prefer the possibility to define this in my
init.el instead of hundreds of scattered drawers.

On [1] I found the file-based method of "#+PROPERTY: COOKIE_DATA
recursive" which is a start but I still need to test it in order to
confirm that this is working with "todo" and "recursive".

I'm not an elisp expert but [2] doesn't seem to respect any elisp
variable that controls "todo recursive" as well.

Is there a way of defining this in my general setup?

Thanks!


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

[2] https://github.com/bzg/org-mode/blob/master/lisp/org.el#L10389

[3] https://karl-voit.at/2019/11/03/org-projects/

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Dates with repeaters, times and range

2019-11-03 Thread Karl Voit
* Nathan Neff  wrote:
>
> I have a question that's probably FAQ material but I was wondering
> what the "best" way to do something like this would be:
>
> I have a meeting that's scheduled from 10:00 - 11:00 for the next three
> days.

org-clone-subtree-with-time-shift was already mentioned. Here is an
article that explains this in detail:
https://karl-voit.at/2017/01/15/org-clone-subtree-with-time-shift/

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




@name-tags instead of TODO keywords to assign people (was: Org mode for meeting minutes)

2019-11-03 Thread Karl Voit
* Christian Egli  wrote:
> 
> The idea is that you use type todos using the people involved at the
> meeting. Below is an example how this could look:
>
> ``` org
> #+title: Meeting minutes
>
> #+TYP_TODO: Fred Sara Lucy Mike | DONE

I'd challenge the decisions on using TODO keywords for people
although the Org manual also suggests to do so.

TODO keywords are single classification. This means that you are not
able to assign more than one person to a task. I'm using @tags for
the same purpose which allows me to assign tasks to more than one
person and keep TODO keywords independent to the person. For
example, when you resolve a task, you lose the information who was
assigned to the task.

Therefore, I'd use:

* Meeting

** TODO Prepare the demo :@Fred:
** STARTED Contact customer  :@Sara:
** TODO Work on the document :@Fred:@Lucy:@Mike:

More on that on
https://karl-voit.at/2019/09/25/categories-versus-tags/ including an
elisp snippet I'm using to filter according to @name-tags.

YMMV. HTH.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




lazyblorg (was: blogging wih org-mode)

2019-11-03 Thread Karl Voit
Hi Joseph,

* Joseph Vidal-Rosset  wrote:
>
> (I met  difficulties with lazyblorg, for example. I did not succeed to
> understand how it works.)

I wrote lazyblorg because I could not find any existing tool that,
for example, let me put blog entries wherever I want:
https://github.com/novoid/lazyblorg#why-lazyblorg

Of all published Org->blog methods, lazyblorg might have the fewest
number of users.

If my Readme failed to explain how it works, this needs to be my
fault. May I ask what your issues were?

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] Shameless plug: blog series on how to use org mode features (PIM)

2019-09-25 Thread Karl Voit
Hi!

I created a series of my own blog articles on how I am using
features from Org mode.

It's not related to the manual, it's related to "how to combine misc
features for everyday's work".

Maybe you find a few tricks here or there:
https://karl-voit.at/2019/09/25/using-orgmode/

I'll add more articles in the future:
- Categories versus tags (soon)
- Using many or few Org mode files?
- Limiting the stuff visible on my agenda 
- Finding stuff within Org mode
- ...

Comments welcome!


PS: Sorry for the advertisement in case you're feeling upset. I'm not earning
any money with my web page though!

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] 401 error code when pushing to code.orgmode.org (Wiki, git)

2019-09-20 Thread Karl Voit
Hi,

When I try to push to the Wiki at "code.orgmode.org", I get a strange
error message:

: vk@sherri ~/worg (git)-[master] % git push origin master
: Counting objects: 3, done.
: Delta compression using up to 4 threads.
: Compressing objects: 100% (3/3), done.
: Writing objects: 100% (3/3), 729 bytes | 0 bytes/s, done.
: Total 3 (delta 2), reused 0 (delta 0)
: Username for 'https://code.orgmode.org': Karl
: Password for 'https://k...@code.orgmode.org':
: error: RPC failed; HTTP 401 curl 22 The requested URL returned error: 401
: fatal: The remote end hung up unexpectedly
: fatal: The remote end hung up unexpectedly
: Everything up-to-date
: 1 vk@sherri ~/worg (git)-[master] %

(I've also used "karl" as a lower-case user name with same error.)

Can you confirm this?

Disclaimer: I did not follow this mailing list for some months and I
did not push to the Wiki code for over a year. Therefore, I might have
missed something that explains this behavior.

Thanks for your help


-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] org-sbe: error when passing strings as parameters to/from Python blocks

2019-03-14 Thread Karl Voit
* Karl Voit  wrote:
>
> * Daniel Herzig  wrote:
>> Karl Voit  writes:
>>
>> After some trying I found that the variables as set in the source-code
>> header need standard values set:
>>
>> #+NAME: classificationfm
>> #+BEGIN_SRC python :var prob="high" :var impact="high"
>>   if prob == "high" and impact == "high":
>>   return "A"
>>   if prob == "low" and impact == "high":
>>   return "B"
>>   if prob == "high" and impact == "low":
>>   return "C"
>>   if prob == "low" and impact == "low":
>>   return "D"
>> #+END_SRC
>>
>> If I don't set them I get exactly the same errors as you. Like this I
>> get the following:
>>
>>| prob | impact | class |
>>|--++---|
>>| high | high   | A |
>>| low  | high   | B |
>>| high | low| C |
>>| low  | low| D |
>> #+TBLFM: @2$3..@>$3='(org-sbe classificationfm (prob $$1) (impact $$2))
>>
>> Evaluation is being asked for each line then.
>
> Thanks for the workaround to circumvent the bug. Now, it's working
> with my older Org as well.
>
> Is somebody fixing the bug in Org as well? (Or adding a statement to
> the manual?)

On reddit[1] loskutak-the-ptak pointed out that the manual states
that the default value is not optional: [2]

So it is not a bug and it was my own fault from the start. Default
values might be omitted for non-string parameters but it is not
backed by the documentation.

[1] 
https://www.reddit.com/r/orgmode/comments/b0ll1v/embedding_python_code_in_table_formula/
[2] https://orgmode.org/manual/var.html

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] [bug] org-sbe: error when passing strings as parameters to/from Python blocks

2019-03-14 Thread Karl Voit
Hi Daniel,

* Daniel Herzig  wrote:
> Karl Voit  writes:
>
> After some trying I found that the variables as set in the source-code
> header need standard values set:
>
> #+NAME: classificationfm
> #+BEGIN_SRC python :var prob="high" :var impact="high"
>   if prob == "high" and impact == "high":
>   return "A"
>   if prob == "low" and impact == "high":
>   return "B"
>   if prob == "high" and impact == "low":
>   return "C"
>   if prob == "low" and impact == "low":
>   return "D"
> #+END_SRC
>
> If I don't set them I get exactly the same errors as you. Like this I
> get the following:
>
>| prob | impact | class |
>|--++---|
>| high | high   | A |
>| low  | high   | B |
>| high | low| C |
>| low  | low| D |
> #+TBLFM: @2$3..@>$3='(org-sbe classificationfm (prob $$1) (impact $$2))
>
> Evaluation is being asked for each line then.

Thanks for the workaround to circumvent the bug. Now, it's working
with my older Org as well.

Is somebody fixing the bug in Org as well? (Or adding a statement to
the manual?)

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] org-sbe: error when passing strings as parameters to/from Python blocks

2019-03-14 Thread Karl Voit
Hi!

I want to test/use Python with org-sbe:

#+NAME: classificationfm
#+BEGIN_SRC python :exports none :var prob :var impact
result = ""
if prob == 'high' and impact == 'high':
return 'A'
if prob == 'low' and impact == 'high':
return 'B'
if prob == 'high' and impact == 'low':
return 'C'
if prob == 'low' and impact == 'low':
return 'D'
return 'undefined'
#+END_SRC

(Yes, I should move to elif and the Python code might be coded with
less characters in general: this should not be the point here ;-) )

| prob | impact | class  |
|--++|
| high | high   | #ERROR |
| low  | high   | #ERROR |
| high | low| #ERROR |
| low  | low| #ERROR |
#+TBLFM: @2$3..@>$3='(org-sbe "classificationfm" (prob $1) (impact $2))

I'd expect to get the values of the "class" table column: A, B, C, D
instead of #ERROR.


Reading the manual, I found:
| NOTE: By default, string variable names are interpreted as
| references to source-code blocks, to force interpretation of a
| cell’s value as a string, prefix the identifier a "$" (e.g.,"$$2"
| instead of "$2" or "$@2$2" instead of "@2$2").

Therefore, I tried the following lines ...
#+TBLFM: @2$3..@>$3='(org-sbe "classificationfm" (prob "$1") (impact "$2"))
#+TBLFM: @2$3..@>$3='(org-sbe "classificationfm" (prob $$1) (impact $$2)) 
#+TBLFM: @2$3..@>$3='(org-sbe "classificationfm" (prob "$$1") (impact "$$2")) 
... all with same error in the result.

My setup: Org mode version 9.1.6 on GNU Emacs 26.0.90 and GNU Emacs 25.1.1


I started a reddit thread[1]. In this thread, somebody was posting
this table showing the error:

#+NAME: myfunc
#+BEGIN_SRC python :var n="1"
return "ok"
#+END_SRC

| 10.3 |  9 | -18 | a  | 14 | 11 |  1 |
|   ok | ok |  ok | #ERROR | ok | ok | ok |
#+TBLFM: @2='(org-sbe myfunc (n @1))


However, using the comment from the manual about strings, I
prepended the reference with "$" ...

| 10.3 |  9 | -18 | a  | 14 | 11 |  1 |
|   ok | ok |  ok | ok | ok | ok | ok |
#+TBLFM: @2='(org-sbe mytestfunc (n $@1))

... which now looks OK ;-)


So, back to the initial situation: what is my error or do we have a
bug in Org?


[1] 
https://www.reddit.com/r/orgmode/comments/b0ll1v/embedding_python_code_in_table_formula/

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] 36C3 and Emacs Org mode

2018-12-30 Thread Karl Voit
Hi!

It's my first time at a CCC Congress[1]. I organized a
self-organized session on Org mode[2].

https://chaos.social/@Drops organized a "Church of Emacs"
assembly[3].

Next year, we do plan to be prepared even better.

If you are joining 36C3 and you have ideas on how to improve Emacs
and/or Org mode visibility on 36C3, please do write me an email and
I'll send you an URL to the Etherpad we are using.

Thanks for your help!

[1] https://karl-voit.at/2018/12/28/35c3-day1
[2] https://karl-voit.at/2018/12/28/35c3-orgmode
[3] https://signup.c3assemblies.de/assembly/56152a8a-d1c8-4b96-8a26-cf5f05ab8ee6

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] Org mode at 34C3: my demo + request for help

2018-12-28 Thread Karl Voit
Hi!

It's my first time at a CCC Congress[1].

There is an Emacs assembly: [2] by https://chaos.social/@Drops

Since there was no Emacs talk at all and almost nothing going on on
the Emacs assembly, I decided to do a basic Org mode demo to explain
the universe of advantages to non-Emacs users: [3]

This is no offiziel 35C3 talk and no recording. It's a
self-organized event which is made possible by the assembly called
Komona.

In my opinion, almost everybody who is on the 35C3 should be able to
profit from it on a daily basis and almost nobody has a clue what
she/he is missing out.

Unfortunately, I got a bit sick today. It would be very cool if
somebody could help me (a) with doing some advertisement in order to
reach as many Org newbies or even Emacs-sceptics as possible and (b)
with some simple statistics:

My assumption is that the size of the Org mode community is
comparable or even(?) larger than the GNU Emacs community.
Therefore, can somebody do a quick statistics on the number of
unique posters (email addresses) per reasonable time-frame
(November?) from a (the?) GNU Emacs mailing list and from this
mailing list?

If this supports my assumption, it would emphasise my argument, that
Org mode is not just about editing[4] in order to address vim-users
like myself.

Thanks for your support!

PS: Besides my blog post [3] I already did promote the event on
Mastodon[5][6] and Twitter[7] and printed some A4 posters which I
mounted on nice places.

[1] https://karl-voit.at/2018/12/28/35c3-day1/
[2] https://signup.c3assemblies.de/assembly/56152a8a-d1c8-4b96-8a26-cf5f05ab8ee6
[3] https://karl-voit.at/2018/12/28/35C3-orgmode-demo-announcement/
[4] https://karl-voit.at/2015/10/23/Emacs-is-not-just-an-editor
[5] https://mastodon.social/@publicvoit/101319442456868601
[6] https://mastodon.social/@publicvoit/101319450781745345
[7] https://twitter.com/novoid

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] Complexity of using spreadsheet functionality (was: Calculate differences of remote table numbers)

2018-10-08 Thread Karl Voit
* Eric S Fraga  wrote:
> On Monday,  8 Oct 2018 at 17:19, Karl Voit wrote:
>> Unfortunately, I have to admit that spreadsheets in Org are not
>> something I can recommend to somebody who needs "something that just
>> works" (like Excel-switcher). :-(
>
> Maybe not but the combination of "It's all text", Emacs calc, and
> LaTeX export is unbeatable for me.  I've not used any other
> spreadsheet in years!

I do think that we all agree on that.

But it's more "I accept the nasty issues I have while creating
complex spreadsheet stuff because I got tons of advantages elsewhere
in this tool" instead of "hey, you're using Excel. Wanna switch to
Org/calc because it offers equivalent spreadsheet functionality on
top of many other advantages".

You have to use Org for a while in order to be able to grasp the
large universe of possibilities. It's really not that easy to
explain or show. It's something you have to experience IMHO. And
after you had this epiphany, you accept even hard to do things like
complex calc references.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] Calculate differences of remote table numbers

2018-10-08 Thread Karl Voit
* Michael Brand  wrote:
> Hi Karl

Hi Michael,

> On Mon, Oct 1, 2018 at 5:02 PM Karl Voit  wrote:
>
>> I'd like to calculate the differences between rows of numbers of a
>> different table.
>
> For this kind of shifting row or column indexes I use Calc vector
> subscript. In your case:
>
> #+NAME: my-table
>| Numbers |
>|-|
>|   1 |
>|   5 |
>|   8 |
>|  12 |
>|  15 |
>
>| Line | Difference |
>|--+|
>|1 ||
>|2 |  4 |
>|3 |  3 |
>|4 |  4 |
>|5 |  3 |
> #+TBLFM: $2 = if($1 == 1, string(""), subscr(remote(my-table,
> @I$1..@II$1), @# - 1) - subscr(remote(my-table, @I$1..@II$1), @# - 2))
>
> or, avoiding @# completely in the formula for $2:
>
> #+TBLFM: $2 = if($1 == 1, string(""), subscr(remote(my-table,
> @I$1..@II$1), $1) - subscr(remote(my-table, @I$1..@II$1), $1 - 1))
>
> See also a similar example of subscr in the subsection "Dynamic
> variation of ranges" here:
> https://orgmode.org/worg/org-hacks.html#field-coordinates-in-formulas

Thanks for your post - it is working as expected! \o/

Also thanks for the URL - I added it to my knowledge base.

Unfortunately, I have to admit that spreadsheets in Org are not
something I can recommend to somebody who needs "something that just
works" (like Excel-switcher). :-(

However, when a table is finally working as expected, I really do
appreciate having this table (and its derived data) within my notes
and not locked away in a separate file.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] blogging with lazyblorg (was: Visualizing org files)

2018-10-04 Thread Karl Voit
* Marcelo de Moraes Serpa  wrote:
>
> Oh wow Karl, lot's of 'hidden' gems there. 

Thanks. Glad that you like it. Consider following Atom/RSS feeds of
https://karl-voit.at/ to get updates on my PIM/Emacs activity. I
hope that I'm going to implement tag-specific feeds so that you are
able to follow #pim or #emacs and don't get any non-related updates.

> Not related to this thread but I specially liked `lazyblorg`, I
> actually had a very similar idea and was about to develop
> something like that, you saved me a bunch of time :)

Oh, it took quite some effort and time to go where lazyblorg
currently is ;-) Feedback welcome.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] Calculate differences of remote table numbers

2018-10-04 Thread Karl Voit
Hi Nick,

* Nick Dokos  wrote:
> Karl Voit  writes:
>
>> I'd like to calculate the differences between rows of numbers of a
>> different table.
>>
>> Here is a minimal example showing the issue:
>>
>> #+NAME: my-table
>> | Numbers |
>>
>> |-|
>> |   1 |
>> |   5 |
>> |   8 |
>> |  12 |
>> |  15 |
>>
>> This is what I expected: "exp. Reference1" and "exp. Reference2" is here only
>> to demonstrate that the assumed references are wrong in the third table. 
>> "exp.
>> Difference" is the column I want to get in the first place. I don't want to 
>> see
>> Reference 1 or 2 at all in my solution (since I need a couple of those
>> difference-columns).
>>
>> | Line | exp. Reference1 | exp. Reference2 | exp. Difference |
>> |--+-+-+-|
>> |1 |   0 |   0 |   0 |
>> |2 |   5 |   1 |   4 |
>> |3 |   8 |   5 |   3 |
>> |4 |  12 |   8 |   4 |
>> |5 |  15 |  12 |   3 |
>>
>> This is what I get instead:
>>
>> | Line | actual Reference1 | actual Reference2 | Difference |
>> |--+---+---+|
>> |1 | 0 | 0 |  0 |
>> |2 | 6 | 1 |  5 |
>> |3 |12 | 1 | 11 |
>> |4 |20 | 1 | 19 |
>> |5 |30 | 1 | 29 |
>
> @# is the row number, so to refer to that row, you need @@#. Something like 
> this,
> although I didn't test to see if everything gets parsed correctly:
>
> #+TBLFM: $2=if(2 == @#, 0, remote(my-table,@@#$1))::$3=if(2 == @#, 0, 
> remote(my-table,@@#-1$1))::$4=if(2 == @#, 0, 
> (remote(my-table,@@#$1)-remote(my-table,@@#-1$1)))

This is a huge step forward:

#+NAME: my-table
| Numbers |
|-|
|   1 |
|   5 |
|   8 |
|  12 |
|  15 |

| Line | exp. Reference1 | exp. Reference2 | exp. Difference |
|--+-+-+-|
|1 |   0 |   0 |   0 |
|2 |   5 |   1 |   4 |
|3 |   8 |   5 |   3 |
|4 |  12 |   8 |   4 |
|5 |  15 |  12 |   3 |


| Line | actual Reference1 | actual Reference2 | Difference |
|--+---+---+|
|1 | 0 | 0 |  0 |
|2 | 5 | 5 |  0 |
|3 | 8 | 8 |  0 |
|4 |12 |12 |  0 |
|5 |15 |15 |  0 |
#+TBLFM: $2=if(2 == @#, 0, remote(my-table,@@#$1))::$3=if(2 == @#, 0, 
remote(my-table,@@#-1$1))::$4=if(2 == @#, 0, 
(remote(my-table,@@#$1)-remote(my-table,@@#-1$1)))

Somehow, the "-1" in "@@#-1$1" does not have any effect: "@@#$1" and
"@@#-1$" gives the same results.

Do you have any idea why?

> Turning on formula debugging with `C-c {' helps.

Woha! I didn't know that! And I also didn't know =C-c }= for
displaying column/row numbers :-O *This* is going to be handy for me
;-)

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] Calculate differences of remote table numbers

2018-10-01 Thread Karl Voit
Hi!

I'd like to calculate the differences between rows of numbers of a
different table.

Here is a minimal example showing the issue:

#+NAME: my-table
| Numbers |
|-|
|   1 |
|   5 |
|   8 |
|  12 |
|  15 |

This is what I expected: "exp. Reference1" and "exp. Reference2" is here only
to demonstrate that the assumed references are wrong in the third table. "exp.
Difference" is the column I want to get in the first place. I don't want to see
Reference 1 or 2 at all in my solution (since I need a couple of those
difference-columns).

| Line | exp. Reference1 | exp. Reference2 | exp. Difference |
|--+-+-+-|
|1 |   0 |   0 |   0 |
|2 |   5 |   1 |   4 |
|3 |   8 |   5 |   3 |
|4 |  12 |   8 |   4 |
|5 |  15 |  12 |   3 |

This is what I get instead:

| Line | actual Reference1 | actual Reference2 | Difference |
|--+---+---+|
|1 | 0 | 0 |  0 |
|2 | 6 | 1 |  5 |
|3 |12 | 1 | 11 |
|4 |20 | 1 | 19 |
|5 |30 | 1 | 29 |
#+TBLFM: $2=if(2 == @#, 0, remote(my-table,@#$1))::$3=if(2 == @#, 0, 
remote(my-table,@#-1$1))::$4=if(2 == @#, 0, 
(remote(my-table,@#$1)-remote(my-table,@#-1$1)))

As you can see, the "actual Reference1" are not the values from the first
column above (except the first one). "actual Reference2" is not the shifted
column 1 from above (except the first one). I have no clue, what these numbers
are.

Maybe you can help me (1) explaining what the numbers in actual Reference1 and
actual Reference2 are showing and (2) how to get the result ("expected
Difference"; without explicitly generating Reference 1 or 2).

Thanks!


-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] Visualizing org files

2018-10-01 Thread Karl Voit
* Samuel Wales  wrote:
> https://github.com/novoid

https://github.com/novoid/org-du/

Thanks for mentioning. I got the impression, I am the only one who
likes those kind of visualizations ;-)

Even https://github.com/novoid/org-du/graphs/traffic doesn't look
like there is much going on in terms of visitors ...

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] Org mode + Solid = collaborative, privacy-respecting future

2018-09-30 Thread Karl Voit
Hi!

I stubled over Tim Berners-Lee Solid:
https://www.fastcompany.com/90243936/exclusive-tim-berners-lee-tells-us-his-radical-new-plan-to-upend-the-world-wide-web
https://www.inrupt.com/blog/one-small-step-for-the-web
https://en.wikipedia.org/wiki/Solid_(web_decentralization_project)

On https://github.com/solid/solid-apps I'd like to see something
that combines the awesome (local) power of Org mode with the
privacy-respecting soon-to-be platform Solid which adds
collaborative notions to the story.

Are there any actions going on already?

This just feels right to be combined with the power of Org/Emacs.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] Defining the export height of a babel-generated image

2018-03-19 Thread Karl Voit
* Eric S Fraga <esfli...@gmail.com> wrote:
>
> On Sunday, 18 Mar 2018 at 15:35, Karl Voit wrote:
>> Hi!
>>
>> Some babel blocks generate image files as output. Orgmode does link
>> them so that exporting the corresponding heading also includes the
>> image.
>>
>> For example:
>>
>> #+BEGIN_SRC plantuml :file "foobar.svg"
>> (*) --> "step1"
>> --> "step2"
>> --> (*)
>> #+END_SRC
>>
>> #+RESULTS:
>> [[foobar.svg]]
>>
>> Is is possible to define a height attribute for the result file
>> which is used for LaTeX/PDF export?
>
> Sure: put the desired #+attr_latex: line just before the #+results line.

Hehe. Simple as that.

I thought this might get replaced on babel block execution. I was
wrong.

I now have two working solutions:


** Solution 1: https://orgmode.org/manual/post.html#post

#+name: attr_wrap
#+begin_src sh :var data="" :var width="\\textwidth" :results output
  echo "#+ATTR_LATEX: :width $width"
  echo "$data"
#+end_src

#+BEGIN_SRC plantuml :post attr_wrap(width="1cm", data=*this*) :results drawer 
:file (make-temp-file "export-example-1-" nil ".png")
(*) --> "step1"
--> "step2"
--> (*)
#+END_SRC

#+RESULTS:
:RESULTS:
#+ATTR_LATEX: :width 1cm
[[file:c:/Users/KARL~1.VOI/AppData/Local/Temp/export-example-1-tXDZCj.svg]]
:END:

** Solution 2: "put the desired #+attr_latex: line just before the 
#+results line."

#+BEGIN_SRC plantuml :file (make-temp-file "export-example-2-" nil ".png")
(*) --> "step1"
--> "step2"
--> (*)
#+END_SRC

#+ATTR_LATEX: :width 2cm
#+RESULTS:
[[file:c:/Users/KARL~1.VOI/AppData/Local/Temp/export-example-2-nvoWbD.svg]]



-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] Defining the export height of a babel-generated image

2018-03-18 Thread Karl Voit
Hi!

Some babel blocks generate image files as output. Orgmode does link
them so that exporting the corresponding heading also includes the
image.

For example:

#+BEGIN_SRC plantuml :file "foobar.svg"
(*) --> "step1"
--> "step2"
--> (*)
#+END_SRC

#+RESULTS:
[[foobar.svg]]

Is is possible to define a height attribute for the result file
which is used for LaTeX/PDF export?

So far, I tried with a header argument but failed: 
   :prologue "#+ATTR_LATEX: :height 10cm"

Do you have an idea?

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] mktemp for orgmode

2018-03-18 Thread Karl Voit
* John Kitchin  wrote:
>
> Can you do something like:
>
> #+BEGIN_SRC some-lang :results output org drawer :file (make-temp-file
> "prefix-")
> 
> #+END_SRC

Awesome!

I was looking in the wrong direction.

#+BEGIN_SRC plantuml :file (make-temp-file "2018-03-18-testprefix-" nil ".svg")
(*) --> "step1"

--> "step2"

--> (*)
#+END_SRC

... works as expected and even defines the correct file extension.

Thanks!

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] mktemp for orgmode

2018-03-17 Thread Karl Voit
Hi, I sometimes wonder if there is something like mktemp[1] in
org-mode as, e.g., a built-in macro.

For example, PlantUML in orgmode[2] requires a file header argument to
write the image output to: ":file myoutput.svg"

In most cases, I really don't care about the output file and its
location. I just want to see it in my org-mode buffer and in various
output formats like PDF or HTML.

When I don't want to trash my org folder, I have to use ":file
/tmp/tmp.svg". The downside of it is, that this only works for
non-Windows systems because there is no "/tmp" on Windows.

Therefore, it would be cool to have something like {{{tmpfile}}} that
I could use in :file {{{tmpfile}}}

However, there is still an issue with this approach: what if I need
multiple separate {{{tmpfile}}} for, e.g., multiple PlantUML blocks
that are within the same heading and therefore get exported at once?

And: as a consequence, it would require {{{tmpdir}}} as well.

[1] https://www.gnu.org/software/autogen/mktemp.html
[2] http://plantuml.com/emacs

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] :EXPORT_FILE_NAME: containing a date-stamp

2018-02-07 Thread Karl Voit
Hi,

Is there a possibility to define an export file name of a heading so
that the resulting file contains a date-stamp?

What I want to achieve:

*** My Report
:PROPERTIES:
:EXPORT_FILE_NAME: (format-time-string "%Y-%m-%d") Project Status.html
:END:

... which results in the file: "2018-02-07 Project Status.html"

No, this does not work this way at the moment (Orgmode from git
maint, d3f7309cb from 9 weeks ago).

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] Orgmode repeater intervals with end date

2018-02-07 Thread Karl Voit
* Tory S. Anderson  wrote:
> I was very pleased to find, when browsing the manual for a 
> different reason, the 'orgmode' solution to the problem, which 
> provides daily customization ability and also maintains 
> exportability: `org-clone-subtree-with-timeshift`[1], with which I 
> can easily accomplish my goals and even consolidate my 
> notes-for-that-event-instance. I'm just writing this here because 
> it has totally upgraded my planning experience and I wish I'd 
> known about it sooner!

You should subscribe to my blog ;-)

http://karl-voit.at/2017/01/15/org-clone-subtree-with-time-shift/
I do think I remember that I linked to this article somewhere in
Worg.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] Make tag inheritance explicit

2018-01-23 Thread Karl Voit
* Kaushal Modi <kaushal.m...@gmail.com> wrote:
>
> On Tue, Jan 23, 2018 at 9:45 AM Karl Voit <devn...@karl-voit.at> wrote:
>
>> > 2. Use `org-get-tags-at' with point on "Task 1" heading in your example.
>> > `org-get-tags' returns a list of tags *only* at the current heading.
>> > `org-get-tags-at' returns inherited tags too.
>>
>> You mean for developing a custom-made function that provides the
>> feature I was asking for?
>
> By "feature", you mean copying all the inherited tags to the heading at
> point?

Yes.

With your help, I wrote:

(defun my-set-tags-including-inherited ()
  (interactive)
  (let (
(alltags (org-get-tags-at))
)
(org-set-tags-to alltags)
)
  )

Which provides me "the feature" I was looking for. It can be
simplified, I know. However, I tried to add a list of tags I *don't*
want to be added to the heading but failed so far.

alltags content example:
(#("test1" 0 5 (inherited t)) #("foobar" 0 6 (inherited t))
 #("test2" 0 5 (inherited t)) #("baz" 0 3 (inherited t)))

Do you have an idea, how I can delete all items contained in my
black-list?

My example black list would be: (ignored-tags '(test1 2del crypt))

My latest approach on a single-item level was:
(remove* "test1" alltags :test 'equal :key 'car)

>> First, I wanted to get a confirmation that this feature is not
>> already part of Org-mode because (as usual) this seemed obvious to
>> me when using export functionality ;-)
>
> It's not clear what you mean by "feature is not already part of Org-mode".

Sorry for being unclear.

I thought, there might be something like "org-add-inherited-tags" or
similar I was not aware of.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] Make tag inheritance explicit

2018-01-23 Thread Karl Voit
Hi Carsten,

* Carsten Dominik <domi...@uva.nl> wrote:
>
> On Tue, Jan 23, 2018 at 11:22 AM, Karl Voit <devn...@karl-voit.at> wrote:
>
>> Background: Org-mode has perfect tag inheritance but unfortunately
>> the export methods I am using do export the tags only to the
>> headings they are assigned to and not to their sub-headings via
>> inheritance. So copying the inherited tags would be a viable
>> workaround to me.
>
> I guess this then should happen optionally during export.  Doing this in
> the buffer itself makes much less sense.

I totally agree.

However, from my (non-insider) perspective, this would require all
export methods to adapt. Or was this situation improved as we
switched the general export framework some time ago?

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] Make tag inheritance explicit

2018-01-23 Thread Karl Voit
Hi,

* Kaushal Modi <kaushal.m...@gmail.com> wrote:
>
> On Tue, Jan 23, 2018, 5:24 AM Karl Voit <devn...@karl-voit.at> wrote:
>
>> Org-mode has perfect tag inheritance but unfortunately
>> the export methods I am using do export the tags only to the
>> headings they are assigned to and not to their sub-headings via
>> inheritance.
>
> Hello,
>
> I am curious how you are exporting. Are you exporting using subtree scope?

Always, yes.

> I am asking because I am using the exact same style of tagging for my
> posts, and I export using subtree scopes using ox-hugo,.. and I faced the
> exact same challenge.

My current export methods are: HTML, pandoc>docx, latex>PDF

> The trick is to:
>
> 1. Set org-use-tag-inheritance to t (temporarily in let so that it doesn't
> populate the user-set global value).

Check.

> 2. Use `org-get-tags-at' with point on "Task 1" heading in your example.
> `org-get-tags' returns a list of tags *only* at the current heading.
> `org-get-tags-at' returns inherited tags too.

You mean for developing a custom-made function that provides the
feature I was asking for?

Yes, this helps a lot to me.

First, I wanted to get a confirmation that this feature is not
already part of Org-mode because (as usual) this seemed obvious to
me when using export functionality ;-)

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] Make tag inheritance explicit

2018-01-23 Thread Karl Voit
Hi!

Is it possible to lookup inherited tags and add them explicitly to
the current heading?

Example:

* Project:ProjectX:
** Sub-Project   :@Joe:
*** Task 1
*** Task 2

When I go to "Task 1" (or 2), I want to invoke a command which
"copies" the tags ProjectX and @Joe to the heading of the task.


Background: Org-mode has perfect tag inheritance but unfortunately
the export methods I am using do export the tags only to the
headings they are assigned to and not to their sub-headings via
inheritance. So copying the inherited tags would be a viable
workaround to me.

Thanks!

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] org-depend: TRIGGER XYZ(KEYWORD) not working

2017-12-04 Thread Karl Voit
Hi Adrian,

* Adrian Bradd  wrote:
>
>> Examples:
>>
>>  * Top-Heading
>>
>>  ** TODO Here I invoke org-todo to DONE
>>  :PROPERTIES:
>>  :TRIGGER: 2017-12-03-target(TODO)
>>  :END:
>>
>>  ** This should be changed to TODO
>>  :PROPERTIES:
>>  :ID: 2017-12-03-target
>>  :END:
>>
>> ... this is working (i.e., "This should be changed to TODO" gets its
>> TODO keyword).
>>
>>  * Top-Heading with process indicator [0/2]
>>
>>  ** TODO Here I invoke org-todo to DONE
>>  :PROPERTIES:
>>  :TRIGGER: 2017-12-03-target(TODO)
>>  :END:
>>
>>  ** This should be changed to TODO
>>  :PROPERTIES:
>>  :ID: 2017-12-03-target
>>  :END:
>>
>> ... this is *not* working.
>>
>> However, anticipating the wrong position:
>>
>>  * Top-Heading with process indicator [0/2]
>>  :PROPERTIES:
>>  :TRIGGER: 2017-12-03-target(TODO)
>>  :END:
>>
>>  ** TODO Here I invoke org-todo to DONE
>>  :PROPERTIES:
>>  :TRIGGER: 2017-12-03-target(TODO)
>>  :END:
>>
>>  ** This should be changed to TODO
>>  :PROPERTIES:
>>  :ID: 2017-12-03-target
>>  :END:
>>
>> ... is working. And according to this:
>>
>>  * Top-Heading with process indicator [0/2]
>>  :PROPERTIES:
>>  :TRIGGER: 2017-12-03-target(TODO)
>>  :END:
>>
>>  ** TODO Here I invoke org-todo to DONE
>>
>>  ** This should be changed to TODO
>>  :PROPERTIES:
>>  :ID: 2017-12-03-target
>>  :END:
>>
>> ... this is also working. So the update of the process indicator
>> causes the wrong property drawer to be parsed for the relevant
>> TRIGGER property.
>>
>> Contrary to my previous assumption, this is issue is *not* related
>> to big and small files. This is purely related to the existing or
>> missing process indicator of the upper-level heading.
>>
>> I guess I have found the origin of the bug.
>
>
> I'm not able to reproduce what you are seeing above.

Damnit.

This is because I removed the wrong progress indicator from my
examples before posting. You have to change all "[0/2]" with "[%]"
and then you see the issue I described. It seems to be the case that
[/] do work whereas [%] do cause the described malfunctional
behaviour. I was using both and did remove the wrong one.

> I did see an issue with triggered headings not honouring note logging when
> the todo was set to DONE, but I haven't looked any closer at it just yet.

Oh.

> What version of org-mode are you running? If you are using the git version
> can you pull the latest on maint. I performed my testing on maint.

I was using git maint from a couple of days ago and I just updated
the repository.

> =E2=80=8BEven just being able to dig through some code and debug can be a m=
> ajor
> benefit. :-)

And I got the feeling that I learned more about how the elisp code
is working. I should do more debugging even for working code ;-)

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] org-depend: TRIGGER XYZ(KEYWORD) not working

2017-12-03 Thread Karl Voit
Hi Adrian,

Glad that you replied - I was worrying that this thread is going to
die before any improvement can be developed ...

* Adrian Bradd  wrote:
>
> First observation:
>>
>> When I set the heading 1 to DONE (without assigning it any other
>> keyword), the TRIGGER events are ignored totally.  I guess this is
>> an edge-case that may be considered as a bug.
>>
>
> This is the result of Line 219 in org-depend.el:
>
> (unless (and (member from org-not-done-keywords)
> (member to org-done-keywords))
>
> In this instance 'from' is set to nil so the 'and' returns nil and
> org-depend doesn't process the change of TODO to look for dependents. I
> don't know why it was defined this way as org-todo.el accepts headings with
> no TODO entry. I can't think of any reason other than explicitly blocking a
> user from processing a heading without a TODO entry, but it seems that if
> the user went to the effort of populating a TRIGGER property that they
> probably want this to be acted upon by org-depend.el.

I totally agree: there should not be any reason to accept missing
TODO keywords in this case as well.

> If there are no concerns raised in this thread I'll push a patch to all
> have org-depend process the example you listed.

Cool ;-)

>> Second observation:
>>
>> However, what is bugging me even more is that even when "heading 1"
>> has a TODO keyword assigned, in *some* cases, the TRIGGER event does
>> not get executed when I do it in my large Org-mode file.
>>
>> Copying the corresponding headings (the one with the TRIGGER prop
>> and the headings containing the "target" IDs) from my real-world
>> Org-mode file to my small test.org from above and marking the
>> heading that contains the TRIGGER properties to DONE, it then works
>> as expected.
>>
>> I then took the simple example from above, added a TODO keyword to
>> the heading 1, copied it to my real-world Org-mode file and even
>> this did not work: Heading 2 and 3 don't get their "NEXT" keyword
>> assigned.
>>
>> So the behavior changes within different Org-file contexts.
>> Therefore, I do have an issue creating a minimal example to
>> demonstrate the bug.
>>
>> Can somebody give me an advice how to debug this behavior?
>
> My only thought is that there is an ID clashing with your sample I=
> D and it
> is being updated instead of the heading you are interested in.
> org-depend.el looks at the local file for an ID and then looks globally for
> an ID match.

Well, the IDs I was using were unique over all of my files.
Valid guess but not the case at my setup.

> You could instrument 'org-depend-trigger-todo' to trace the behaviour while
> processing the TODO update.

I found out that following part does not return any TRIGGER line:

: ;; OK, we just switched from a TODO state to a DONE state
: ;; Lets see if this entry has a TRIGGER property.
: ;; If yes, split it up on whitespace.
: (setq trigger (org-entry-get pos "TRIGGER");; <-- no result here!
:   triggers (and trigger (split-string trigger)))

So the whole procedure of looking for the IDs to trigger is not
reached at all. 

After that I edebug-defun org-entry-get and the difference between
working and non-working TRIGGER (non-nil list of property values
versus nil) can be found at:

: (let* ((local (org--property-local-values property literal-nil))

... within org.el (git maint 946f76d70)

Another edebug-defun of org--property-local-values shows that this
code does not return the list of values in the big file where it is
working with my working minimal file:

: (let ((v (and (re-search-forward
:(org-re-property property nil t) end t)
:   (match-string-no-properties 3

I could not jump into re-search-forward (built-in function) but I
found out something fishy: The value for "end" held a position which
is *not* the correct one.

Instead of holding the end position of the property drawer of the
heading I invoked org-todo on, it held the end of the properties
drawer of the next higher heading which has a progress indicator in
it.

Examples:

 * Top-Heading
 
 ** TODO Here I invoke org-todo to DONE
 :PROPERTIES:
 :TRIGGER: 2017-12-03-target(TODO)
 :END:
 
 ** This should be changed to TODO
 :PROPERTIES:
 :ID: 2017-12-03-target
 :END:

... this is working (i.e., "This should be changed to TODO" gets its
TODO keyword).

 * Top-Heading with process indicator [0/2]
 
 ** TODO Here I invoke org-todo to DONE
 :PROPERTIES:
 :TRIGGER: 2017-12-03-target(TODO)
 :END:
 
 ** This should be changed to TODO
 :PROPERTIES:
 :ID: 2017-12-03-target
 :END:

... this is *not* working.

However, anticipating the wrong position:

 * Top-Heading with process indicator [0/2]
 :PROPERTIES:
 :TRIGGER: 2017-12-03-target(TODO)
 :END:
 
 ** TODO Here I invoke org-todo to DONE
 :PROPERTIES:
 :TRIGGER: 2017-12-03-target(TODO)
 :END:
 
 ** 

Re: [O] org-depend: TRIGGER XYZ(KEYWORD) not working

2017-11-19 Thread Karl Voit
* Karl Voit <devn...@karl-voit.at> wrote:
> Hi,
>
> I am playing around with org-depend[1] again[2].

I forgot to mention: I am using maint from the git from today.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] org-depend: TRIGGER XYZ(KEYWORD) not working

2017-11-19 Thread Karl Voit
Hi,

I am playing around with org-depend[1] again[2].

I noticed that certain TRIGGER events do not get executed.

> # -*- mode: org; coding: utf-8; -*-
> * heading 1
> :PROPERTIES:
> :ID:   foo
> :TRIGGER: bar(NEXT) baz(NEXT)
> :END:
> 
> * Heading 2
> :PROPERTIES:
> :ID:   bar
> :END:
> 
> * Heading 3
> :PROPERTIES:
> :ID:  baz
> :END:

First observation:

When I set the heading 1 to DONE (without assigning it any other
keyword), the TRIGGER events are ignored totally.  I guess this is
an edge-case that may be considered as a bug.

Second observation:

However, what is bugging me even more is that even when "heading 1"
has a TODO keyword assigned, in *some* cases, the TRIGGER event does
not get executed when I do it in my large Org-mode file.

Copying the corresponding headings (the one with the TRIGGER prop
and the headings containing the "target" IDs) from my real-world
Org-mode file to my small test.org from above and marking the
heading that contains the TRIGGER properties to DONE, it then works
as expected. 

I then took the simple example from above, added a TODO keyword to
the heading 1, copied it to my real-world Org-mode file and even
this did not work: Heading 2 and 3 don't get their "NEXT" keyword
assigned.

So the behavior changes within different Org-file contexts.
Therefore, I do have an issue creating a minimal example to
demonstrate the bug.

Can somebody give me an advice how to debug this behavior?

[1] http://orgmode.org/worg/org-contrib/org-depend.html
[2] http://karl-voit.at/2016/12/18/org-depend/

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] Worg compilation error: Unknown component "worg-color-themes"

2017-09-23 Thread Karl Voit
Hi!

I just updated my old dot-tutorial[1]. As I pushed my chages to the
server, I got:

Writing objects: 100% (4/4), 576 bytes | 0 bytes/s, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: From /home/worg/worg
remote:  * branchmaster -> FETCH_HEAD
remote: Merge made by the 'recursive' strategy.
remote:  org-tutorials/org-dot-diagrams.org | 8 +---
remote:  1 file changed, 5 insertions(+), 3 deletions(-)
remote: worg publish process 15449 started at 09/23/17@02:43:55
remote: Loading /home/emacs/.emacs.el (source)...
remote: Loading /home/emacs/.emacs-custom.el (source)...
remote: Loading /home/emacs/git/emacs-htmlize/htmlize.el (source)...
remote: Emacs 26.0.50.1
remote: Unknown component "worg-color-themes" in project "worg"
remote: worg publish process 15449 exited at 09/23/17@02:43:57
To orgmode.org:worg.git
   874b4d47..646dd948  master -> master

Maybe somebody is able to fix this?

[1] http://orgmode.org/worg/org-tutorials/org-dot-diagrams.html

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] Slow speed of week and month views

2017-08-06 Thread Karl Voit
* Nicolas Goaziou <m...@nicolasgoaziou.fr> wrote:
> Karl Voit <devn...@karl-voit.at> writes:
>
>> I just learned about elp-instrument-package. What prefixes are of interest to
>> you?
>
> "org-" prefix. The nice thing about `elp-instrument-package' is that is
> reports the number of times a function is called.

Results at the end of this posting.

>> un-compiled agenda profiler-report:
>
> Thank you. However, there is much cruft going on there. "yankpad-",
> "ivy-", "yas-"... Even `profiler-report-write-profile' is registered in
> there.

Yes, this is my configuration ;-)

I'm no expert in interpreting the results but as far as I understood
it, the cruft you mentioned takes only a fraction of CPU time for
the task.

> Could you try to minimize as much as possible the non-Org interaction?
> You may need to load a minimal config to do so. You could also try to
> evaluate the command you want to time with M-: instead of M-x, e.g.
>
>   M-: (org-agenda nil "a")

I may take some time to come up with a minimum config and my agenda
files.

However, in case this is much faster compared to my current
situation, this does not help me with my issues and just shows that
Org itself does not have urgent performance issues, right?




org-agenda-list   1   
22.456601085  22.456601085
org-agenda-get-day-entries17  
18.255724348  1.0738661381
org-agenda-get-scheduled  17  
14.40543005   0.8473782382
org-element--parse-elements   2712
8.0038418899  0.0029512691
org-entry-get 2002
6.3268592120  0.0031602693
org--property-local-values1937
6.1333810950  0.0031664331
org-is-habit-p1779
5.9716177949  0.0033567272
org-get-property-block1943
5.5327713039  0.0028475405
org-back-to-heading   7664
5.1811751059  0.0006760405
org-at-planning-p 2338
4.4562334949  0.0019060023
org-inlinetask-in-task-p  4191
3.4042555110  0.0008122776
org-get-todo-state2284
3.3749943680  0.0014776682
org-agenda-get-deadlines  17  
2.7361401300  0.1609494194
org-agenda-prepare1   
2.200086025   2.200086025
org-agenda-prepare-buffers1   
1.980565276   1.980565276
org-element-parse-buffer  6   
1.4980202550  0.2496700425
org-agenda-finalize   1   
1.094985093   1.094985093
org-agenda-skip   2545
1.0722660840  0.0004213226
org-end-of-subtree449 
1.0195991870  0.0022708222
org-element--current-element  6040
0.8202829350  0.0001358084
org-get-entries-from-diary1   
0.806067286   0.806067286
org-up-heading-safe   398 
0.7662179339  0.0019251706
org-get-tags-at   126 
0.7296816199  0.0057911239
org-before-first-heading-p2036
0.7035860589  0.0003455727
org-agenda-dim-blocked-tasks  1   
0.689500952   0.689500952
org-element--parse-objects4566
0.6892202150  0.0001509461
org-entry-blocked-p   61  
0.678698494   0.0111262048
org-agenda-get-blocks 17  
0.628517483   0.0369716166
org-outline-level 1353
0.5567370970  0.0004114834
org-add-props 15547   
0.5454277439  3.508...e-05
org-element-item-parser   1698
0.5263746370  0.0003099968
org-indent-refresh-maybe  6   
0.495835792   0.0826392986
org-indent-add-properties 6   
0.4955369260  0.0825894876
org-agenda-get-timestamps 17  
0.4623098930  0.0271946995
org-block-todo-from-children-or-siblings-or-parent61  
0.3965410289  0.0065006726
org-refresh-category-properties   17   

Re: [O] Slow speed of week and month views

2017-08-06 Thread Karl Voit
Hi Adam,

* Adam Porter <a...@alphapapa.net> wrote:
> Karl Voit <devn...@karl-voit.at> writes:
>
>> With a fairly modified configuration (like mine on [0]) and a large
>> set of long Org-mode files I can't publish, it is hard to do
>> analysis here. So I can offer to report any performance annoyances
>> and anything you need to execute (report) on my side.
>
> It might be helpful if you posted a censored version of your large Org
> files somewhere.  There's a function by Nicolas that replaces all the
> characters with "x", and there's also a function that replaces words
> with random words of the same length (that one takes a while to run).

Nicolas, can you provide an URL for this? Sounds interesting.

>> I just learned about elp-instrument-package. What prefixes are of interest to
>> you?
>
> FYI, here's a handy "elp-profile" macro that automatically
> de-instruments after running.  It shows the top 20 functions by default,
> but you can adjust that easily.
>
> https://alphapapa.github.io/emacs-package-dev-handbook/#orgc830139

I executed following code below (without changing the prefixes yet
for testing purposes) which resulted in my usual Agenda but no
additional buffer showing any results. M-x elp-results is also
empty.

What did I do the wrong way?

(defmacro elp-profile (times  body)
  "Call this macro from an Org source block and you'll get a results block 
   showing which 20 functions were called the most times, how long they 
   took to run, etc. Set prefixes to a list of strings matching the prefixes 
   of the functions you want to instrument.

   Use it like this:
   (elp-profile 10
 (goto-char (point-min))
 (search-forward \"something\"))
  "
  (declare (indent defun))
  `(let ((prefixes '("string-" "s-" "buffer-" "append" "delq" "map"
 "list" "car" "save-" "outline-" "delete-dups"
 "sort" "line-" "nth" "concat" "char-to-string"
 "rx-" "goto-" "when" "search-" "re-"))
 output)
 (dolist (prefix prefixes)
   (elp-instrument-package prefix))
 (dotimes (x ,times)
   ,@body)
 (elp-results)
 (elp-restore-all)
 (point-min)
 (forward-line 20)
 (delete-region (point) (point-max))
 (setq output (buffer-substring-no-properties (point-min) (point-max)))
 (kill-buffer)
 (delete-window)
 output))

(elp-profile 1
 (goto-char (point-min))
 (org-agenda-list))


-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] Slow speed of week and month views

2017-08-06 Thread Karl Voit
Hi Nicolas,

* Nicolas Goaziou <m...@nicolasgoaziou.fr> wrote:
>
> Karl Voit <devn...@karl-voit.at> writes:
>
>> First: I've occasionally mentioned all kinds of performance issues
>> over the last years.

btw, working within my Memacs agenda [1] with a bit under a million
lines of Org-mode is the worst case scenario from my point of view
so far. Jumping from one day to another could lead to waiting times
of minutes.

And then there is the single-thread issue which results in 100%
CPU-core usage on only one of my four cores.

If you consider modern intel i5 CPUs (like mine) and the fairly
moderate data package of a few Megabytes, this is hard to explain to
someone who has IT/programming background but no Emacs experience.

> That's important indeed. But performance issues needs a proper profiling
> report to be useful. The type of data being processed (i.e., something
> that would be unusual, like 9k clock lines in a LOGBOOK drawer).

I totally agree.

With a fairly modified configuration (like mine on [0]) and a large
set of long Org-mode files I can't publish, it is hard to do
analysis here. So I can offer to report any performance annoyances
and anything you need to execute (report) on my side.

My Org-mode is from git/maint. Currently: release_9.0.3-261-g62dc27
but I can upgrade any time to the newest maint commit.

>> I even started threads on how to improve things
>> on a completely new level.
>
> This doesn't ring a bell, sorry.

This was a comment, not a complaint ;-)

>> So I am glad to be able to improve the situation for anybody. I have
>> had slow agenda performance for many years and I had to live with
>> it.
>
>> Here is a current profiling report from my daily agenda:
>
> Could you report it again running Org un-compiled (C-u M-x org-reload)?
> Also, another report using "M-x elp-instrument-package" would be great,
> too.

Sure:

I just learned about elp-instrument-package. What prefixes are of interest to
you?


un-compiled agenda profiler-report:

The output here seems very nasty. I put the exported result for temporarily on:
http://Karl-Voit.at/temp/2017-08-06_org-mode_agenda_profile_report_un-compiled.log

- command-execute   21982  86%
- call-interactively   21982  86%
- counsel-M-x 17686  69%
- ivy-read   17669  69%
- read-from-minibuffer  17529  69%
- minibuffer-inactive-mode 17367  68%
- run-mode-hooks  17367  68%
- run-hooks  17367  68%
- yankpad-local-category-to-major-mode  17367  68%
 - yankpad--categories  17367  68%
  - yankpad--file-elements  17359  68%
   - org-element-parse-buffer   17282  68%
- save-excursion17027  67%
 - org-element--parse-elements  17027  67%
  - save-excursion  17027  67%
   - let17027  67%
- while 17027  67%
 - let* 17027  67%
  - cond17019  67%
   - org-element--parse-elements17019  67%
- save-excursion17019  67%
 - let  17019  67%
  - while   17019  67%
   - let*   17019  67%
- cond  17019  67%
 - org-element--parse-elements  17019  67%
  - save-excursion  17019  67%
   - let17015  67%
- while 17015  67%
 - let* 17015  67%
  - cond17015  67%
   - org-element--parse-elements  17015  67%
- save-excursion17007  66%
 - let  17007  66%
  - while   17003  66%
   - let*   16999  66%
- cond  16590  65%
 - org-element--parse-objects  16586  
65%
  - save-excursion  16586  65%
  

Re: [O] Slow speed of week and month views

2017-08-06 Thread Karl Voit
* Nicolas Goaziou <m...@nicolasgoaziou.fr> wrote:
> Hello,

Hi Nicolas,

> Karl Voit <devn...@karl-voit.at> writes:
>
>> My daily agenda takes twenty seconds, my weekly approximately a
>> minute and generating a monthly agenda is something I can only do
>> when I plan to leave the computer for a longer break.
>>
>> Org-mode does not scale well, I'm afraid.
>
> Well, we would at least need to profiling report as a starting point.
> Could you provide one?

First: I've occasionally mentioned all kinds of performance issues
over the last years. I even started threads on how to improve things
on a completely new level.

I can provide many performance annoyances that affect me on a daily
basis.

So I am glad to be able to improve the situation for anybody. I have
had slow agenda performance for many years and I had to live with
it.

Here is a current profiling report from my daily agenda:

- command-execute   21948  98%
 - call-interactively   21948  98%
  - my-org-agenda   21518  96%
   - if 21518  96%
- org-agenda-list   21518  96%
 - byte-code21518  96%
  - byte-code   18530  82%
   - apply  18530  82%
- org-agenda-get-day-entries18530  82%
 - # 14961  66%
  - org-agenda-get-scheduled14957  66%
   - byte-code  13977  62%
- org-is-habit-p 6424  28%
 - org-entry-get 6236  27%
  - org--property-local-values   5876  26%
   - org-get-property-block  4258  19%
- org-inlinetask-in-task-p   1619   7%
   org-inlinetask-outline-regexp4   0%
- org-back-to-heading1512   6%
 - funcall   1512   6%
  - #1512   6%
 outline-back-to-heading 1041   4%
  org-before-first-heading-p  360   1%
  org-get-limited-outline-regexp   19   0%
- org-at-planning-p  3396  15%
 - funcall   2796  12%
  - # 2796  12%
   - org-inlinetask-in-task-p1202   5%
  org-inlinetask-outline-regexp12   0%
   - org-back-to-heading 1075   4%
- funcall1071   4%
 - # 1071   4%
outline-back-to-heading   575   2%
 org-get-limited-outline-regexp12   0%
- org-get-todo-state 2044   9%
 - org-back-to-heading   1456   6%
  - funcall  1456   6%
   - #   1456   6%
  outline-back-to-heading1021   4%
+ org-agenda-skip 528   2%
+ org-get-tags-at 276   1%
+ org-agenda--timestamp-to-absolute96   0%
+ org-habit-parse-todo 65   0%
+ org-agenda-format-item   32   0%
  org-get-priority 16   0%
  byte-code 8   0%
  string-prefix-p   4   0%
  org-outline-level 4   0%
 - #  2237  10%
  - org-agenda-get-deadlines 2237  10%
   - byte-code   1899   8%
- org-at-planning-p   896   4%
 - funcall736   3%
  - #  736   3%
   - org-back-to-heading  284   1%
 

Re: [O] [Orgmode] Slow speed of week and month views

2017-08-06 Thread Karl Voit
Hello John,

Great to read your thoughts on the topic - I am a huge admirer of
your work and we both seem to cope with similar issues with
Org-mode.

* John Kitchin  wrote:
>
> One is to use the new dynamic module capability to write an org parser in
> C, or a dedicated agenda function, which would presumably be faster than in
> elisp.  This seems hard, and for me would certainly be a multiyear project
> I am sure! The downside of this is the need to compile the module. I don't
> know how easy it would be to make this work across platforms with the
> relatively easy install org-mode currently has. This could have a side
> benefit though of a c-lib that could be used by others to expand where
> org-mode is used.

I'm not a fan of C at all but having the parser in C with the
possibility to use this parser for external tools as well sounds
awesome to me. After all, I've written a primitive parser for a
sub-set of Org-mode for https://github.com/novoid/lazyblorg using
Python.

> The other way that might work is to rely more heavily on a cached version
> of the files, perhaps in a different format than elisp, that is faster to
> work with. The approach I have explored in this is to index org files into
> a sqlite database. The idea then would be to generate the agenda from a sql
> query. I use something like this already to "find stuff in orgmode
> anywhere". One of the reasons I wrote this is the org-agenda list of files
> isn't practical for me because my files are so scattered on my file system.
> I had a need to be able to find TODOs in research projects in a pretty wide
> range of locations.
>
> The code I use is at
> https://github.com/jkitchin/scimax/blob/master/org-db.el, and from one
> database I can find headlines, contacts, locations, TODO headlines across
> my file system, all the files that contain a particular link, and my own
> recent org files. 

I didn't try org-db.el yet. So far, I survived using "git grep" and
counsel-grep [0]

> I am moderately motivated to switch from sqlite to MongoDB

Is org-db.el your standard way of accessing informations or do you
use it only for occasional searches where you assume that the usual
methods would be slow?

> The main point of the database was to get a query language, persistence and
> good performance. I have also used caches to speed up using bibtex files,
> and my org-contacts with reasonable performance. These have been all elisp,
> with no additional dependencies. Maybe one could do something similar to
> keep an agenda cache that is persistent and updated via hook functions.

Oh yeah. My org-contacts were unusable without at least some minor
performance improvements as well. Most important to me: improving
manipulation of properties using [1].

For example, org-set-property takes almost 20 seconds to give me its
interactive input line in my main Org-mode file. This is a no-go.
[1] helped me here a lot.

[0] 
https://github.com/novoid/dot-emacs/blob/master/config.org#optimizing-search-methods
[1] 
https://github.com/novoid/dot-emacs/blob/master/config.org#my-org-region-to-property--my-map-p

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] Determine min/max values in a table

2017-08-05 Thread Karl Voit
* Adam Porter  wrote:
> Thierry Banel  writes:
>
>> Alternatively you have the orgtbl-aggregate package available on Melpa.
>>
>> #+BEGIN: aggregate :table "myvalues" :cols "min(Values) max(Values)
>> mean(Values)"
>>
>> | min(Values) | max(Values) | mean(Values) |
>> |-+-+--|
>> |   2 |   7 |  4.5 |
>
> Wow, that's very cool!  Had no idea about that package.

Although I do have the package installed, I did not think about
min/max/mean of it ;-)

> Karl, if that doesn't work for you, you might look at the
> org-table-to-lisp function.  Here's an example of a function that uses
> it to sum columns in the current region:

Thanks for the code I copied to my knowledge base.

For now, vmin/vmax did the trick and I also refreshed my knowledge
of orgtbl-aggregate.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] [Orgmode] Slow speed of week and month views

2017-08-05 Thread Karl Voit
Thanks for the insight!

* Adam Porter  wrote:
>
> But doing that would, as Carsten said, require rewriting a lot of code.
> Essentially you'd be creating a new agenda system, so you'd have to
> reimplement a lot of existing code.  You could do it in parallel, rather
> than replacing existing code, so you wouldn't have to break the existing
> agenda system.  But I don't think there's any way to shortcut writing
> the new system.  I don't think there's any "low hanging fruit."

My daily agenda takes twenty seconds, my weekly approximately a
minute and generating a monthly agenda is something I can only do
when I plan to leave the computer for a longer break.

Org-mode does not scale well, I'm afraid.

Repeatedly going through all agenda files does not seem to be a very
reasonable design choice for the general use-case. I would like to
see an alternative approach for the future of Org-mode.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] Just sharing another orgmode use: usability tests

2017-08-02 Thread Karl Voit
* Eduardo Mercovich  wrote:
>
> + automatic task clocking, including automated time stamping of 
> every observation. 

You seem to use headings for any events.

If list items does the trick as well, you can take a look at timers
for doing the clocking thing: http://orgmode.org/manual/Timers.html

> + observation tagging (there are repeating patterns of use or 
> interaction problems or sources that you could cath on the fly, so 
> any observation could be related to those common issues). 

You already mentioned templates. I'd go with yasnippets for that as
well.

> + automatic filling of User/task-results-and-time matrix (the most 
> fundamental metric of usability tests). 

Wow, this would be great.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] Finding calc/elisp methods (was: Determine min/max values in a table)

2017-08-02 Thread Karl Voit
Hi,

* Karl Voit <devn...@karl-voit.at> wrote:
>
> How can I determine minimum and/or maximum value of a table?
>
> Here is my example:
>
> #+NAME: myvalues
>| Values |
>||
>|  4 |
>|  2 |
>|  3 |
>|  7 |
>|  5 |
>|  6 |
>
>| Min| Max| Average | First | Last |
>|++-+---+--|
>| #ERROR | #ERROR | 4.5 | 4 |6 |
> #+TBLFM: @2$1='(min (remote(myvalues,@2$1..@>$1)))::@2$2='(max 
> (remote(myvalues,@2$1..@>$1)))::@2$3=vmean(remote(myvalues,@2$1..@>$1))::@2$4=remote(myvalues,@2$1)::@2$5=remote(myvalues,@>$1)
>
> My goal is to get min==2 in the first column and max==7 in the
> second.

Leslie helped here by mentioning vmin/vmax which is that obvious
that I do feel embarrassed now ;-)

#+TBLFM: 
@2$1=vmin(remote(myvalues,@2$1..@>$1))::@2$2=vmax(remote(myvalues,@2$1..@>$1))::@2$3=vmean(remote(myvalues,@2$1..@>$1))::@2$4=remote(myvalues,@2$1)::@2$5=remote(myvalues,@>$1)

However, let's make this thread a valuable one by adding a question:
how does somebody find such things? Is there a source of information
where I could find calc methods by "apropos" method together with
elisp methods?

"M-h a minimum" returns only calc-find-minimum which is hardly of
any help in this case. "apropos-documentation" returns more results
but still lacks "vmin".

What is your method of choice to find answers to those kind of
questions? At least my internet search engine of choice did not help
me in the first place.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] Determine min/max values in a table

2017-08-02 Thread Karl Voit
Hi!

How can I determine minimum and/or maximum value of a table?

Here is my example:

#+NAME: myvalues
| Values |
||
|  4 |
|  2 |
|  3 |
|  7 |
|  5 |
|  6 |

| Min| Max| Average | First | Last |
|++-+---+--|
| #ERROR | #ERROR | 4.5 | 4 |6 |
#+TBLFM: @2$1='(min (remote(myvalues,@2$1..@>$1)))::@2$2='(max 
(remote(myvalues,@2$1..@>$1)))::@2$3=vmean(remote(myvalues,@2$1..@>$1))::@2$4=remote(myvalues,@2$1)::@2$5=remote(myvalues,@>$1)

My goal is to get min==2 in the first column and max==7 in the
second.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] "Autoloading failed to define function org-babel-do-load-languages"

2017-05-22 Thread Karl Voit
* Karl Voit <devn...@karl-voit.at> wrote:
>
> Org-mode from maint Git repository overruled via following lines
> right at the top of my ~/.emacs.d/init.el:
>| (add-to-list 'load-path "~/.emacs.d/contrib/org-mode/lisp")
>| (add-to-list 'load-path "~/.emacs.d/contrib/org-mode/contrib/lisp" t)
>
> When I start emacs, I got following error:
>
>| Debugger entered--Lisp error: (error "Autoloading failed to define function 
>org-babel-do-load-languages")

Somehow the error was provoked with an accidentally installed very
old version of Org-mode from Melpa. After deleting the Melpa folder,
the code worked fine.

Sorry for the fuzz.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] "Autoloading failed to define function org-babel-do-load-languages"

2017-05-16 Thread Karl Voit
Hi!

I'm in the process of switching from ~/.emacs.d/init.el to
~/.emacs.d/config.org using the method described on [1].

Org-mode from maint Git repository overruled via following lines
right at the top of my ~/.emacs.d/init.el:
| (add-to-list 'load-path "~/.emacs.d/contrib/org-mode/lisp")
| (add-to-list 'load-path "~/.emacs.d/contrib/org-mode/contrib/lisp" t)

All I did was moving the working elisp configuration into multiple
emacs-lisp blocks. So the content of config.org/config.el should be
OK.

When I start emacs, I got following error:

| Debugger entered--Lisp error: (error "Autoloading failed to define function 
org-babel-do-load-languages")
|   (org-babel-do-load-languages (quote org-babel-load-languages) (quote 
((python . t) (shell . t) (org . t) (emacs-lisp . t) (sql . t) (restclient . 
t
|   (progn (org-babel-do-load-languages (quote org-babel-load-languages) (quote 
((python . t) (shell . t) (org . t) (emacs-lisp . t) (sql . t) (restclient . 
t)
|   (if (my-system-type-is-windows) (progn (org-babel-do-load-languages (quote 
org-babel-load-languages) (quote ((python . t) (shell . t) (org . t) 
(emacs-lisp . t) (sql . t) (restclient . t))
|   eval-buffer(# nil 
"c:/Users/karl.voit/AppData/Roaming/.emacs.d/config.el" nil t)  ; Reading at 
buffer position 136983
|   
load-with-code-conversion("c:/Users/karl.voit/AppData/Roaming/.emacs.d/config.el"
 "c:/Users/karl.voit/AppData/Roaming/.emacs.d/config.el" nil nil)
|   load("c:/Users/karl.voit/AppData/Roaming/.emacs.d/config.el" nil nil t)
|   load-file("~/.emacs.d/config.el")
|   (let ((orgfile (concat my-user-emacs-directory "config.org")) (elfile 
(concat my-user-emacs-directory "config.el")) (gc-cons-threshold 
most-positive-fixnum)) (if (or (not (file-exists-p elfile)) 
(file-newer-than-file-p orgfile elfile)) (progn (my-tangle-config-org) 
(save-buffers-kill-emacs))) (load-file elfile))
|   eval-buffer(# nil 
"c:/Users/karl.voit/AppData/Roaming/.emacs.d/init.el" nil t)  ; Reading at 
buffer position 3295
|   
load-with-code-conversion("c:/Users/karl.voit/AppData/Roaming/.emacs.d/init.el" 
"c:/Users/karl.voit/AppData/Roaming/.emacs.d/init.el" t t)
|   load("c:/Users/karl.voit/AppData/Roaming/.emacs.d/init" t t)
|   #[0 \205\262

I get it with Debian GNU/Linux stable with latest emacs-snapshot,
Xubuntu 16.04 with its emacs, and with Emacs 24.5 on Windows. The
latter produced the message above, obviously.

The code that causes the error seems to be:

| (org-babel-do-load-languages
|'org-babel-load-languages
|'(
|  (python . t)
|  (shell . t)
|  (org . t)
|  (emacs-lisp . t)
|  (sql . t)
|  (restclient . t)
|  ))

A rough guess is that Emacs is using the built-in Org-mode to load
the config.el. I can not confirm this because "M-x org-version"
results in "command-execute: Autoloading failed to define function
org-version".

Do you have any tip for me?

[1] http://www.holgerschurig.de/en/emacs-init-tangle/
and https://bitbucket.org/holgerschurig/emacsconf/src

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] org-table: Can't assign numbers to range

2017-02-10 Thread Karl Voit
* Nicolas Goaziou <m...@nicolasgoaziou.fr> wrote:
> Hello,
>
> Karl Voit <devn...@karl-voit.at> writes:
>
>> Hi!
>>
>> | foo |
>> |-|
>> | |
>> | |
>> |-|
>> | |
>> | |
>> |-|
>>
>> #+TBLFM: @I$1..@II$1=1 :: @II$1..@III$1=2
>>
>> Results in "user-error: Can't assign to hline relative reference"
>>
>> Why?
>
> Because "@I$1..@II$1" is not as obvious as you may think at first
> thought. As a consequence, it is forbidden.

Hm. So is it true that I can't come up with a formula that fills up
the cells with those integers except cell-by-cell?

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] org-table: Can't assign numbers to range

2017-02-08 Thread Karl Voit
Hi!

| foo |
|-|
| |
| |
|-|
| |
| |
|-|
#+TBLFM: @I$1..@II$1=1 :: @II$1..@III$1=2

Results in "user-error: Can't assign to hline relative reference"

Why?

I assumed to get following table as a result:

| foo |
|-|
|   1 |
|   1 |
|-|
|   2 |
|   2 |
|-|
#+TBLFM: @I$1..@II$1=1 :: @II$1..@III$1=2

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] git and orgmode: teaching git a bit of orgmode syntax

2017-01-24 Thread Karl Voit
Hi!

I am using gitwatch[1] to auto-commit any changes to my org-mode
files in a git repository.

Unfortunately, git does not handle diffs in a meaningful way. For
example, when there are sub-hierarchies added or removed, it ends up
with many diff-lines like the following:

-* NEXT test with DAVdroid
+* Lesestoff [1/26]:2read:
 :PROPERTIES:
-:CREATED:  [2016-05-08 Sun 12:51]
+:CREATED: [2012-04-17 Tue 10:39]
+:ARCHIVE:  %s_archive::* Lesestoff
+:CATEGORY: reading
 :END:

The two headings being compared by git are totally unrelated. Git
did find a match for the :PROPERTIES: and :END: lines and therefore
assumed that I modified the level five heading "NEXT test with
DAVdroid" into the first level heading "Lesestoff", not recognizing
that in fact, there were many org-mode lines moved to the archive
file, resulting in many deleted lines instead of modified ones.

The underlying issue is, to my understanding, that git does not know
about Org-mode syntax elements. Git does not know that :PROPERTIES:
and :END: lines should not be used to match similar lines. It does
not know about headings, identifying CREATED time-stamps, and other
things.

I am not familiar with git other than from an end user point of
view. But I do think that git can be taught here via some kind of
extension so that meaningful changes are recognized and displayed.

Is there somebody with the same issue and/or somebody with a better
understanding how this issue can be addressed?

Thanks!

[1] https://github.com/nevik/gitwatch


-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




  1   2   3   4   5   6   7   >