Re: capturing and filling

2023-04-09 Thread Max Nikulin

On 07/04/2023 10:29, Samuel Wales wrote:

heuristic: loop through every line.  if the line qualifies by some
sub-heuristic, and is more than 2x (window-width), then fill at
capture time, but only that line, not contiguous ones that do not meet
the sub-heuristic (different prefix etc.).


Somebody should debug such heuristics. Fortunately no modification of 
Org is necessary to evaluate if it may be implemented. Something like 
the following may be added to capture template.


%(let* ((query (plist-get org-store-link-plist :query))
(body (plist-get query :body)))
;; wrap lines in body accordingly e.g. to `fill-column'
)

Of course, there should be a function that implements heuristics to 
facilitate debugging and to allow unit tests.





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



Suggestion: Link to Diary docs (was Re: Limiting a repeating timestamp) ?

2023-04-09 Thread David Masterson
Ihor Radchenko  writes:

> Mark Barton  writes:

> Note that you can exclude holidays automatically using `org-class' in
> diary sexp-style timestamps.

Could I suggest adding a link to the Diary documentation in Emacs that
discusses what a "diary sexp-style timestamp" looks like? Perhaps put it
in 8.1 Timestamps?

-- 
David Masterson



Re: Worg: issue with org-tools page

2023-04-09 Thread Karl Voit
* Ihor Radchenko  wrote:
> Karl Voit  writes:
>
>> CI example: https://builds.sr.ht/~bzg/job/970651 lists all sorts of
>> HTML pages but for org-tools, there is no HTML output generated as
>> it seems. Whatever I write in org-tools/index.org doesn't get to the
>> HTML version of it.
>>
>> Maybe somebody has an idea what's going on here?
>
> AFAIU, there is some problem installing "elpa-ess" Debian package. For
> some reason, Emacs cannot find 'ess, which leads to export failures.
>
> [exporting] org-contrib/babel/examples/Rpackage.org
> Executing R code block at position 5615...
> Cannot open load file: No such file or directory, ess

Okay, that was also my idea when I saw the log file. Can somebody
fix ESS here or should we convert the R blocks to a different block
type (EXAMPLE)?

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




Re: Worg: issue with org-tools page

2023-04-09 Thread Ihor Radchenko
Karl Voit  writes:

> CI example: https://builds.sr.ht/~bzg/job/970651 lists all sorts of
> HTML pages but for org-tools, there is no HTML output generated as
> it seems. Whatever I write in org-tools/index.org doesn't get to the
> HTML version of it.
>
> Maybe somebody has an idea what's going on here?

AFAIU, there is some problem installing "elpa-ess" Debian package. For
some reason, Emacs cannot find 'ess, which leads to export failures.

[exporting] org-contrib/babel/examples/Rpackage.org
Executing R code block at position 5615...
Cannot open load file: No such file or directory, ess

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



Worg: issue with org-tools page

2023-04-09 Thread Karl Voit
Hi,

After fixing my WORG setup and being able to push again, I found out
that https://orgmode.org/worg/org-tools/ isn't updated by the CI
job.

https://git.sr.ht/~bzg/worg/tree/master/item/org-tools/index.org
shows the latest changes, https://orgmode.org/worg/org-tools/
doesn't.

CI example: https://builds.sr.ht/~bzg/job/970651 lists all sorts of
HTML pages but for org-tools, there is no HTML output generated as
it seems. Whatever I write in org-tools/index.org doesn't get to the
HTML version of it.

Maybe somebody has an idea what's going on here?

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




Re: export only certain columns of an org-table to csv

2023-04-09 Thread Uwe Brauer
>>> "IR" == Ihor Radchenko  writes:

> Uwe Brauer  writes:
>> I have the following simple table
>> 
>> 
>> #+Name: table
>> | / | /  | <> | <> |
>> |   | Name   | Sheet1 | Sheet2 |
>> |---+++|
>> |   | Smith  | Ex1| Ex2|
>> |   | Miller | Ex3| Ex4|
>> 
>> 
>> I hoped that the first two columns would not be exported to csv
>> (orgtbl-to-csv), indeed they are not when exporting to latex or html but
>> for csv, all columns have been exported.

>> What do I miss?

> The second column get exported to latex and html on my side.
Well, well memory fails.
https://list.orgmode.org/874koc38zn@gnu.org/T/

I asked a similar question three years ago, the first two columns are
not exported because of this

(add-hook 'org-export-before-processing-hook 'f-ox-filter-table-column-del)

(defun f-ox-filter-table-column-del (back-end)
   "Delete the columns $2 to $> marked as \"/\" on a row with \"/\" in $1.
 If you want a non-empty column $1 to be deleted make it $2 by
 inserting an empty column before or rearrange column order in
 some other way. Make sure \"/\" is in $1 again after that."
   (while (re-search-forward
   "^[ \t]*| +/ +|\\(.*?|\\)?? +\\(/\\) +|" nil t)
 (goto-char (match-beginning 2))
 (org-table-delete-column)
 (beginning-of-line)))

But it is not working for the csv export  would be nice if it would

> And it is expected. Only the first column with spacial marks does not
> get exported. All other columns are exported, unless you specify
> :skipcols (see `orgtbl-to-generic' docstring).

-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/


smime.p7s
Description: S/MIME cryptographic signature


Re: [RFC] [feat] org-colview/org-columns: 'column view' moving rows up/down

2023-04-09 Thread Ihor Radchenko
SÅ‚awomir Grochowski  writes:

> Thank you Ihor for the code review.
> Now please help me find everything that can be improved in this patch.

I just tried to use the patch using the following test case:

1. Create a new Org file containing

* A 
* B 
* C 
** C1
* D 

2. C-u C-c C-x C-c
3. M-<
4. M- M- M- M- M- M- M- M- C-c C-c
5. Observe text disappearing and columns being unhighlighted. At the
   end, the buffer is left with

* B

>> Finally, I see no records about you copyright assignment status.
>> Please take a look at
>> https://orgmode.org/worg/org-contribute.html#copyright
>>
>
>  Yes, it's my first time. I sent an email to ass...@gnu.org, yesterday.

Note that they should reply within 5 working days.

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



Re: [RFC] Limit inline image width by default (was: feature request: easy embedding of images)

2023-04-09 Thread Ihor Radchenko
Ihor Radchenko  writes:

> But we can try to improve the defaults for wide images.
>
> See the tentative patch.
>
> From 180e322c2c79ea88d87f908299a5c0e69c47a7b2 Mon Sep 17 00:00:00 2001
> Message-Id: 
> <180e322c2c79ea88d87f908299a5c0e69c47a7b2.1679581960.git.yanta...@posteo.net>
> From: Ihor Radchenko 
> Date: Thu, 23 Mar 2023 15:31:33 +0100
> Subject: [PATCH] lisp/org.el: Allow limiting inline image width

Applied, onto main. Fixing the spotted typo and replacing
`pixel-fill-width' with `frame-char-width' that is available in Emacs
26.

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

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



Re: export only certain columns of an org-table to csv

2023-04-09 Thread Ihor Radchenko
Uwe Brauer  writes:

> I have the following simple table
>
>
> #+Name: table
> | / | /  | <> | <> |
> |   | Name   | Sheet1 | Sheet2 |
> |---+++|
> |   | Smith  | Ex1| Ex2|
> |   | Miller | Ex3| Ex4|
>
>
> I hoped that the first two columns would not be exported to csv
> (orgtbl-to-csv), indeed they are not when exporting to latex or html but
> for csv, all columns have been exported.

> What do I miss?

The second column get exported to latex and html on my side.
And it is expected. Only the first column with spacial marks does not
get exported. All other columns are exported, unless you specify
:skipcols (see `orgtbl-to-generic' docstring).

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



Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el

2023-04-09 Thread Ihor Radchenko
Max Nikulin  writes:

> I would consider adding to ELPA README and Org manual something like:
>
> If compiling of ELPA packages causes a lot of warnings related to 
> `org-assert-version' then delete just installed Org package, start new 
> Emacs session ensuring that Org is not loaded (-q?) and try to install 
> from such clean state.

What about creating org-assert-version.el file that will contain
something like

(if (fboundp 'org-assert-version)
 (org-assert-version)
 (warn ""))

Then, instead of (org-assert-version) call, we can put
(load "org-assert-version.el") in Org libraries.

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