Re: can emphasis emphasize this?

2023-11-12 Thread Marcin Borkowski


On 2023-11-13, at 05:29, Samuel Wales  wrote:

> if it is as above, the emphasis does not show.  but if i put a space
> after =, it does show.  i kind of want to keep trying without space,
> but i want emphasis.
>
> is this a possible hack to emphasis syntax?  we've changed that around
> a bunch i know, and forgotten details.  i suspect it is at your own
> risk stuff now.

My go-to solution is this:

(defun insert-zero-width-space ()
  "Insert Unicode character \"zero-width space\"."
  (interactive)
  (insert 8203))

Hth,

-- 
Marcin Borkowski
http://mbork.pl



Re: How to mark a in HTML export with a class?

2023-11-06 Thread Marcin Borkowski


On 2023-11-07, at 06:06, Marcin Borkowski  wrote:

> Hi all,
>
> I'd like to put some HTML class on my  element, exported from an Org
> mode list.  Is that possible?

Ok, found it - say

#+ATTR_HTML: :class whatever

right before it.

Best,

-- 
Marcin Borkowski
http://mbork.pl



How to mark a in HTML export with a class?

2023-11-06 Thread Marcin Borkowski
Hi all,

I'd like to put some HTML class on my  element, exported from an Org
mode list.  Is that possible?

TIA,

-- 
Marcin Borkowski
http://mbork.pl



Re: Is there a size limit to org files?

2023-09-08 Thread Marcin Borkowski


On 2023-09-08, at 19:37, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> It's a /very/ long shot, but I noticed that editing large tables (1000+
>> lines) can become pretty slow.  Apart from that, I have Org files with
>> tens of thousands lines and they work pretty well.
>
> Expected. The current code re-inserts the whole table every time you
> need to re-align it. You can guess how such approach scales.

Agreed, just wanted to point out one possible reason for slowness.

Another one, it seems, is clocking in when the entry already has a lot
of clock entries.  I have a headline with 8000+ clock entries and
starting another one takes about half a second.

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: Is there a size limit to org files?

2023-09-08 Thread Marcin Borkowski


On 2023-09-08, at 18:26, Carlo Tambuatco  wrote:

> I noticed that an org file I was using for my capture templates was getting
> quite large
> and that my capture templates that were pasting TODO entries in that file
> were starting to exhibit
> strange behavior. Mostly just getting stuck at a mysterious "clipboard
> pasted to level 2 subtree"
> message, then it would just hang there until I hit ctrl g.
>
> Since this file was getting quite big and unwieldy, > 5000 lines, I decided
> to split it up, so that
> the various entries under their headers would be split up into different
> files. I basically just
> put each header into its own separate file, and updated my
> org-capture-templates accordingly.
>
> Since then, no strange behavior, no stalling and hanging for no apparent
> reason.
>
> So, I was wondering if there is hardcoded somewhere in org some kind of
> size limit to the
> files it has to deal with, or is this some limitation arising naturally
> from the size of
> the clipboard? I'm not sure how org handles large files when considering
> how to paste
> entries from capture templates.

It's a /very/ long shot, but I noticed that editing large tables (1000+
lines) can become pretty slow.  Apart from that, I have Org files with
tens of thousands lines and they work pretty well.

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: How to put a string produced by an Elisp form in an Org source block in the Org file?

2023-08-05 Thread Marcin Borkowski


On 2023-08-05, at 11:49, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> Thanks a lot, that works!  (Apart from the issue with lines beginning
>> with a star, possibly preceded by whitespace, which are "escaped" with
>> a comma - but that is a known thing in Org, and I can easily circumvent
>> it.)
>
> May you elaborate why you consider this a bug?

I wouldn't call it a bug per se.  If my chart looks like this:

|
*
|*
| *
+--*-

it is displayed in Org example block as

|
,*
|*
| *
+--*-

If I change the character to `#' (which does not have a special meaning
to Org like the asterisk), I get the correct

|
#
|#
| #
+--#-

Sorry for the misunderstanding.  I'm not sure how to word it better,
though...

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: How to put a string produced by an Elisp form in an Org source block in the Org file?

2023-08-05 Thread Marcin Borkowski


On 2023-08-04, at 22:20, Marcin Borkowski  wrote:

> On 2023-08-04, at 10:03, Ihor Radchenko  wrote:
>
>> Marcin Borkowski  writes:
>>
>>> I have an Elisp form in an Org source block, returning a (multi-line)
>>> string.  I'd like to put that string into the same Org buffer.  I tried
>>> `:results raw', but the string contains `|' characters, so Org treats
>>> its as a table and tries to format it as such, which is not what I want.
>>>
>>> How to do that?
>>
>> Maybe :wrap example?
>
> Thanks a lot, that works!  (Apart from the issue with lines beginning
> with a star, possibly preceded by whitespace, which are "escaped" with
> a comma - but that is a known thing in Org, and I can easily circumvent
> it.)
>
> BTW, that means that my blog post for this weekend (about plotting
> charts from Org tables, all within Org mode and using ASCII art) is
> basically almost ready!

And here it is:
https://mbork.pl/2023-08-05_Plotting_ASCII_art_charts_from_Org_mode_tables

Thanks again!

-- 
Marcin Borkowski
http://mbork.pl



Re: How to put a string produced by an Elisp form in an Org source block in the Org file?

2023-08-04 Thread Marcin Borkowski


On 2023-08-04, at 10:03, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> I have an Elisp form in an Org source block, returning a (multi-line)
>> string.  I'd like to put that string into the same Org buffer.  I tried
>> `:results raw', but the string contains `|' characters, so Org treats
>> its as a table and tries to format it as such, which is not what I want.
>>
>> How to do that?
>
> Maybe :wrap example?

Thanks a lot, that works!  (Apart from the issue with lines beginning
with a star, possibly preceded by whitespace, which are "escaped" with
a comma - but that is a known thing in Org, and I can easily circumvent
it.)

BTW, that means that my blog post for this weekend (about plotting
charts from Org tables, all within Org mode and using ASCII art) is
basically almost ready!

Best,

-- 
Marcin Borkowski
http://mbork.pl



How to put a string produced by an Elisp form in an Org source block in the Org file?

2023-08-04 Thread Marcin Borkowski
Hi Orgers,

I have an Elisp form in an Org source block, returning a (multi-line)
string.  I'd like to put that string into the same Org buffer.  I tried
`:results raw', but the string contains `|' characters, so Org treats
its as a table and tries to format it as such, which is not what I want.

How to do that?

-- 
Marcin Borkowski
http://mbork.pl



Re: How to get the contents of an Org subtree?

2023-07-25 Thread Marcin Borkowski


On 2023-07-25, at 07:19, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> I want to get the contents ("text") of a subtree.  Without the heading,
>> without the drawers - just the text.
>
> org-agenda-get-some-entry-text

Thanks!  This was far from obvious, but works exactly as I needed!

Best,

-- 
Marcin Borkowski
http://mbork.pl



How to get the contents of an Org subtree?

2023-07-24 Thread Marcin Borkowski
Hi all,

I want to get the contents ("text") of a subtree.  Without the heading,
without the drawers - just the text.  For example, for this:

--8<---cut here---start->8---
** Title
:PROPERTIES:
:CUSTOM_ID: whatever
:END:
This is the text.
--8<---cut here---end--->8---

I need the string "This is the text.".

How to do that?

-- 
Marcin Borkowski
http://mbork.pl



Org Clive, a new Org-mode-based blog engine

2023-07-22 Thread Marcin Borkowski
Hi all,

you might be interested in looking at my latest (very small) project - a blog 
engine written on top of Org mode.  Yes, yet another one - but each of the 
existing solutions lacked something I needed.

Head on to GitLab (https://gitlab.com/mbork_mbork_pl/org-clive) or to my
blog post about it
(https://mbork.pl/2023-07-22_Org_Clive_-_a_new_Org-mode-based_blogging_engine)
or to Hacker News (https://news.ycombinator.com/item?id=36824652).

Best,

-- 
Marcin Borkowski
http://mbork.pl



How to go to an Org headline programmatically?

2023-07-05 Thread Marcin Borkowski
Hi all,

I want to find an Org headline in Elisp.  No need to make it visible,
for example - just move the point to the heading with a given title (it
may even be within `save-excursion', as in "go there, do something, go
back").  `org-link-search' seems to do what I want, but it does a lot
more - is there some simpler function to do that?

TIA,

-- 
Marcin Borkowski
http://mbork.pl



Re: How to export to the simplest possible HTML?

2023-06-28 Thread Marcin Borkowski


On 2023-06-27, at 13:00, Max Nikulin  wrote:

>>> On 08/06/2023 22:18, Thomas Redelberger wrote:
>>>>   http://web222.webclient5.de/doc/swdev/emacs/orgmode/html
>>>
>>> At this page:
>>>
>>>> #+BIND: org-html-viewport nil
>>>> I do not need viewport information in the HTML.
>
> On 26/06/2023 02:56, Marcin Borkowski wrote:
>> Do you mean this?
>> https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag
>
> Yes, I do. Browser development tools allows to test adaptive design
> (to simulate specific mobile devices).

Thanks.

> I was surprised that somebody may intentionally disable the feature
> supported by Org on a site that at first glance does not require
> special viewport settings. Since you are in the process of refreshing
> your site, I decided to draw your attention to this setting of HTML
> pages.

I did not plan to do anything with https://mbork.pl, but I'll look into
it.  (I'm working on another site.)

Thanks,

-- 
Marcin Borkowski
http://mbork.pl



Re: How to export to the simplest possible HTML?

2023-06-25 Thread Marcin Borkowski


On 2023-06-24, at 17:04, Max Nikulin  wrote:

> On 08/06/2023 22:18, Thomas Redelberger wrote:
>> I had a similar requirement for "simplest HTML" and have documented
>> how I tackled this under
>>  http://web222.webclient5.de/doc/swdev/emacs/orgmode/html
>
> At this page:
>
>> #+BIND: org-html-viewport nil
>> I do not need viewport information in the HTML. 
>
> From my point of view it sounds strange. I do not see a real reason to
> intentionally make a site inconvenient for users of mobile devices.
>
> Marcin, viewport is missed on your site as well.

Do you mean this?
https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag

I think the reason is that the site was designed (in terms of HTML and
CSS) well over 15 years ago...

Thanks,

-- 
Marcin Borkowski
http://mbork.pl



Re: time-warping - retroactively marking DONE?

2023-06-25 Thread Marcin Borkowski


On 2023-06-25, at 18:03, Adam Spiers  wrote:

> Three years later, I finally tried this:
>
> On Wed, 8 Jul 2020 at 05:53, Kyle Meyer  wrote:
>> Adam Spiers writes:
>> > I'm looking for a way to retroactively mark a task as having been done
>> > at a previous time/date.  I know that I can just change the keyword to
>> > DONE and then edit the timestamp, but this is tedious when it's a
>> > repeating event, e.g.:
>> [...]
>>
>> I'm not aware of any built-in support for this.

Not built-in, and yet another solution, but see also here:
https://mbork.pl/2019-08-05_datefudge_and_agenda_testing

And, of course, `org-todo-yesterday'.

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: How to export to the simplest possible HTML?

2023-06-24 Thread Marcin Borkowski


On 2023-06-24, at 15:34, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>>> Org export passes the actual parsed and filtered AST that will be
>>> exported to `org-export-filter-parse-tree-functions'. You can modify and
>>> traverse the parse tree as you need.
>>
>> Yeah, that I do understand.  Problem is, I don't know how the AST is
>> structured, what functions operate on it etc.  I am aware that I could
>> learn all of that from the source and experimenting, but it would
>> probably be a bit time-consuming, and other ways turned out to be much
>> easier (which means better for me – I want something simple).
>
> I tried to provide a summary in my recent patch.
> https://list.orgmode.org/874jnudps5.fsf@localhost/3-a.txt

Thanks, this looks interesting, I'll take a look!

> You can also refer to
> https://orgmode.org/worg/dev/org-element-api.html

This one I know, of course, but it's a bit more high-level, I think.
>
>> As an aside, inspecting deeply nested structures in Elisp seems a pain
>> in the neck.  Does anyone know a good method of interactively inspecting
>> them?
>
> https://github.com/mmontone/emacs-inspector

Wow, this looks _great_!!!  I'll install it and try it out!

Thanks,

-- 
Marcin Borkowski
http://mbork.pl



Re: How to export to the simplest possible HTML?

2023-06-24 Thread Marcin Borkowski


On 2023-06-03, at 10:37, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>>> You can loop over links in the exported subtree and export any extra if
>>> necessary. For example, in the `org-export-filter-parse-tree-functions'.
>>
>> Interesting.  The main problem with it is that the docstring is rather
>> concise and I don't understand it well enough to use it.
>
> Org export passes the actual parsed and filtered AST that will be
> exported to `org-export-filter-parse-tree-functions'. You can modify and
> traverse the parse tree as you need.

Yeah, that I do understand.  Problem is, I don't know how the AST is
structured, what functions operate on it etc.  I am aware that I could
learn all of that from the source and experimenting, but it would
probably be a bit time-consuming, and other ways turned out to be much
easier (which means better for me – I want something simple).

As an aside, inspecting deeply nested structures in Elisp seems a pain
in the neck.  Does anyone know a good method of interactively inspecting
them?  My usual approach (Edebug) is next to useless when the value
displayed in the minibuffer is a deeply nested list with dozens or
hundreds of elements at different levels...

TIA,

-- 
Marcin Borkowski
http://mbork.pl



Re: How to export to the simplest possible HTML?

2023-06-24 Thread Marcin Borkowski


On 2023-06-10, at 10:25, Thomas Redelberger  wrote:

> Dear Marcin and everybody,
>
> I had a similar requirement for "simplest HTML" and have documented (incl. 
> source code) how I tackled this under
>  http://web222.webclient5.de/doc/swdev/emacs/orgmode/html
>
> In summary, my solution is
> - a few settings in init.el:
>   + org-html-text-markup-alist similar to below
>   + setting org-export-allow-bind-keywords to t
> - setting quite some org variables in-buffer/in the org file
> - elisp to steer a final XSLT transformation of the generated HTML
>
>
> I had coded a derived HTML export back-end (for Emacs 25.1) and used it quite 
> for some time.
> When I moved to Emacs 27.2, the derived back-end did not work any more, hence 
> I changed to above approach.

Thanks.

I settled for a custom (very simple) derived exporter and
`org-export-as` with `body-only' set to `t' (and I wrap the generated
HTML in tags like `' and `' myself then).

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: How to tell `org-html-link' to create a link with some HTML class?

2023-06-21 Thread Marcin Borkowski


On 2023-06-20, at 18:30, Max Nikulin  wrote:

> On 20/06/2023 11:42, Marcin Borkowski wrote:
>> as I mentioned some time ago, I'm writing a custom exporter
>> (actually,
>> a very thin wrapper around the HTML exporter).  I'd like `org-html-link'
>> to add some class to the links it generates.  Is that possible?
>
> I do not have a ready to use recipe. Some links to mailing list threads:
>
> [...]

Thanks.  My use case is a bit different – I explicitly do not want to
mark these links in the Org file, but I want my custom exporter to add
some class to "external" links.  (Yes, I am coding yet another blogging
platform on top of Org mode – but I believe it has some novel aspects;
I did review the existing options and none of them seems to do what
I want.)

Thanks anyway,

-- 
Marcin Borkowski
http://mbork.pl



Re: How to tell `org-html-link' to create a link with some HTML class?

2023-06-20 Thread Marcin Borkowski


On 2023-06-20, at 08:07, Jens Lechtenboerger  wrote:

> On 2023-06-20, Marcin Borkowski wrote:
>
>> Dear Orgers,
>>
>> as I mentioned some time ago, I'm writing a custom exporter (actually,
>> a very thin wrapper around the HTML exporter).  I'd like `org-html-link'
>> to add some class to the links it generates.  Is that possible?
>
> Dear Marcin,
>
> yes, that’s possible, ":attr_html" is read in `org-html-link'.  You
> have to set that in your code, see [1] for an example for classes in
> my reveal.js backend.
>
> Briefly, with `elem' being the link, I use this:
> `(org-element-put-property elem :attr_html (list newattrs))'
>
> Best wishes
> Jens
>
> [1] https://gitlab.com/oer/org-re-reveal/-/blob/master/org-re-reveal.el#L2167

Great, it worked!  Though not at first – I had to experiment a bit to
find the right invocation:

(org-element-put-property link :attr_html (list ":class" "external"))

which was not obvious for me.

Thanks,

-- 
Marcin Borkowski
http://mbork.pl



How to tell `org-html-link' to create a link with some HTML class?

2023-06-19 Thread Marcin Borkowski
Dear Orgers,

as I mentioned some time ago, I'm writing a custom exporter (actually,
a very thin wrapper around the HTML exporter).  I'd like `org-html-link'
to add some class to the links it generates.  Is that possible?

TIA,

-- 
Marcin Borkowski
http://mbork.pl



How to add custom agenda entries?

2023-06-12 Thread Marcin Borkowski
Hi all,

I'd like to add some custom entries to my agenda.  I wrote myself
a bunch of functions to remind me when I did some things (see
https://mbork.pl/2023-06-12_Counting_time%2c_backwards), and it would be
great if I could incorporate this into the agenda.  Ideally, I would add
to my agenda setup a function which Org mode would run for every
headline in my agenda files, and display the string returned from it.

I don't think Org mode has that, but maybe there's some package which
can do it?

TIA,

-- 
Marcin Borkowski
http://mbork.pl



Re: Aquamacs question:how to display calendar mode

2023-06-05 Thread Marcin Borkowski


On 2023-06-05, at 15:57, Renato Pontefice  wrote:

> Hi,
> I don’t know if I’m writing on the right place, I try…
> I’m try to work with Aquamacs (on my Macosx). 
> When in emacs I press the combination C-u 21 C-c a a I obtain a 21 days 
> calendar mode view on my buffer.

This looks like a custom binding, not one built into Emacs.  Try

C-h c C-c a a

in your emacs and see what it tells you.  Then you can say C-u 21 M-x
, or bind that command to C-c
a a or any other key you like.

Hth,

-- 
Marcin Borkowski
http://mbork.pl



Re: How to export to the simplest possible HTML?

2023-06-03 Thread Marcin Borkowski


On 2023-06-03, at 07:08, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> On 2023-05-30, at 20:45, Marcin Borkowski  wrote:
>>
>>>> Just use `org-export-as'.
>>>
>>> Thanks again, I didn't know about that function!
>>
>> I tried playing around with it, but it has one drawback - I can't use it
>> to export a subtree containing a link to another subtree, and that is
>> something I will definitely need.  (I can see why it works that way -
>> for that to work, I have to somehow make sure that subtrees containing
>> targets of those links are also exported at some point in time - but
>> I need another behavior...)
>
> AFAIR, ox-hugo implements what you want here.

I know, but after a long consideration and some experiments I decided
against Hugo - I want something (even) simpler and I plan to cook myself
a pure Elisp solution.

>> My current idea is to go with a custom exporter derived from the HTML
>> one, indeed.  Is there a better approach?
>
> You can loop over links in the exported subtree and export any extra if
> necessary. For example, in the `org-export-filter-parse-tree-functions'.

Interesting.  The main problem with it is that the docstring is rather
concise and I don't understand it well enough to use it.  I will perform
some experiments, but if they fail, I think a derived exporter with
a custom link-exporting function can also be helpful.

Thanks,

-- 
Marcin Borkowski
http://mbork.pl



Re: How to export to the simplest possible HTML?

2023-06-02 Thread Marcin Borkowski


On 2023-05-30, at 20:45, Marcin Borkowski  wrote:

>> Just use `org-export-as'.
>
> Thanks again, I didn't know about that function!

I tried playing around with it, but it has one drawback - I can't use it
to export a subtree containing a link to another subtree, and that is
something I will definitely need.  (I can see why it works that way -
for that to work, I have to somehow make sure that subtrees containing
targets of those links are also exported at some point in time - but
I need another behavior...)

My current idea is to go with a custom exporter derived from the HTML
one, indeed.  Is there a better approach?

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: How to export to the simplest possible HTML?

2023-05-30 Thread Marcin Borkowski


On 2023-05-30, at 17:32, Max Nikulin  wrote:

> On 30/05/2023 10:47, Marcin Borkowski wrote:
>> since I'm going to
>> call my exporting function in a loop over many elements.  I tried
>> (org-export-with-backend 'html (org-element-at-point (point)))
>
> There is `org-export-string-as', but likely it is not suitable for
> you. My guess is that you are going to export headings (blog posts) to
> separate html files.

Correct, dear Holmes. ;-)

>> This is /italic/.
>> can become e.g.
>> This is italic.
>
> I am curious whether  is more friendly to screen readers
> https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em

Good point.  You're right, I'll probably go with `' then.  (The
reason I wanted `' was that I wan't somewhat atypical styling,
namely letterspace.  But of course css magic can make `' do this,
too.)

>> I'm considering writing a custom (derived) export backend, but maybe
>> that is an overkill?  Any ideas?
>
> I just have noticed
>
> (defcustom org-html-text-markup-alist
>   '((bold . "%s")
> (code . "%s")
> (italic . "%s")
> (strike-through . "%s")
> (underline . "%s")
> (verbatim . "%s"))
>   "Alist of HTML expressions to convert text markup.
>
> You may look into ox-html customizations such as
> (:html-doctype "HTML_DOCTYPE" nil org-html-doctype)
> (:html-html5-fancy nil "html5-fancy" org-html-html5-fancy)
>
> I have never tried ox-slimhtml:
> Laszlo Elo. ox-slimhtml. Mon, 14 Dec 2020 00:48:27
> -0500. https://list.orgmode.org/41d2e10d-bcff-4604-8417-b499514af...@bald.cat

Ah, that looks interesting, too.

Thanks!

-- 
Marcin Borkowski
http://mbork.pl



Re: How to export to the simplest possible HTML?

2023-05-30 Thread Marcin Borkowski


On 2023-05-30, at 08:21, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> ... I tried this:
>>
>> (org-html-export-as-html nil nil nil t '(org-export-with-toc nil))
>
> You need (org-html-export-as-html nil nil nil t '(:with-toc nil))
> See `org-export-options-alist'.

Thanks.  So apparently I mixed "options" with "variables".

>> but the ToC still appears in the output.  Also, I'd prefer to do it
>> a bit "less interactively" - for example, setting the current buffer to
>> the one with export results is unnecessary for me, since I'm going to
>> call my exporting function in a loop over many elements.  I tried
>>
>> (org-export-with-backend 'html (org-element-at-point (point)))
>
> Just use `org-export-as'.

Thanks again, I didn't know about that function!

>> but it errored out:
>>
>> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>>   org-html-headline((headline (:raw-value ...)) ...)
>>   org-export-with-backend(html (headline (:raw-value ...)))
>
> Because `org-element-at-point' does not return a parsed subtree. Just a
> partial one without children.

I don't understand this distinction, but now that I know about
`org-export-as' it doesn't matter.

>> I also want to supply my custom formatting for italics & friends, so
>> that
>>
>> This is /italic/.
>>
>> can become e.g.
>>
>> This is italic.
>>
>> I'm considering writing a custom (derived) export backend, but maybe
>> that is an overkill?  Any ideas?
>
> Derived backend will be the easiest. It is not even hard. Just a few
> lines of code.

I know, I wrote one a few years ago, but I still think it might be a bit
overhead.  Well, I'll definitely consider that option.

Thanks,

-- 
Marcin Borkowski
http://mbork.pl



How to export to the simplest possible HTML?

2023-05-29 Thread Marcin Borkowski
Hello everyone,

I'd like to export an Org buffer (or portion of it) to the simplest HTML
possible, prgrammatically.  For example, I only want the body, I don't
want any generated IDs, and I don't want the ToC.  I tried this:

(org-html-export-as-html nil nil nil t '(org-export-with-toc nil))

but the ToC still appears in the output.  Also, I'd prefer to do it
a bit "less interactively" - for example, setting the current buffer to
the one with export results is unnecessary for me, since I'm going to
call my exporting function in a loop over many elements.  I tried

(org-export-with-backend 'html (org-element-at-point (point)))

but it errored out:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  org-html-headline((headline (:raw-value ...)) ...)
  org-export-with-backend(html (headline (:raw-value ...)))

I also want to supply my custom formatting for italics & friends, so
that

This is /italic/.

can become e.g.

This is italic.

I'm considering writing a custom (derived) export backend, but maybe
that is an overkill?  Any ideas?

TIA,

-- 
Marcin Borkowski
http://mbork.pl



Re: An Org-mode-based blogging engine?

2023-05-20 Thread Marcin Borkowski


On 2023-05-08, at 17:48, Vinícius Moraes  
wrote:

> I recommend using Hugo, since it supports org-mode files
> directly. Setting up Hugo to meet your requirements can be done in
> many ways, and you can find almost everything you need in their
> documentation. Although there is a bit of a learning curve, it's nothing
> that an Emacs user can't handle.

Yeah, you're probably right.  Though frankly I'd prefer to spend as
little time as possible on learning the tools here - I do not intend to
become a Hugo wizard, I just need it for this one project (well, maybe
two, but that's it).

> For integration and workflow, I've been using the easy-hugo package. It
> has everything I've needed so far, from writing to publishing to
> managing. While Hugo does support org files, there are some cases where
> you need to tinker a bit to make it work properly. For example, the
> other day, I was trying to publish a poem using verse blocks and it
> didn't work. All I had to do was trying another way, which was adding
> "//" at the end of each verse to have proper line breaking.
>
> You'll learn many little things like this through experience, and if
> needed, you can always use HTML/Go code to complement org-mode features.
>
> Regardless of which tool path you choose, blogging with org-mode is a
> great experience.

I know, I write my blog in Org and then export to Oddmuse using my
custom exporter I wrote many years ago.  But it's not fully automated,
and this time I'd like to have something much more automated.  (Also,
I don't want any DHTML - I just want to have a bunch of static files so
that it's goin gto be really fast.)

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: An Org-mode-based blogging engine?

2023-05-20 Thread Marcin Borkowski


On 2023-05-08, at 12:44, Dr. Arne Babenhauserheide  wrote:

> Marcin Borkowski  writes:
>
>> I'm preparing to set up a new blog, and I'd like to have a fully
>> Org-mode-based workflow.  Ideally, I'd like to be able to do everything
>> - including publishing the posts - from within Emacs.
>>
>> I know about things like "Org publish" and ox-hugo, though I never used
>> them - and there are probably others - but I'm asking specifically about
>> two things:
>>
>> A. other people's experiences with similar workflows, and
>> B. tool/workflow recommendations.
>
> My setup is different in that I use one org-file per article, but I use
> org publish for my website.

Thanks.  In fact, I looked into Org publish, but having one big Org file
for the whole site is rather important for me, so I decided that ox-hugo
(which supports exactly that idea) will be better for me.

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: An Org-mode-based blogging engine?

2023-05-20 Thread Marcin Borkowski


On 2023-05-08, at 12:36, Martin Steffen  wrote:

> Hi,
>>>>>> "Marcin" == Marcin Borkowski  writes:
>
> Marcin> fully Org-mode-based workflow.  Ideally, I'd like to be able
> Marcin> to do everything - including publishing the posts - from
> Marcin> within Emacs.
>
>
> I use webpage generation (including blogs) using Jekyll. Since I wanted
> to stick to org, all is set-up in a way, that the ``content'' including
> the blogs is done in org, and then do ``org-publish'' to generate stuff
> as fit for consumption for jekyll and the workflow then continues from
> there (basically just invoking jekyll to ``publish'' the stuff). jekyll
> expects its content in md, but I feel more comfortable with org.
>
> That leads to a two stage thing: first translate org to md (by an
> appropriate org-publish set-up) and then generate the web-page from the
> md-files. So it's not all org-workflow, but once it's set-up, it's
> basically only org as far as content is concerned.
>
>
> Fine points apply, as jekyll has a lot of moving parts and
> configurations. And possible pictures and graphics etc. is also not ``in
> org''- And actually, the org-files I am using have some jekyll-specific
> md-prefix between
>
> +begin_export markdown
> +end_export
>
> to tweak things for jekyll. But the org-part is easy, and for me it
> works smooth. 
>
>
> In a different response, HUGO was mentioned. I don't have experience
> with HUGO, but it's probably comparable to jekyll.

Thanks.

In fact, a few years ago I researched both Hugo and Jekyll and for some
reason I can't remember now I settled on Hugo.  (That project is long
dead, btw.)  Since a few people recommended Hugo to me, I guess I'll go
with that.

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: An Org-mode-based blogging engine?

2023-05-20 Thread Marcin Borkowski


On 2023-05-08, at 10:30, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> 2. I want to publish a whole set of HTML files from a single Org mode
>> file.  I will need to preserve internal links (so that I can link to
>> another headline and the result will be one post linking to another),
>> and of course I will need external links.  The blog will live on some
>> server I will have ssh access to, so for publishing it should be enough
>> to scp some files somewhere.
>
> AFAIK, ox-hugo is designed for such use.
> Also, see https://orgmode.org/worg/org-blog-wiki.html

Thanks.  You're not the first one to recommend Hugo; I am now looking
into it.

>> 4. I am going, though, to need some custom "blocks" - in HTML parlance,
>> s and possibly also s.  I want to be able to mark them up
>> somehow in my Org source and get  and > class="...">.  Reusing existing markup (like _underline_, which I'm not
>> going to use) is not enough - I will need more than a dozen of those
>> custom classes.
>
> You may consider https://github.com/alhassy/org-special-block-extras
> Inline html fragments will also do.

Thanks, I'll look into those, too.

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: How to filter a clock table by property value?

2023-05-15 Thread Marcin Borkowski


On 2023-05-08, at 17:30, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> #+BEGIN: clocktable :match "property=\"value\""
>> #+END
>
> "+property=\"value\""
>
> I just tried #+BEGIN: clocktable :scope subtree :match "+ID=\"Organization\""
> and it worked.

Thanks!  Still didn't work, it turned out that I didn't set
`org-use-property-inheritance'.  Then it turned out that I don't even
need the plus sign.

Thanks,

-- 
Marcin Borkowski
http://mbork.pl



How to filter a clock table by property value?

2023-05-08 Thread Marcin Borkowski
Hello Orgers,

I'd like to have a clock table filtered down to items with certain
property having certain value.  I tried

#+BEGIN: clocktable :match "property=\"value\""
#+END

and a few other variants wrt. escaping quotes, but none of them worked.

Is that possible?  If so, how?

TIA,

-- 
Marcin Borkowski
http://mbork.pl



An Org-mode-based blogging engine?

2023-05-08 Thread Marcin Borkowski
Hello fellow Orgers,

I'm preparing to set up a new blog, and I'd like to have a fully
Org-mode-based workflow.  Ideally, I'd like to be able to do everything
- including publishing the posts - from within Emacs.

I know about things like "Org publish" and ox-hugo, though I never used
them - and there are probably others - but I'm asking specifically about
two things:

A. other people's experiences with similar workflows, and
B. tool/workflow recommendations.

Here are my requirements, in no particular order.

1. I want the blog to be fully static HTML+CSS, with a tiny sprinkling
of (my custom) JS.

2. I want to publish a whole set of HTML files from a single Org mode
file.  I will need to preserve internal links (so that I can link to
another headline and the result will be one post linking to another),
and of course I will need external links.  The blog will live on some
server I will have ssh access to, so for publishing it should be enough
to scp some files somewhere.

3. I want to be able to fully customize the HTML produced.  I want it to
be as simple as possible (but see below).  I will also need it to be put
in some kind of a template, so that every page will contain things like
a header, footer and a sidebar.

4. I am going, though, to need some custom "blocks" - in HTML parlance,
s and possibly also s.  I want to be able to mark them up
somehow in my Org source and get  and .  Reusing existing markup (like _underline_, which I'm not
going to use) is not enough - I will need more than a dozen of those
custom classes.

Any thought, suggestions, recommendations?

-- 
Marcin Borkowski
http://mbork.pl



Re: What is a week?

2023-04-24 Thread Marcin Borkowski


On 2023-04-24, at 08:26, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>>> Patches welcome!
>>
>> Would gladly do.  Has the copyright papers requirement been lifted?
>
> Of course not, but don't you already have copyright assignment done?
> Our records list you as someone with copyright:
> https://orgmode.org/worg/contributors.html

Complicated.  I did my copyright assignment (for Emacs and AUCTeX, but
I guess this doesn't matter, since Org mode is part of Emacs anyway)
back when I worked in academia as a mathematician.  Now I am
a professional programmer, so I stopped contributing to Emacs -
I suspect I would need to sign a different form.  Also, my employer
probably should do the same.  And I assume that FSF might want to look
at my contract, which is in Polish, so someone would have to pay for the
translation, too.  Quite a lot of hurdles for relatively little gain.
And don't even mention what I think about that requirement in
particular, and in general about copyright law, American law and
American copyright law...

I certainly don't want to sound like a jerk, but I think I do not owe
anything to Emacs.  While Emacs is an important part of my life - and it
does make my life significantly better - I do my best to give back to
the Emacs community.  I wrote 300+ Emacs-related posts on my blog, more
are in the pipeline, I wrote an Elisp textbook (not free, but that is
intentional - I do not consider GPL nor the "free as in freedom"
approach to be necessarily a good idea for a textbook), I encourage
people to use Emacs (sometimes successfully).

To be clear - I completely understand the "patches welcome" attitude to
people complaining that something doesn't work as they expect -
especially if those people are knowledgeable enough to fix the issue
themselves.  I would very probably have done that several weeks ago if
not for the copyright papers requirement.  If you think this is a good
idea, I may spend some time preparing a detailed bug report, but please
don't count on me submitting patches.

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: What is a week?

2023-04-24 Thread Marcin Borkowski


On 2023-04-24, at 17:13, Max Nikulin  wrote:

> On 24/04/2023 02:06, Marcin Borkowski wrote:
>> Fair enough.  Still, I consider this a bug in the docs (they don't
>> say
>> clearly to set :wstart 7)...
>
> I do not think :wstart 7 gives expected result when run on any day
> other than Sunday. Current expression shifts interval start into
> future, see the last column

Ok, so now I am pretty confused...  I thought my experiments showed that
:wstart 7 works every time, now I'm not so sure anymore (especially that
it's very late here...).  I'll look into this tomorrow.

Thanks,

-- 
Marcin Borkowski
http://mbork.pl



Re: What is a week?

2023-04-23 Thread Marcin Borkowski


On 2023-04-23, at 21:18, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> Fair enough.  Still, I consider this a bug in the docs (they don't say
>> clearly to set :wstart 7)...
>
> Patches welcome!

Would gladly do.  Has the copyright papers requirement been lifted?

-- 
Marcin Borkowski
http://mbork.pl



Re: What is a week?

2023-04-23 Thread Marcin Borkowski


On 2023-04-23, at 19:57, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> Now it's Monday.  I create a clock table with :wstart 1 and thisweek -
>> and my clock table starts today.
>>
>> What is the logic behind it?
>
> I saw you are considering this as a bug to be fixed.
> (https://mbork.pl/2023-04-22_Org_mode_clock_table_for_the_last_week)
>
> But please take a look at Max's email. I do not see changing the current
> :wstart 0 behaviour as a no-brainer.

Fair enough.  Still, I consider this a bug in the docs (they don't say
clearly to set :wstart 7)...

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: [ANN] org-jami-bot

2023-04-17 Thread Marcin Borkowski


On 2023-04-17, at 21:22, Hanno Perrey  wrote:

> Dear fellow org-users,
>
> I have just released two new packages that scratch an old itch of mine:
> capturing thoughts, quick notes and URLs while "on the road" with only
> my mobile phone around. Messaging myself feels most natural, so that is
> what I went with: triggering a capture via GNU Jami, the distributed
> private messenger.

Hi,

I've never heard about Jami before -- I'll definitely check it out!  And
your package looks _very_ cool.  Thanks!

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: Can a post-capture hook know which capture template I used?

2023-04-14 Thread Marcin Borkowski


On 2023-04-14, at 22:39, No Wayman  wrote:

> https://www.github.com/progfolio/doct may be helpful here

Ha, interesting!  Though I'm not sure how useful this is (at least for
me) - after all, I write capture templates once per year (or more
seldom), and I just copy-paste from my other templates and change them
or look up the docs.  Still, looks nice!

-- 
Marcin Borkowski
http://mbork.pl



Can a post-capture hook know which capture template I used?

2023-04-11 Thread Marcin Borkowski
Hi all,

I'd like to perform some actions after a successful capture.  I know
about `org-capture-.*-finalize-hook's, and I think
`org-capture-after-finalize-hook' is the one I need, but I need to
decide what action to take depending on the capture template used.  How
can I access it?

TIA,

-- 
Marcin Borkowski
http://mbork.pl



Re: What is a week?

2023-04-11 Thread Marcin Borkowski


On 2023-04-11, at 13:34, Max Nikulin  wrote:

> On 11/04/2023 17:09, Ihor Radchenko wrote:
>> Max Nikulin writes:
>>> So at least some people expect 7, not 0. I would say, both variants
>>> should be acceptable.
>> Would you be interested to make a patch?
>
> Not really. I expect something like
>
>>(let* ((ws (mod (or wstart 1) 7))
>>(diff (+ (* -7 shift) (- dow ws) (if (> dow ws) 0 7
>
> I have realized that current behavior may be considered as
> a feature. Agenda obtained on Sunday allows to review previous working
> week. So :weekstart 0 and :weekstart 7 might behave
> differently. However to make it full-fledged feature, it is necessary

Actually, my question resulted from me noticing that "last week" behaves
weirdly and the decision to write a blog post about how to display
a clock table for the last week.  In that case, you can always say
`lastweek-1', so I'm not sure if the `0' setting is all that useful.

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: What is a week?

2023-04-09 Thread Marcin Borkowski


On 2023-04-10, at 05:35, Marcin Borkowski  wrote:

> Hi fellow Orgers,
>
> I'm trying to wrap my head around the notion of the week, for the
> purpose of using weekly clock tables.
>
> Assume it's Sunday.  I create a clock table with :wstart 0 and
> thisweek - and apparently my clock table starts 7 days ago.
>
> Now it's Monday.  I create a clock table with :wstart 1 and thisweek -
> and my clock table starts today.
>
> What is the logic behind it?

To clarify: I understand that the reason is the `if' from this line from
`org-clock.el':

(setq diff (+ (* -7 shift) (if (= dow 0) (- 7 ws) (- dow ws)))

(introduced ~10 years ago!).  But why is it coded this way?

Best,

-- 
Marcin Borkowski
http://mbork.pl



What is a week?

2023-04-09 Thread Marcin Borkowski
Hi fellow Orgers,

I'm trying to wrap my head around the notion of the week, for the
purpose of using weekly clock tables.

Assume it's Sunday.  I create a clock table with :wstart 0 and
thisweek - and apparently my clock table starts 7 days ago.

Now it's Monday.  I create a clock table with :wstart 1 and thisweek -
and my clock table starts today.

What is the logic behind it?

Help!

-- 
Marcin Borkowski
http://mbork.pl



Re: [Q] How to italicize without introducing a space?

2023-03-29 Thread Marcin Borkowski


On 2023-03-29, at 05:12, Ruijie Yu via General discussions about Org-mode. 
 wrote:

> Hello,
>
> I am working on a piece of CJK text, which requires italicization.
>
> --8<---cut here---start->8---
> 任何一个章节可以通过增加例如 =TODO= 或者 =HOLD= 等关键词来被设置成 /待办/ 。
> --8<---cut here---end--->8---
>
> Note the spaces before and after the pair of `?/'.  Without these
> spaces, the HTML export does not show "待办" as italicized, but instead
> treat them as inline literal `?/' characters, which is expected in
> current Org implementation.
>
> Also note that -- unlike English -- Chinese sentences rarely use spaces
> (if at all), so showing the space simply because the Org grammar needs
> it seems unnatural.
>
> However, I don't immediately see how to resolve the issue natively in
> Org.  If we allow `?/' to italicize regardless of spaces, then things
> like Unix paths would no longer work.
>
> So, I came up with using LaTeX like this:
>
> --8<---cut here---start->8---
> 任何一个章节可以通过增加例如 =TODO= 或者 =HOLD= 等关键词来被设置成\(\textit{待办}\)。
> --8<---cut here---end--->8---
>
> This has two drawbacks:
> 1. (network-related?) Delay.  Apparently HTML uses MathJax to render
> LaTeX, and my browser experiences a 1-second delay due to it needing to
> download JS code from MathJax and doing some processing.
> 2. Transferability.  This only resolves the issue of /italicization/.
> What if I need to underscore or bold a piece of text (likely), or to add
> an inline code block with CJK characters (unlikely)?  I would have to
> search for how to do each in LaTeX and write the workaround accordingly,
> instead of simply using the Org markup syntax for each of them.
>
> Are there any other solutions than what I have currently?

My go-to solution (and not only mine, I guess) is to use a zero-width
space.  I even have a command to do this:

(defun insert-zero-width-space ()
  "Insert Unicode character \"zero-width space\"."
  (interactive)
  (insert 8203))

Hth,

-- 
Marcin Borkowski
http://mbork.pl



Re: How to build an agenda view showing all entries whose headlines match a given regex?

2023-03-11 Thread Marcin Borkowski


On 2023-02-23, at 18:14, Marcin Borkowski  wrote:

> Hi all,
>
> the topic says it all.  Is it possible?  If so, how?

So, I'm answering myself in case someone else also needs this.  Yes, it
is possible, and is now described here:
https://mbork.pl/2023-03-11_Adding_my_TODOs_to_agenda

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: Org-mode notes about school lessons

2023-02-25 Thread Marcin Borkowski


On 2023-02-24, at 18:05, Tory S. Anderson  wrote:

>> As I need to write a lot for each lesson, and each lesson are mostly
>> independent from each other, I plan to have 1 file per lesson.
> This is a very stylistic, but I am a "all in one file" user, though
> I have a seperate directory and .org file per class, but no more split
> than that. I have always had =C-c s= bound in org files to something
> like =consult-org-heading= (or the helm equivalent, or selectrum
> equivalent, or even the vanilla emacs equivalent that I can't remember
> right now). To me, being able to easily go to headings/classes in one
> file fits my usage. I could see arguments for the other, though, since
> emacs is good at browsing/searching multiple files, too. And I suppose
> git version control might be more useful on the multiple-file setup.

This.  To each his own, but I also can't see much benefit of having many
small files instead of a few larger ones.  For example, linking to other
sections might be easier this way.  But, as Tory said, this is also
about personal preference, so I'm not claiming here that my way is
objectively better.

Best,

-- 
Marcin Borkowski
http://mbork.pl



How to build an agenda view showing all entries whose headlines match a given regex?

2023-02-23 Thread Marcin Borkowski
Hi all,

the topic says it all.  Is it possible?  If so, how?

TIA,

-- 
Marcin Borkowski
http://mbork.pl



Re: New Org (from main) and slow clocking

2023-02-17 Thread Marcin Borkowski


On 2023-02-17, at 19:14, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>>> Another thing you can try is setting org-element--cache-self-verify to
>>> nil.
>>
>> That did help indeed.  Should I make it nil in my init.el?
>
> You can, as long as you do not see warnings from Org about
> org-element-cache. This variable is enabling extra consistency checks in
> org-element-cache.
>
> The plan is setting this to nil in one of the next releases.
>
> Alternatively, you can reduce the value of
> org-element--cache-self-verify-frequency. By default, 5% of all the
> cache queries are double-checked, which is expensive in your use case.

Thanks!  I added (setq org-element--cache-self-verify nil) to my
init.el.

-- 
Marcin Borkowski
http://mbork.pl



Re: New Org (from main) and slow clocking

2023-02-17 Thread Marcin Borkowski


On 2023-02-17, at 14:32, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>>> Do you have org-element-use-cache set to nil?
>>
>> No, should I?
>
> You should not. But, when it is nil (not default), things will be slow
> in your scenario.
>
> Another thing you can try is setting org-element--cache-self-verify to
> nil.

That did help indeed.  Should I make it nil in my init.el?

Thanks,

-- 
Marcin Borkowski
http://mbork.pl



Re: New Org (from main) and slow clocking

2023-02-17 Thread Marcin Borkowski


On 2023-02-17, at 13:02, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> I have just updated my Org (from the main branch, Org mode version
>> 9.6.1, release_9.6.1-253-g74eb0f), and I noticed an issue with clocking.
>> I have an "ongoing" task which already accumulated 7000+ clock entries,
>> and clocking in takes close to 90 seconds.  It was instantaneous before
>> (version 9.6-pre, release_9.5.5-853-g7b9d8e).  What can I do now?
>
> Do you have org-element-use-cache set to nil?

No, should I?

-- 
Marcin Borkowski
http://mbork.pl



Re: New Org (from main) and slow clocking

2023-02-16 Thread Marcin Borkowski


On 2023-02-17, at 07:51, Marcin Borkowski  wrote:

> Hi all,
>
> I have just updated my Org (from the main branch, Org mode version
> 9.6.1, release_9.6.1-253-g74eb0f), and I noticed an issue with clocking.
> I have an "ongoing" task which already accumulated 7000+ clock entries,
> and clocking in takes close to 90 seconds.  It was instantaneous before
> (version 9.6-pre, release_9.5.5-853-g7b9d8e).  What can I do now?
>
> And how can I downgrade?  (I tried the "logical" thing, i.e., I checked
> out a "tmp" branch at tag release_9.6.1 and ran "make update", but it
> didn't work because it (obviously) couldn't pull the "tmp" branch.

Ok, so I think I managed to downgrade (make cleanall, make, sudo make
install - is that correct?), but the problem persists in 9.6.1...

> Alternatively, since Org mode is much more mature now than a few years
> ago, how can I get rid of my Git-based installation in favor of the Elpa
> package (which, I assume, should be much more stable/bug-free)?  (I
> understand that by using bleeding edge Org mode I risk a bit, and maybe
> it's time to trade new/shiny for safe...)

Best,

-- 
Marcin Borkowski
http://mbork.pl



New Org (from main) and slow clocking

2023-02-16 Thread Marcin Borkowski
Hi all,

I have just updated my Org (from the main branch, Org mode version
9.6.1, release_9.6.1-253-g74eb0f), and I noticed an issue with clocking.
I have an "ongoing" task which already accumulated 7000+ clock entries,
and clocking in takes close to 90 seconds.  It was instantaneous before
(version 9.6-pre, release_9.5.5-853-g7b9d8e).  What can I do now?

And how can I downgrade?  (I tried the "logical" thing, i.e., I checked
out a "tmp" branch at tag release_9.6.1 and ran "make update", but it
didn't work because it (obviously) couldn't pull the "tmp" branch.

Alternatively, since Org mode is much more mature now than a few years
ago, how can I get rid of my Git-based installation in favor of the Elpa
package (which, I assume, should be much more stable/bug-free)?  (I
understand that by using bleeding edge Org mode I risk a bit, and maybe
it's time to trade new/shiny for safe...)

TIA,

-- 
Marcin Borkowski
http://mbork.pl



Re: Compact schedule in agenda day view

2023-02-15 Thread Marcin Borkowski


On 2023-02-15, at 11:31, Angel de Vicente  
wrote:

> Hello,
>
> Angel de Vicente  writes:
>
>> Anybody knows off the top of your head how to toggle this?
>
> Sorry for the noise. "G" is the magic letter I was looking for.

And you could have found it out yourself with `C-h l' (`view-lossage').
`C-h m' (`describe-mode') and `C-h k' (`describe-key') are also useful
in such a context.  Also, if you have a spare 20-30 minutes, try `C-h
C-h' (`help-for-help') to see other helpful commands.  And speaking of
/helpful/, you might be interested in the `helpful' package by Wilfred
Hughes (see https://github.com/Wilfred/helpful).

Hth,

-- 
Marcin Borkowski
http://mbork.pl



Re: [POLL] Proposed syntax for timestamps with time zone info

2023-02-06 Thread Marcin Borkowski
Out of curiosity: in what time zone you were when you sent this???


On 2023-10-29, at 02:04, Jean Louis  wrote:

> * to...@tuxteam.de  [2023-02-01 12:22]:
>> ...which stems from the fact that the very concept of "time zone"
>> is somewhat ambiguous, too. 
>
> For human who reads it without calculating anything, yes.
>
> For computer which is supposed to be programmed by using the time zone
> database, no.
>
>> Some time zone designations carry the fact of whether they are
>> supposed to be summer times or not with them (as with CET/CEST),
>> some not (as above). The time zone database is only known for a
>> limited time into future and may change with political
>> vagaries. Yadda, yadda.
>
> Very right. 
>
> At least the history is more certain than the future in regards to
> time calculations with computer.


-- 
Marcin Borkowski
http://mbork.pl



Re: Feature request: "task table" (similar to clock table)

2023-01-25 Thread Marcin Borkowski


On 2023-01-25, at 03:37, Max Nikulin  wrote:

> On 25/01/2023 03:09, Marcin Borkowski wrote:
>>>> https://mbork.pl/2023-01-09_TODO_stats_table
>
> Sorry for a too late response. The feature is documented in the
> manual, see info "(org) Dynamic Blocks"
> https://orgmode.org/manual/Dynamic-Blocks.html

Ah, thanks!  I missed this.  (A long time ago I read almost all of the
Org manual, but I could have forgotten or omitted this.)

> Perhaps a close feature that might allow to return list that is
> converted to table by org-babel is "#+call:", see info "(org)
> Evaluating Code Blocks"
> https://orgmode.org/manual/Evaluating-Code-Blocks.html

Indeed.

Thanks,

-- 
Marcin Borkowski
http://mbork.pl



Re: Feature request: "task table" (similar to clock table)

2023-01-24 Thread Marcin Borkowski


On 2023-01-24, at 10:59, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> https://mbork.pl/2023-01-09_TODO_stats_table
>
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=7ad77965467602ced2cb8f3cded023882dc229a2

Thanks!

-- 
Marcin Borkowski
http://mbork.pl



Re: Feature request: "task table" (similar to clock table)

2023-01-23 Thread Marcin Borkowski


On 2023-01-03, at 19:29, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> I see.  I think I'll go another route then - in fact, I already started,
>> see https://mbork.pl/2023-01-02_Computing_Org_mode_TODO_stats :-)
>
> That will also work.
>
> But why `plist-get' + `org-element-at-point-no-context'?
>
> You can instead use `org-element-property' + `org-element-at-point'.
> `org-element-property' will be resilient against internal AST
> representation changes and `org-element-at-point' will make use of
> caching.

FYI: here is my finished code:

https://mbork.pl/2023-01-09_TODO_stats_table
https://mbork.pl/2023-01-23_TODO_stats_table_with_parameters

Thanks,

-- 
Marcin Borkowski
http://mbork.pl



One of my Org files hangs Emacs

2023-01-18 Thread Marcin Borkowski
Hi fellow Orgers,

so I have a bunch of Org files, most of them pretty big (over 1
megabyte), and one of them repeatedly causes my Emacsa to hang.
Sometimes a plain `C-g' helps, sometimes I need to kill the Emacs
process.  How do I even begin to find out what happens?  Any hints?

TIA,

-- 
Marcin Borkowski
http://mbork.pl



Re: Feature request: "task table" (similar to clock table)

2023-01-03 Thread Marcin Borkowski


On 2023-01-03, at 19:29, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> I see.  I think I'll go another route then - in fact, I already started,
>> see https://mbork.pl/2023-01-02_Computing_Org_mode_TODO_stats :-)
>
> That will also work.
>
> But why `plist-get' + `org-element-at-point-no-context'?
>
> You can instead use `org-element-property' + `org-element-at-point'.
> `org-element-property' will be resilient against internal AST
> representation changes and `org-element-at-point' will make use of
> caching.

Yes, thanks - I saw your comment.  I will amend the post today.

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: Feature request: "task table" (similar to clock table)

2023-01-03 Thread Marcin Borkowski


On 2022-12-27, at 08:48, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>>> If you have interest, going through org-colview.el code would be
>>> helpful. It is a bit messy and deserves more cleaning and commenting.
>>
>> Since org-colview is pretty long, I decided to look into the manual
>> instead.  But I couldn't make the column view to do what I wanted, i.e.,
>> count the TODO, DONE etc. items in various subtrees.  (What I want is
>> more or less "select status, count(*) group by status" for every level-1
>> tree.)  And I don't see the equivalent of "count()" among the possible
>> "summary types": https://orgmode.org/manual/Column-attributes.html.
>
> You will likely need to implement a new summary type and add it to
> org-columns-summary-types

I see.  I think I'll go another route then - in fact, I already started,
see https://mbork.pl/2023-01-02_Computing_Org_mode_TODO_stats :-)

Thanks,

-- 
Marcin Borkowski
http://mbork.pl



Re: LaTeX tutorial (focused on what Org exports) ??

2022-12-31 Thread Marcin Borkowski


On 2022-12-31, at 02:18, Thomas S. Dye  wrote:

> David Masterson  writes:
>
>> Anyone have a recommendation for a LaTeX tutorial that would
>> (especially) help me understand the LaTeX exported by Org and how to
>> enhance what is exported (new document classes, etc.).  I don't want
>> to
>> bore you all with a lot of questions, so I'm looking for a good
>> book.
>
> Org's latex exporter is exceptionally capable.  AFAICT, it doesn't
> have practical limits on the LaTeX it produces, at least for my
> academic use case.  I'm able to use all of the LaTeX packages I've
> ever wanted to use.
>
> With the world of LaTeX at your feet, I recommend The LaTeX Companion
> by Mittelbach and Goosens.  My well-worn copy is almost 20 years old,
> and I use it as often now as when I did all of my writing in LaTeX.
> Of course, there are many new LaTeX packages in the last 20 years, but
> LaTeX was very capable at the turn of the millennium and the few new
> packages I use were easy to discover by browsing.

The "Not so short introduction to LaTeX" is also a pretty nice resource.

Also, I'm the coauthor of a (free as in beer, a bit less free as in
speech - CC-BY-NC) textbook on LaTeX, but it will probably be of no use
for you, since it's in Polish;-).

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: [OT] org and diff

2022-12-27 Thread Marcin Borkowski


On 2022-12-28, at 03:30, Samuel Wales  wrote:

> hi marcin,
>
> thanks for your blog post on my crash-proof editing idea.

You're welcome! :-)  In fact, it was an interesting exercise.

>
> more below
>
> On 12/17/22, Marcin Borkowski  wrote:
>>
>> On 2022-12-17, at 03:06, Samuel Wales  wrote:
>>
>>> marcin> One question I'd ask is: how important a legible diff is to
>>> you?  I keep my Org files in Git, too, but if /I/ know what was
>>> changed, I just don't care about diff going nuts and I treat it as
>>> (more or less) Git's internal implementation detail.
>>>
>>> for org, i mostly use git for reviewing changes.  it is only one step
>>> more sophisticated than saving old and diffing.
>>>
>>> i have lots of tools for improving diff, but this intermingling
>
> [n.b. i have an still unpubolished package for 30 years that
> postprocesses diff and is extremely powerful, and it can if you are
> reviewing an ientire repo changes, to some degree nullify the
> intermingling issue, but its integration with magit, and magit's bugs
> with intra-hunk staging [2 bugs ime], make the intermingling an issue.
> with no bugs, less of an issue, mnerely because it is desirable to use
> magit instead of merely reviewing it and intra-hunk staging [and
> killing] is part of that.  but i use old magit, with --- +++, istead
> of new magit, which does not supply headers.  idk if new magit fixes
> the bugs.
>
> so really i was askig about the intermingling issue and whetehr it
> could be mitigated at the magit/git level.]
>
>> Well, "months of changes" seems tough.  I sometimes (rarely) have to
>> enter 2 days' worth of changes...  It requires discipline, but
>> discipline pays off in /so many areas of life/...
>
> not sure what you men to say in this case about discipline.  my
> circumstances if i told you about you'd be surprised.  my physical
> survival is very much at issue and i have no  support for dalin with
> it.
>
> i.e. not sure if this was aimed at me or a general comment, and the
> emphasis i wasn't sure what it was referring to.

General comment.  I meant that committing my changes (almost) every day
requires serious discipline, and I worked pretty hard to acquire it.
Also, I do not claim that everyone can learn it like me - people are
/very/ different...

OTOH, you might consider "outsourcing the discipline".  One way would be
to set up some kind of reminder to review/commit the changes every day.
(That's more or less what I did, though I used a heavy-weight type of
reminder: https://www.beeminder.com/ .)  Another could be to use some
tool to do the committing for you (see
e.g. https://stackoverflow.com/q/420143/1181665), though then you lose
the "review" part.  (Still, with tools like `git log --grep' and/or `git
blame' you might find that this is good enough.)

Hth,

-- 
Marcin Borkowski
http://mbork.pl



Re: Feature request: "task table" (similar to clock table)

2022-12-26 Thread Marcin Borkowski


On 2022-12-26, at 09:26, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>>> https://orgmode.org/manual/Capturing-column-view.html
>>> https://orgmode.org/manual/Column-attributes.html
>>
>> Good point, I forgot about those.  But: is it possible for the column
>> view to just include the summary (like "100 headlines, including 10
>> TODOs and 30 DONEs"), without the headlines themselves?
>
> AFAIK, no. But it just boils down to keeping the top-level item with
> summary columns.
>
> If you have interest, going through org-colview.el code would be
> helpful. It is a bit messy and deserves more cleaning and commenting.

Since org-colview is pretty long, I decided to look into the manual
instead.  But I couldn't make the column view to do what I wanted, i.e.,
count the TODO, DONE etc. items in various subtrees.  (What I want is
more or less "select status, count(*) group by status" for every level-1
tree.)  And I don't see the equivalent of "count()" among the possible
"summary types": https://orgmode.org/manual/Column-attributes.html.

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: Feature request: "task table" (similar to clock table)

2022-12-26 Thread Marcin Borkowski


On 2022-12-26, at 09:05, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> I've been using clock tables for some time now, and they are very
>> useful.  However, it has just occurred to me that I'd really appreciate
>> another feature - a "task table".  By this, I mean a table (generated
>> much like a clock table) with a summary of all tasks in a given
>> file/subtree/etc.: how many of them there are, how many are in any
>> state, maybe how many have scheduled times and/or deadlines, how many
>> are past their deadline...
>
> https://orgmode.org/manual/Capturing-column-view.html
> https://orgmode.org/manual/Column-attributes.html

Good point, I forgot about those.  But: is it possible for the column
view to just include the summary (like "100 headlines, including 10
TODOs and 30 DONEs"), without the headlines themselves?

Best,

-- 
Marcin Borkowski
http://mbork.pl



Feature request: "task table" (similar to clock table)

2022-12-25 Thread Marcin Borkowski
Hi fellow Orgers,

I've been using clock tables for some time now, and they are very
useful.  However, it has just occurred to me that I'd really appreciate
another feature - a "task table".  By this, I mean a table (generated
much like a clock table) with a summary of all tasks in a given
file/subtree/etc.: how many of them there are, how many are in any
state, maybe how many have scheduled times and/or deadlines, how many
are past their deadline...

Now, question 1: is there any feature in Org mode to make C-c C-c do
something when the point is on a line e.g. matching certain regex?  This
way I could extend Org mode to do that myself.

I peeked around and found out `org-ctrl-c-ctrl-c-hook', so that's that.
Pretty nice!  Although some functions allowing stuff like "substitute
the results for the block that follows" etc. might be also nice.

Question 2: am I the only one who would like to see such a feature?
Would someone like to code it?  (I /might/ be tempted to do that, but
it's kinf difficult: while I signed FSF papers some time ago, I've
changed jibs since then and I suppose I'd need to got through some more
paperwork to fix that; also, I'm not sure whether I really want to, and
whether my employer would be willing to let me.)

TIA,

-- 
Marcin Borkowski
http://mbork.pl



Re: missing from the manual

2022-12-25 Thread Marcin Borkowski


On 2022-12-24, at 03:43, Peter Mao  wrote:

> Dear maintainers,
>
> The following commands are missing from the manual!
>
> org-forward-element
> org-backward-element
>
> These two should be mentioned in the manual in section 2.3 "Motion"

How are they different from `org-forward-heading-same-level` and
`org-backward-heading-same-level'?  (Not irony etc., I'm genuinely
curious.)

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: [OT] org and diff

2022-12-17 Thread Marcin Borkowski


On 2022-12-17, at 03:06, Samuel Wales  wrote:

> marcin> One question I'd ask is: how important a legible diff is to
> you?  I keep my Org files in Git, too, but if /I/ know what was
> changed, I just don't care about diff going nuts and I treat it as
> (more or less) Git's internal implementation detail.
>
> for org, i mostly use git for reviewing changes.  it is only one step
> more sophisticated than saving old and diffing.
>
> i have lots of tools for improving diff, but this intermingling
> problem is a showstopper in some cases, like right now where i have
> spent months trying to make sense of months of changes to org files
> that have not been entered into git.  i.e. i did not enter every few

Well, "months of changes" seems tough.  I sometimes (rarely) have to
enter 2 days' worth of changes...  It requires discipline, but
discipline pays off in /so many areas of life/...

> days as normal.  i find reviewing changes to be valuable.  every once
> in a while i discover data corruption or something that i forgot etc.

Yes, same here.

> i wonder if diff, or difftastic, could be taught or postprocessed to
> do merely one thing: try to preserve stuff between "^\\*+ ".  that is
> probably too optimistic, but imagine a --preserve-between option.

I afraid so.  Difftastic does not support Org mode format.  However, the
tree-sitter page claims that Org parser is under way, so there's hope
(AFAIK difftastic uses tree-sitter under the hood).

Best,
mbork

-- 
Marcin Borkowski
http://mbork.pl



Re: Org and Multimedia..?

2022-11-30 Thread Marcin Borkowski


On 2022-11-30, at 20:35, David Masterson  wrote:

> Is it possible to attach (say) an image to a task?
>
> I'd like to use images to help explain tasks better (or just remind me
> what my intention was).  I imagine you could do something with file
> links, but is there a defined method?  Issues:
>
> 1. Directory structure containing Org / Media files
> 2. Syncing images with Org files to other systems
> 3. In particular, syncing to smart phones (BeOrg, Orgzly, ...) 
> 4. Any add-on packages that would help

More like a PoC and/or potential source of inspiration than something
genuinely useful, but let me plug this:
https://mbork.pl/2018-08-18_Embedding_files_in_Org-mode_revisited

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: [OT] org and diff

2022-11-13 Thread Marcin Borkowski


On 2022-11-13, at 06:15, Samuel Wales  wrote:

> But something drives me crazy.  Probably not too Org-related, but it
> might be.  I just want to know why, is all.
> [...] diff goes insane.

I think this is a known problem with diff, which is inherently
line-based and knows nothing about actual syntax of the underlying
language.

FWIW, if things like this happen to me (and they do happen a lot,
especially when I'm doing code review), I abandon diff and use
difftastic (https://difftastic.wilfred.me.uk/) instead.

Surprisingly, difftastic seems not to support Org syntax.

One question I'd ask is: how important a legible diff is to you?  I keep
my Org files in Git, too, but if /I/ know what was changed, I just don't
care about diff going nuts and I treat it as (more or less) Git's
internal implementation detail.

Just my 2cents (not too helpful, I'm afraid...)

-- 
Marcin Borkowski
http://mbork.pl



Re: Docstrings and literate programming (good practices?)

2022-11-04 Thread Marcin Borkowski


On 2022-11-04, at 06:45, to...@tuxteam.de wrote:

> On Thu, Nov 03, 2022 at 08:03:05PM -0700, Samuel Wales wrote:
>> i wonder if emacs or org has what you might call semi-literate or
>> etaretil docstring functions?
>> 
>> for example, you have a body of non-literate elisp code, and you have
>> a manual.  it could be redundant to describe commands and what they do
>> and their options, if the docstrings are good.
>> 
>> why not include the docstrings of all commands in some nice format in
>> the .org manual via some mechanism?
>
> Ah. Javadoc and their descendants. I tend to call that "illiterate
> programming"...

I spat my tea. :-)  Thanks, that's a nice one!

Though this _may_ work in some cases.  For example, imagine you divide
your package into two files – one with user-facing commands and another
one with internal functions.  If you order the former one carefully, the
"extract docstrings" might actually work as a documentation.

Still, a "normal" documentation seems a better (even if more
time-consuming) options.

Also, such docstring-based documentation is still better than none.

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: Org mode, Org Mode, Org-mode or Org-Mode?

2022-10-29 Thread Marcin Borkowski


On 2022-10-28, at 23:50, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> What is the "official" version?  I found at least two spelling on
>> orgmode.org...
>
> If we look into doc/Documentation_Standards.org:
>
> - Prefer "Org mode" to "Org-mode" or "org-mode".  This is simply
>   because it reflects an existing convention in [[info:emacs:Top][The 
> Emacs Manual]] which
>   consistently documents mode names in this form - "Text mode",
>   "Outline mode", "Mail mode", etc.
>
> It is _the_ convention.

Thanks!

> Another question is whether we actually follow it everywhere...

Yep...

-- 
Marcin Borkowski
http://mbork.pl



Org mode, Org Mode, Org-mode or Org-Mode?

2022-10-28 Thread Marcin Borkowski
What is the "official" version?  I found at least two spelling on
orgmode.org...

TIA,

-- 
Marcin Borkowski
http://mbork.pl



Re: Interest in an Org video meetup?

2022-10-06 Thread Marcin Borkowski


On 2022-10-06, at 19:24, Russell Adams  wrote:

> On Thu, Oct 06, 2022 at 05:28:12PM +0200, Marcin Borkowski wrote:
>> Me too, though it depends on the schedule.  What time of day do you plan
>> for that?
>
> From my original post:
>
>>> I'm offering to schedule and moderate the first few events. I'd
>>> propose a Saturday meeting in the afternoon European time to cover EU
>>> and NA.

Thanks.  Stupid me.

-- 
Marcin Borkowski
http://mbork.pl



Re: Interest in an Org video meetup?

2022-10-06 Thread Marcin Borkowski


On 2022-10-06, at 16:40, Leslie Watter  wrote:

> Would be great to see what others are doing in their workflows using org ;-)
>
> I'd like to join to!

Great idea!

Me too, though it depends on the schedule.  What time of day do you plan
for that?

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: Suggested Syntax for cancelled checkboxes: [-] as non-blocking dependency

2022-09-13 Thread Marcin Borkowski


On 2022-09-13, at 10:07, Karl Voit  wrote:

> Is it only me who is thinking that a non-blocking cancelled checkbox
> state would be a good idea?

No.

-- 
Marcin Borkowski
http://mbork.pl



Re: [tip/offtopic] A function to describe the characters of a word at point

2022-07-14 Thread Marcin Borkowski


On 2022-07-13, at 12:49, Juan Manuel Macías  wrote:

> Sorry for the slight offtopic.

Not off-topic at all, as far as I'm concerned!  (Though sending this to
help-gnu-emacs might be an even better idea.)  I use `C-u C-x =' pretty
often, so I fully understand why someone might want to code something
like this.  Very nice, thanks for sharing!

You might want to extend it and create a minor mode which would display
data about the current character in the echo area, Eldoc-style, or in
a tooltip when you hover the mouse pointer over a character.  Depending
on what exactly you need, these ideas might be more or less useful, of
course.

Also, since the answer to quite a few org-related issues seems to be
"just insert a zero-width space", making those stand out (like
non-breaking spaces already are) could also be useful.  FWIW, I have
this function in my init.el:

(defun insert-zero-width-space ()
  "Insert Unicode character \"zero-width space\"."
  (interactive)
  (insert "​"))

(of course, the 0-width space is invisible between the quotes).

Best,
mbork



> Since Unicode and character issues come up here from time to time, I'm
> sharing this 'homemade' function that I wrote a long time ago for my
> work, in case someone finds it useful. It Shows a brief descriptive list
> of all characters in a word at point. Each character includes the
> Unicode name, code, and canonical decomposition. Example:
>
> ἄρχοντα >>
>
> ἄ (#1f04) ... GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA ... descomp: #1f00 
> #301
> ρ (#3c1) ... GREEK SMALL LETTER RHO ... descomp: #3c1
> χ (#3c7) ... GREEK SMALL LETTER CHI ... descomp: #3c7
> ο (#3bf) ... GREEK SMALL LETTER OMICRON ... descomp: #3bf
> ν (#3bd) ... GREEK SMALL LETTER NU ... descomp: #3bd
> τ (#3c4) ... GREEK SMALL LETTER TAU ... descomp: #3c4
> α (#3b1) ... GREEK SMALL LETTER ALPHA ... descomp: #3b1
>
>
> #+begin_src emacs-lisp
>   (defun describe-chars-word-at-point ()
> (interactive)
> (setq chars-in-word nil)
> (if
> (not (current-word t t))
> (error "Not in a word at point...")
>   (let
>   ((word (current-word t t)))
> (save-excursion
>   (with-temp-buffer
> (insert word)
> (goto-char (point-min))
> (while (re-search-forward "\\(.\\)" nil t)
>   (let* ((char-name (save-excursion
>   (backward-char)
>   (get-char-code-property (char-after 
> (point)) 'name)))
>  (char-desc (save-excursion
>   (backward-char)
>   (get-char-code-property (char-after 
> (point)) 'decomposition)))
>  (char-format (concat (match-string 1) "\s" "("
>   (format "#%x" (string-to-char 
> (match-string 1)))
>   ")\s...\s" char-name 
> "\s...\sdecomp:\s"
>   (mapconcat (lambda (cod)
>(format "#%x" cod))
>  char-desc " "
> (push char-format chars-in-word)))
> (when (get-buffer "*chars in word*")
>   (kill-buffer "*chars in word*"))
> (get-buffer-create "*chars in word*")
> (set-buffer "*chars in word*")
> (insert (mapconcat 'identity
>(reverse chars-in-word) "\n"))
> (view-mode)
> (temp-buffer-window-show "*chars in word*"
>  '((display-buffer-below-selected 
> display-buffer-at-bottom)
>(inhibit-same-window . t)
>(window-height . 
> fit-window-to-buffer
>   (pop-to-buffer "*chars in word*")
> #+end_src


-- 
Marcin Borkowski
http://mbork.pl



Re: how to convert a non-org list to org headings

2022-07-06 Thread Marcin Borkowski


On 2022-07-06, at 17:31, Kaushal Modi  wrote:

> On Wed, Jul 6, 2022 at 11:17 AM Uwe Brauer  wrote:
>
>> Hi
>>
>> I have a file that contains a list as:
>>
>>
>> 1.1 Funciones de una variable

No period after "1.1" above - makes things slightly more difficult.

> The method that I show below is quick but not robust. You'll need to review
> all the replacements.
>
> - Do query-replace-regexp [default binding: C-M-%]
> - Search for [0-9]+\.
> - Replace with *

This might be a bit overzealous if there are more numbers with a period
after them.  Another way would be to add ^\(\**\) at the beginning of
the regex (and a \1 in the replacement) and go through the file as many
times as there are nesting levels.

You could also try Elisp as the replacement - see
https://www.gnu.org/software/emacs/manual/html_node/emacs/Regexp-Replace.html,
https://www.masteringemacs.org/article/evaluating-lisp-forms-regular-expressions
and
http://mbork.pl/2013-09-18_Selective_replacement_in_LaTeX_documents_(en) .

You could probably use keyboard macros, too - see e.g.
http://mbork.pl/2021-02-20_Using_keyboard_macros_to_emulate_query_replace .

Hth,

-- 
Marcin Borkowski
http://mbork.pl



[BUG] Error when editing properties in column view [9.5.3 (release_9.5.3-452-g407104 @ /home/mbork/others-works/emacs/org-mode/lisp/)]

2022-05-09 Thread Marcin Borkowski



Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


When I try to edit a property in column view, I get the following error message:

Invalid column specification format: nil

This only seems to happen if the point is not too close to the left
margin.  I did a bit of digging and found out that the culprit is most
probably the `org-columns-update' function, which contains this:

(let* ((spec (nth (current-column) org-columns-current-fmt-compiled))
...) ...)

Since `org-columns-current-fmt-compiled' seems to contain one entry per
_table_ column and `current-column' returns the "horizontal position of
point" (i.e., the index of the _character_ column the point is in),
`spec' gets assigned nil unless the point happens to be no more
characters from the left margin than there are columns in the column
view, and even then it gets assigned the wrong thing.

I might be mistaken, though - I only skimmed through this code.

Here is an example file where this happens:

--8<---cut here---start->8---

* Test
** Entry A
:PROPERTIES:
:a:1
:b:2
:END:
** Entry B
:PROPERTIES:
:a:3
:b:4
:END:
* Config
#+COLUMNS: %4a %4b
--8<---cut here---end--->8---

Go to `* Test', press `C-c C-x C-c', then go to `2' and press `e 2 '.

I also saw this on emacs -Q, with the built-in Org-mode:
Org mode version 9.5.2 (release_9.5.2-22-g33543d @ 
/usr/local/share/emacs/29.0.50/lisp/org/)



Emacs  : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, 
cairo version 1.17.4)
 of 2022-03-06
Package: Org mode version 9.5.3 (release_9.5.3-452-g407104 @ 
/home/mbork/others-works/emacs/org-mode/lisp/)

-- 
Marcin Borkowski
http://mbork.pl



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

2022-05-08 Thread Marcin Borkowski


On 2022-05-07, at 10:16, Max Nikulin  wrote:

> On 02/05/2022 23:52, 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))
>>>>
>>>> didn't work (the ToC was still there).  What am I missing?
>>>
>>> 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))
>> Thanks!
>> http://mbork.pl/2021-05-02_Org-mode_to_Markdown_via_the_clipboard
>
> The following links posted earlier to this mail list might be
> interesting for you since they are related to "exporting" of org text
> to other applications:
>
> https://github.com/tecosaur/emacs-everywhere
> System-wide popup Emacs windows for quick edits
>
> https://github.com/jkitchin/ox-clip/
> Copy formatted content from org-mode
>
> The latter copies HTML, not markdown though.

Thanks, both look really interesting!

-- 
Marcin Borkowski
http://mbork.pl



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

2022-05-02 Thread Marcin Borkowski


On 2022-05-01, at 22:01, Berry, Charles  wrote:

>> On May 1, 2022, at 2:20 AM, Marcin Borkowski  wrote:
>> 
>> Hi fellow Orgers,
>> 
>> 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))
>> 
>> didn't work (the ToC was still there).  What am I missing?
>
>
> 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.

Thanks!

http://mbork.pl/2021-05-02_Org-mode_to_Markdown_via_the_clipboard

Best,

-- 
Marcin Borkowski
http://mbork.pl



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

2022-05-01 Thread Marcin Borkowski
Hi fellow Orgers,

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))

didn't work (the ToC was still there).  What am I missing?

TIA,

-- 
Marcin Borkowski
http://mbork.pl



Re: Read only org view mode

2022-01-23 Thread Marcin Borkowski


On 2022-01-23, at 08:19, Arthur Miller  wrote:

> Hi mailing list,
>
> is something like this of interest to add to org-mode?

Yes! Yes! Yes!

I can see all sorts of stuff going from here.  Three examples follow.

1. I have a daily journal in Org-mode, and I wrote a simple function
showing me "what happened on this day in all previous years of
journaling".  Making that read-only, with view-mode-like bindings is an
obvious thing to do.  (In fact, I plan to blog about that function
soon.)

2. I imagine this could be used to create menus, a bit like Magit, with
toggleable sections etc.

3. I once coded myself a kind of "dashboard", showing various things in
(almost) real time - think current time, weather, departures of busses
from a nearby bus stop, Emacs uptime, number of open buffers, a todo
list for today etc.  (Sadly, I didn't finish it, though.)  A mode
derived from your mode could be great for that.

Thanks a lot for working on this,

-- 
Marcin Borkowski
http://mbork.pl



Re: Question Regarding Creating Workflow For Automatic Formulas For Finance Based Org Spreadsheet

2022-01-10 Thread Marcin Borkowski
uble accounting.  It's neither
very hard nor boring!

Best,
mb



>
> I will take a look at the other suggestions with specific Org Mode formulas, 
> looked awesome, thanks.
>
> On Mon, Jan 10, 2022, at 10:31 AM, Greg Minshall wrote:
>> > I'm wondering if your opinion about Ledger isn't influenced by the fact
>> > that it uses basic accounting principles, like the idea of double-entry
>> > accounting.  For me, it's /very/ simple and intuitive, but I graduated
>> > in economics many years ago and had a (basic, but still) course on
>> > accounting.  If that is your problem, I'd suggest spending some time on
>> > understanding that - even if you don't end up using Ledger but some
>> > other software, you might find learning about accounting useful.  (Also,
>> > it's fascinating.  No, really!  It's an extremely clever abstract
>> > system with a real-life use-case.)
>> 
>> i agree that learning the principles of double-entry is worthwhile,
>> actually interesting, and of a very interesting history!
>> 


-- 
Marcin Borkowski
http://mbork.pl



Re: Question Regarding Creating Workflow For Automatic Formulas For Finance Based Org Spreadsheet

2022-01-09 Thread Marcin Borkowski


On 2022-01-10, at 04:42, Samuel Banya  wrote:

> Ah, Ledger is way too complicated for what it's worth. I've seen videos on 
> YouTube about it, and every person who's praised it is pretty much too smart 
> enough to be able to explain it in simple terms.

Interesting - I've been using Ledger for many years now, and while
I agree that it has its dark corners, it's much like Org in that respect
- you are not forced to use them at all.  And the "core" is IMHO /very/
simple - you just record your "transactions" (e.g., using the very nice
Emacs ledger-mode) and look at a report.

I basically use just one kind of report - the balance report, both to
reconcile my ledger file with my cash and bank and to see the
current/previous month's income and expenses.

Before I started using Ledger, I used GNUcash (on and off for a few
years, too) - I can't say a bad word about it, but it's not Emacs-based,
so you know.  Also, it's not exactly text-based (AFAIR, it uses XML, so
it "kind of" is, but...) - a big advantage of Ledger is that I can keep
my books in Git.  (Of course, using Org would have the same advantage.)

Also, if you don't insist on Ledger, https://plaintextaccounting.org/
has a comparison of other text-based accounting tools.

I'm wondering if your opinion about Ledger isn't influenced by the fact
that it uses basic accounting principles, like the idea of double-entry
accounting.  For me, it's /very/ simple and intuitive, but I graduated
in economics many years ago and had a (basic, but still) course on
accounting.  If that is your problem, I'd suggest spending some time on
understanding that - even if you don't end up using Ledger but some
other software, you might find learning about accounting useful.  (Also,
it's fascinating.  No, really!  It's an extremely clever abstract
system with a real-life use-case.)

That said, there are people who just use a regular spreadsheet for their
personal/household finance, and it seems to work for them.  Go figure.
(Now that I think of it, I'll have to ask someone who does how they
manage that.)

Having said all that, would someone be interested in a blog post(s) with
a Ledger basics crash course?

Hth,

-- 
Marcin Borkowski
http://mbork.pl



Re: [tip] Inline tasks as anonymous sections

2022-01-08 Thread Marcin Borkowski


On 2022-01-08, at 12:32, Juan Manuel Macías  wrote:

> Hi,
>
> I think that a very efficient way to take advantage of inline tasks (in
> the framework of document authoring and exporting) is to treat them as
> anonymous sections, that is, those sections that do not have a title and
> are normally separated in books by some special symbol: three asterisks
> (a dinkus: https://en.wikipedia.org/wiki/Dinkus), an asterism (three
> asterisks forming a triangle), or any other fancy symbol. Users can
> associate their own export functions with the variables
> `org-latex-format-inlinetask-function',
> `org-odt-format-inlinetask-function', etc. Well, you can always add the
> separation symbol directly in your text, but the advantage of using
> inline task is that we can conveniently have those sections delimited,
> as real sections (with properties, todo states, etc).
>
> If anyone wants to explore this possibility, I am attaching a test org
> document. I have defined two LaTeX commands: \anonsectionbreak and
> \anonsectionmark; and the 'anonsection' environment[1].

I don't expect this to be useful for me personally, but I love the idea!

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: From macros to elisp programming?

2021-12-07 Thread Marcin Borkowski
 comes with Emacs itself.

Another thing I'd like to add here is that asking on this list is
usually a good idea.  I learned a lot (and I'm still learning a lot)
just by reading emails here.

Other resources I'd mention are:
- Emacs source code (though it is very complicated in some places...)
- source code of various packages
- Emacs blogs (https://planet.emacslife.com/)

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: On zero width spaces and Org syntax

2021-12-04 Thread Marcin Borkowski


On 2021-12-04, at 08:22, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>> 2. We modify Emacs itself to somehow highlight the ZWS.  There is (kind
>> of) a precedent – a no-breaking space is already fontified with
>> =nobreak-space= face.  At the very least, make whitespace-mode somehow
>> show ZWSs (which it doesn't now, and I'd probably say it's a bug).
>>
>> I know that my point 2. is a bit controversial, since it could lead to
>> alignment issues where a ZWS is displayed as something with a positive
>> width. OTOH, even now changing the face of a ZWS leads to a narrow
>> (1-pixel wide) line of a different color.  Is there a way to make it
>> a bit stronger?
>
> We can try to create an accent. Try the following:
> 1. Open new empty org buffer
> 2. Disable font-lock-mode
> 3. M-: (insert (compose-string "a​" nil nil (list ?a '(bl . tl) ?␣)))
>
> The result will look like on the attached image.

I'm not sure if I like that idea - looks great, but I'd be a bit afraid
of unintended consequences.

Either way, personally I can live with ZWSs in my Org files, so whatever
is decided, it's fine with me.

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: On zero width spaces and Org syntax

2021-12-03 Thread Marcin Borkowski


On 2021-12-03, at 13:48, Juan Manuel Macías  wrote:

> Hi all,
>
> It is usually recommended, as you know, to insert a zero width space
> character (Unicode U+200B) as a sort of delimiter mark to solve the
> scenarios of emphasis within a word (for example, =/meta/literature=)
> and others contexts where emphasis marks are not recognized (for example
> =[/literature/]=). I believe that as a puntual workaround it is not bad;
> however, I find it problematic that this character is part, more or less
> de facto, of the Org syntax. For two main reasons:
>
> 1. It is an invisible character, and therefore it is difficult to
> control and manage. I think it is not good practice to introduce this
> type of characters implicitly in a plain text document.
>
> 2. It is more natural that this type of space characters are part of the
> 'output' and not of the 'input'. In the input it is better to introduce
> them not implicitly but through their representation. For example, in
> LaTeX (with LuaTeX) using the command '\char"200B{}' (or '200b'),
> '' in HTML, etc.
>
> In any case, as an implicit character, I do not see it appropriate for
> the syntax of a markup language. The marks should be simply ascii
> characters, IMHO. So what if Org had a specific delimiter mark for the
> scenarios described above? For example, something like that:

Hi all,

I've skimmed through this discussion.  FWIW, I also use zero-width
spaces in my Org files for this precise reason.  However, I agree that
extending syntax is dangerous.

How about a solution (or maybe it's only a "solution"...) where:

1. We take care to modify the "official" exporters to throw out the ZWSs.
Or even better, convert them to something reasonable, e.g. with LaTeX
they can be discarded or converted to some command – possibly even one
defined in the preamble – so that nothing is lost.  I'd even say that an
option deciding what to do with those could be nice.

2. We modify Emacs itself to somehow highlight the ZWS.  There is (kind
of) a precedent – a no-breaking space is already fontified with
=nobreak-space= face.  At the very least, make whitespace-mode somehow
show ZWSs (which it doesn't now, and I'd probably say it's a bug).

I know that my point 2. is a bit controversial, since it could lead to
alignment issues where a ZWS is displayed as something with a positive
width. OTOH, even now changing the face of a ZWS leads to a narrow
(1-pixel wide) line of a different color.  Is there a way to make it
a bit stronger?

Just some random ideas,

-- 
Marcin Borkowski
http://mbork.pl



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

2021-11-29 Thread Marcin Borkowski


On 2021-11-29, at 19:27, 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.

This!

>> 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.
>
> Maybe most documents are very simple files. README files for FLOSS
> projects, forum posts, blog posts. For such content the features where
> the Markdown implementations differ are usually not required. It
> suffices to use unstyled text, headings, code blocks, quotes, emphasis.
> That is it basically. org shines on documents where more is required --
> documentation, books, since recently scientific articles. Markdown’s
> common subset is not expressive enough for these documents, whereas for
> simple documents there is not much benefit in trading in Markdown for
> org. Thus, maybe it is more fruitful to try to market org(down) as a
> markup for complex documents, with the added benefit that it does
> incidentally also cover simple documents nicely on par with Markdown.

I agree.  When I type Markdown (and I often do, in a few places),
I mainly use `backticks` (single and triple ones) for code etc.,
_italics_,
- sometimes
- bulleted
- lists,

> quotations (not very often),

and a

# Heading

on rare occasions.  That's pretty much it.

Best,

-- 
Marcin Borkowski
http://mbork.pl



Is it possible to add a "cumulative" column in column view?

2021-11-29 Thread Marcin Borkowski
Hi fellow Orgers,

I started using column view recently, and I would greatly appreciate it
if I could add a column with "cumulative sum".  In a less-than ideal
world it would be the sum of all the values of some property until the
current row.  In an ideal world, it could only count values of some
property A for rows in which property B is set to certain value.

I looked at the docstring of `org-columns-summary-types', and it is
obviously impossible to do it with it (the `summarize' function always
gets all the values and doesn't get the row number on anything like
it).  How difficult would it be to extend it?  (A cursory look at
`org-colview.el' suggests that there are quite a few layers of
abstraction, so it doesn't look like a 10-minute hack...)

TIA,

-- 
Marcin Borkowski
http://mbork.pl



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

2021-11-29 Thread Marcin Borkowski


On 2021-11-29, at 13:18, Juan Manuel Macías  wrote:

> Marcin Borkowski writes:
>
>> Quite the contrary.  The amount of confusion between TeX (engine)/TeX
>> (language)/TeX (distro)/TeX-aware text editor/LaTeX (whatever) among
>> novice/casual users has always been terrible.
>
> It's natural when those novice/casual users approach something that is
> new to them, but nothing invincible when they want to learn. The "TeX"
> ecosystem is not trivial, but I think that all, or almost all of us,
> understand each other when things like 'TeX/LaTeX code', 'TeX engine',
> 'LaTeX format', etc. are said. If the TeX language were somewhat
> self-contained and widely used outside of TeX, I would see OK that the
> language had its own name. But, since the TeX language is something that
> almost only TeX understands (roughly said), I think the economy wins
> here (IMHO). I don't see how we could improve everything by having half
> a dozen more exotic names.

Agreed, I just wanted to say that the situation with TeX is more
complicated.  Especially that 92%* TeX users are novice/casual users.

* Number made up, but loosely based on anecdotal evidence;-).

-- 
Marcin Borkowski
http://mbork.pl



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

2021-11-28 Thread Marcin Borkowski


On 2021-11-28, at 23:25, Juan Manuel Macías  wrote:

> Hi,
>
> [...] For example: there is TeX (the typographic engine) and TeX
> (the programming language for that engine). And there has never been any
> conflict.

Quite the contrary.  The amount of confusion between TeX (engine)/TeX
(language)/TeX (distro)/TeX-aware text editor/LaTeX (whatever) among
novice/casual users has always been terrible.

Just my 2 cents,

-- 
Marcin Borkowski
http://mbork.pl



Re: A mobile clocking solution?

2021-11-27 Thread Marcin Borkowski


On 2021-11-27, at 22:42, Samuel Banya  wrote:

> Lol, okay. Well then, I tried to offer some advice. Good luck with MacOS.

Well, thanks - it was actually valuable.  Also - out of curiosity - what
gave you the impression I'm using MacOS???  Fun fact: I did once use an
iPad (a borrowed one) for half a day, and I found the experience
terrible enough to not come near anything Apple-related;-).

Best,
mbork


>
> Its better to keep Emacs uncaged :)
>
> On Sat, Nov 27, 2021, at 7:25 AM, Marcin Borkowski wrote:
>> 
>> On 2021-11-26, at 22:16, Samuel Banya  wrote:
>> 
>> > Hey Marcin,
>> >
>> > There are a few options that exist, so I'm going to drop a few ideas in 
>> > this email.
>> >
>> > *"Buy A Rooted Phone" Option:*
>> > Why not just get a rooted Android phone with Replicant on it from eBay in 
>> > the first place?
>> >
>> > Then, you can use Termux to ssh into a local or cloud VPS file server 
>> > where you're hosting your .org files. Most people even use Dropbox (or 
>> > SyncThing, whatever floats your boat).
>> >
>> > Worst case scenario, you can maybe just run a terminal version of Emacs on 
>> > the rooted Android phone (or even your current non-rooted phone), and 
>> > clock in like that.
>> 
>> Well, doesn't that have the same security issue I mentioned?
>> 
>> > If you're on iOS though... well... maybe its time to get out of the walled 
>> > garden?
>> 
>> Of course not.
>> 
>> > *"Just Use A Laptop" Option:*
>> > I'd say maybe just get a laptop, put some decent Linux distro on it, and 
>> > use Emacs on that instead.
>> 
>> Out of question.  I need this exactly for the times when I cannot use my 
>> laptop.
>> 
>> > Worst case scenario, you can maybe just run a terminal version of Emacs on 
>> > the rooted Android phone, and clock in like that.
>> >
>> > *Bash Script Approach:*
>> > The only other thing I could think of is to do this via an easy Bash 
>> > prompt to find the same files on the ssh machine. This might be 
>> > preposterous to those on the list that might want to use Elisp for 
>> > everything, but maybe its on a device where a Linux Bash terminal just is 
>> > present by default.
>> 
>> That /could/ be a solution.
>> 
>> > *"Just Log The Time Later" Approach:*
>> > You could always even just make org capture templates to estimate time 
>> > later too.
>> 
>> And I think this is the way to go.  Probably also use/write some very
>> simple time tracking app on the phone.
>> 
>> > *Summed Up:*
>> > The most sane approach in my opinion, is just use a computer that can 
>> > normally just use Emacs as-is. 
>> >
>> > Then again, this is coming from someone who respects the "Getting Things 
>> > Done" method a ton, but doesn't clock in every single personal task, 
>> > because I think its really unnecessary and tedious. I think this kind of 
>> > clocking ideas are better suited for work based todo lists if you're 
>> > trying to get things done for work or something.
>> 
>> I don't clock everything either, but there are some things that I do,
>> and that's why I want a reasonable mobile solution.
>> 
>> > I've seen the Android apps for Emacs Org Mode demo'd on YouTube, and it 
>> > looks clunky. Its nice for what it is, but yeah, I think Emacs overall is 
>> > just better suited for a laptop or desktop computer since you really need 
>> > to just use a keyboard to pull off most of the magic.
>> 
>> Of course.  I don't need Org editing etc. (well, maybe capture), just
>> the clocking.  That seems easy enough on mobile (UI-wise)..
>> 
>> > Good luck with this though,
>> 
>> Thanks!
>> 
>> -- 
>> Marcin Borkowski
>> http://mbork.pl
>> 


-- 
Marcin Borkowski
http://mbork.pl



Re: A mobile clocking solution?

2021-11-27 Thread Marcin Borkowski


On 2021-11-26, at 22:16, Samuel Banya  wrote:

> Hey Marcin,
>
> There are a few options that exist, so I'm going to drop a few ideas in this 
> email.
>
> *"Buy A Rooted Phone" Option:*
> Why not just get a rooted Android phone with Replicant on it from eBay in the 
> first place?
>
> Then, you can use Termux to ssh into a local or cloud VPS file server where 
> you're hosting your .org files. Most people even use Dropbox (or SyncThing, 
> whatever floats your boat).
>
> Worst case scenario, you can maybe just run a terminal version of Emacs on 
> the rooted Android phone (or even your current non-rooted phone), and clock 
> in like that.

Well, doesn't that have the same security issue I mentioned?

> If you're on iOS though... well... maybe its time to get out of the walled 
> garden?

Of course not.

> *"Just Use A Laptop" Option:*
> I'd say maybe just get a laptop, put some decent Linux distro on it, and use 
> Emacs on that instead.

Out of question.  I need this exactly for the times when I cannot use my laptop.

> Worst case scenario, you can maybe just run a terminal version of Emacs on 
> the rooted Android phone, and clock in like that.
>
> *Bash Script Approach:*
> The only other thing I could think of is to do this via an easy Bash prompt 
> to find the same files on the ssh machine. This might be preposterous to 
> those on the list that might want to use Elisp for everything, but maybe its 
> on a device where a Linux Bash terminal just is present by default.

That /could/ be a solution.

> *"Just Log The Time Later" Approach:*
> You could always even just make org capture templates to estimate time later 
> too.

And I think this is the way to go.  Probably also use/write some very
simple time tracking app on the phone.

> *Summed Up:*
> The most sane approach in my opinion, is just use a computer that can 
> normally just use Emacs as-is. 
>
> Then again, this is coming from someone who respects the "Getting Things 
> Done" method a ton, but doesn't clock in every single personal task, because 
> I think its really unnecessary and tedious. I think this kind of clocking 
> ideas are better suited for work based todo lists if you're trying to get 
> things done for work or something.

I don't clock everything either, but there are some things that I do,
and that's why I want a reasonable mobile solution.

> I've seen the Android apps for Emacs Org Mode demo'd on YouTube, and it looks 
> clunky. Its nice for what it is, but yeah, I think Emacs overall is just 
> better suited for a laptop or desktop computer since you really need to just 
> use a keyboard to pull off most of the magic.

Of course.  I don't need Org editing etc. (well, maybe capture), just
the clocking.  That seems easy enough on mobile (UI-wise)..

> Good luck with this though,

Thanks!

-- 
Marcin Borkowski
http://mbork.pl



Re: A mobile clocking solution?

2021-11-25 Thread Marcin Borkowski


On 2021-11-24, at 15:30, Daniel Baker  wrote:

> Oops.  I'm sorry, I forgot to include the link. That would be for orgzly.
>
> https://github.com/orgzly/orgzly-android/pull/691

Thanks!

Although, after some thinking, I'm a bit afraid of using this, for the
simple reason: I don't consider data on my phone "safe" (it's much
easier to lose a phone than a computer - or to have it stolen), so I'd
prefer not to put my Org files there...

I think I have an idea for a solution - but thanks anyway!

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: A mobile clocking solution?

2021-11-23 Thread Marcin Borkowski


On 2021-11-21, at 15:25, Daniel Baker  wrote:

> Hi Marcin,
>
> There's an open pull request on github that has a working implementation
> for clocking in and out. There's a few ui things to fix. I'm running that
> branch at the moment and it works quite well.

Thanks, but... which app are you talking about?

-- 
Marcin Borkowski
http://mbork.pl



A mobile clocking solution?

2021-11-21 Thread Marcin Borkowski
Hi all,

AFAIK, there are a few mobile Org-mode apps for Android (I know about
organice and Orgzly).  From a skim of their docs I think they don't
support clocking.  Is that correct?  If so, are there any mobile apps
supporting clocking on a phone?

TIA,

-- 
Marcin Borkowski
http://mbork.pl



  1   2   3   4   5   6   7   8   9   >