bug#53393: 29.0.50; org mode timestamp C-c C-c not updating day of week

2022-01-21 Thread Eli Zaretskii
> From: "Bruce E. Robertson" 
> Date: Tue, 18 Jan 2022 10:36:22 -0800
> 
> 
> emacs -Q test.org
> cursor to "CLOCK:" line, C-c C-c
> total time updates but day of week does not change
> contents of test.org
> --
> * heading
> :LOGBOOK:
> CLOCK: [2022-01-17 Tue 10:29]--[2022-01-19 Tue 10:29] => 48:00
> :END:
> --
> typing C-c C-c does update total log time for line and recently did
> update the day of the week but no long does

Isn't this an Org problem that should be reported to the Org
developers first?

Thanks.





Re: Extend the existing alternative set of key bindings for terminals (was: Second Ctl in keychord not detected)

2022-01-21 Thread Tim Cross


Ihor Radchenko  writes:

> Also, it appears to me that we may keep losing terminal-incompatible
> keys in future unless we provide some mechanisms to check terminal
> compatibility automatically. Any ideas?
>

No ideas on this. Problem being I don't think there is anything like a
terminfo service which will tell you about what capabilities/bindings a
terminal emulator has.

Just some thoughts on this -

I fear any such attempt is likely to end up in a game of 'wack-a-mole'.
While it makes some sense to provide alternative key bindings for Emacs
running under the GNU Linux console, especially given the limitations
under the console are well defined and constant, I'm not sure
we can provide reliable solutions or tests for different terminal
emulators (which will often 'reserve' various key bindings for their own
use. This is especially true for more advanced terminal emulators like
tmux.

An alternative which might be worth considering would be to improve
documentation on using different popular terminal emulators, like tmux
which could cover both adapting org key bindings and adapting the key
bindings the emulator uses (a very quick google on this indicates you
can change the tmux bindings, but that detail is apparently not well
documented). Such documentation could include some guidelines on how to
identify the issue, identify at what layer (window manager, terminal
emulator, communication protocol etc) the problematic binding is being
intercepted etc. The interactions at this layer can be complex and
confusing, especially for users who don't have a clear model of how all
the layers interact.  

A more long term strategy which I wonder if we should consider is
whether org would benefit from adopting the use of something like the
hydra package. Org needs a lot of key bindings - many more than most
other modes. Available bindings are in short supply. Perhaps leveraging
off something like hydras would both offer more flexibility and make it
easier to manage. Likewise, could transient mode help in this area?






Re: Extend the existing alternative set of key bindings for terminals

2022-01-21 Thread Loris Bennett
Hi Ihor,

Ihor Radchenko  writes:

> "Loris Bennett"  writes:
>
>>> Then, it is terminal input problem. See
>>> https://stackoverflow.com/questions/0801/why-does-ctrl-not-work-when-i-bind-it-to-a-command-in-emacs/8511#8511
>>
>> You're right, the problem also happens locally when I start Emacs with
>> '-nw'.  Thanks for the link - I'll have a look at the various solutions,
>> although it might just be easier to rebind the command ;-)
>
> On Org side, we have an alternative set of key bindings that is more
> compatible with terminals (see org-use-extra-keys). I think that C-c C-,
> should also be covered there. Or maybe some other keys as well.
>
> Loris, would you be interested to check which default bindings from
> org-mode-map work and which don't work in tmux/terminal and report here?

In principle, yes, but the mode map is quite extensive.  Is there any
way of doing that systematically?  Or is the idea that I just keep a
record of all the issues that I stumble across?

Cheers,

Loris

> Also, it appears to me that we may keep losing terminal-incompatible
> keys in future unless we provide some mechanisms to check terminal
> compatibility automatically. Any ideas?
>
> Best,
> Ihor
-- 
This signature is currently under construction.



Re: [PATCH] lisp/org-agenda.el: Add header to agenda clock report table

2022-01-21 Thread Samim Pezeshki
Should I do something for this patch to be approved?

On Mon, Jan 10, 2022 at 1:58 PM Christopher M. Miles 
wrote:

>
> Good idea to add header for clock report table.
>
> Samim Pezeshki  writes:
>
> > Hi,
> >
> > This patch adds a header to the clock report table in the agenda, if
> > org-agenda-clock-report-header is set.
> >
> > Thanks,
> > Samim
> >
> > [4. text/x-patch;
> 0001-lisp-org-agenda.el-Add-header-to-agenda-clock-report.patch]...
>
>
> --
> [ stardiviner ]
>I try to make every word tell the meaning that I want to express.
>
>Blog: https://stardiviner.github.io/
>IRC(freenode): stardiviner, Matrix: stardiviner
>GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
>


Re: [PATCH] lisp/org-agenda.el: Add header to agenda clock report table

2022-01-21 Thread Nicolas Goaziou
Hello,

Samim Pezeshki  writes:

> +(defcustom org-agenda-clock-report-header nil
> +  "Header for org agenda clock report mode"
> +  :group 'org-agenda
> +  :type 'string)

Please add :package-version and :safe keywords to the definition.

Also, type does not match the default value. You probably mean

(choice
 (string :tag "Header")
 (const :tag "No header" nil))

> +
>  (defun org-agenda-time-of-day-to-ampm (time)
>"Convert TIME of a string like \"13:45\" to an AM/PM style time string."
>(let* ((hour-number (string-to-number (substring time 0 -3)))
> @@ -4473,6 +4478,10 @@ items if they have an hour specification like [h]h:mm."
> (setq p (plist-put p :tend clocktable-end))
> (setq p (plist-put p :scope 'agenda))
> (setq tbl (apply #'org-clock-get-clocktable p))
> +(when org-agenda-clock-report-header
> +  (put-text-property 0 (length org-agenda-clock-report-header) 'face 
> 'org-agenda-structure
> + org-agenda-clock-report-header)
> +  (insert org-agenda-clock-report-header))

Maybe:

  (insert (propertize org-agenda-clock-report-header 'face 
'org-agenda-structure))

Could you send an updated patch?

Regards,
-- 
Nicolas Goaziou



Bug: Certain keyboard combination is not formatted correctly [9.4.4 (release_9.4.4 @ /usr/local/Cellar/emacs-plus@27/27.2/share/emacs/27.2/lisp/org/)]

2022-01-21 Thread Islambeg Katibov
TLDR: keyboard combination  that should be formatted as `C-c '` is
instead formatted as `C-c '' (double single quotes instead of single quote
and backtick). I observe it in Info Manual of Org Mode Compact Guide ch.
11.4, 12.4.
I get this file by exporting org-guide.org as Info file.
And I get this org-guide.org (with doc-setup.org) from
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/doc.

I know this is a very minor issue (should I even call it one?:)) but
nevertheless think it is better to report than not.

On a side note, I took a quick look at org-guide.org and it seems that
<{{{kbd(C-c
')}}}> is the culprit. But I'm quite a novice in both Emacs and Org Mode so
don't how to tackle this problem.


Re: Bug: Certain keyboard combination is not formatted correctly [9.4.4 (release_9.4.4 @ /usr/local/Cellar/emacs-plus@27/27.2/share/emacs/27.2/lisp/org/)]

2022-01-21 Thread Islambeg Katibov
Oh, sorry, seems like it is a normal behavior. Never noticed that all the
keyboard combinations are marked by `', thought they both were backticks.
Have a good one!

On Wed, Jan 19, 2022 at 10:50 PM Islambeg Katibov 
wrote:

> TLDR: keyboard combination  that should be formatted as `C-c '` is
> instead formatted as `C-c '' (double single quotes instead of single quote
> and backtick). I observe it in Info Manual of Org Mode Compact Guide ch.
> 11.4, 12.4.
> I get this file by exporting org-guide.org as Info file.
> And I get this org-guide.org (with doc-setup.org) from
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/doc.
>
> I know this is a very minor issue (should I even call it one?:)) but
> nevertheless think it is better to report than not.
>
> On a side note, I took a quick look at org-guide.org and it seems that 
> <{{{kbd(C-c
> ')}}}> is the culprit. But I'm quite a novice in both Emacs and Org Mode
> so don't how to tackle this problem.
>


[BUG] org-icalendar-combined-agenda-file with Footnotes [9.4.6 (9.4.6-g069bcb @ /home/msi/.emacs.d/straight/build/org/)]

2022-01-21 Thread Cletip Cletip
When I call the "org-icalendar-combined-agenda-file" function,
everything works fine, I have a new "file.ics". But if you try to make
footnotes in one of the files (in org-agenda-files) taken into account in
the
org-icalendar-combined-agenda-file function, look at the end of the
resulting file "file.ics" : the footnotes are included in the .ics file,
which obviously creates a bug in the file


Emacs  : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.20, cairo version 1.16.0)
 of 2020-09-19
Package: Org mode version 9.4.6 (9.4.6-g069bcb @
/home/msi/.emacs.d/straight/build/org/)


Exporting Org file to Html with collapsable headings

2022-01-21 Thread ZIPING CHEN
Hi,

I am working on a large org file with exceptional number of subheadings. For 
example, I may have org headings inside headings up to 20 or 30 layers deep.

I may have many things like this in the middle of the file.
** a new heading.

When I export the file to html, I like to export in such a way that the org 
headings become collapsable headline in html (toggle switch). I spend some time 
search the web, and find a theme called bigblow which does something close to 
what I want, but not exactly. It provide limited layer of toggle switch only. I 
wish to turn all layers of headings in org file into collapsable headline to 
html. 

Does anybody know a way I can accomplish this?

Thanks a lot.

Ziping

Re: [BUG] org-icalendar-combined-agenda-file with Footnotes [9.4.6 (9.4.6-g069bcb @ /home/msi/.emacs.d/straight/build/org/)]

2022-01-21 Thread Nicolas Goaziou
Hello,

Cletip Cletip  writes:

> When I call the "org-icalendar-combined-agenda-file" function,
> everything works fine, I have a new "file.ics". But if you try to make
> footnotes in one of the files (in org-agenda-files) taken into account in
> the
> org-icalendar-combined-agenda-file function, look at the end of the
> resulting file "file.ics" : the footnotes are included in the .ics file,
> which obviously creates a bug in the file
>
>
> Emacs  : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
> 3.24.20, cairo version 1.16.0)
>  of 2020-09-19
> Package: Org mode version 9.4.6 (9.4.6-g069bcb @
> /home/msi/.emacs.d/straight/build/org/)

IIRC, it was fixed in Org 9.5.1. You may want to update Org.

Regards,
-- 
Nicolas Goaziou



Re: [BUG] org-element-cache: The inherited property is set wrong

2022-01-21 Thread Ihor Radchenko
Anders Johansson  writes:

> Hi,
> I had some trouble with completing tags, where the already set tags
> were wrongly identified. I have dug this down to a problem with
> caching.
>
> with org-element-use-cache=t and org-use-tag-inheritance=t
> --- Org
> * headline 1 :tag1:
> ** headline 2 :tag2:
> --- end org
>
> ...
> A solution that seems to work for me was to change
>  (cl-copy-list cached-tags)
> to
> (mapcar #'copy-sequence cached-tags)

Fixed.

Thanks for the detailed analysis and the solution! I have seen this bug
myself in the past, but was not able to reproduce reliably.

Best,
Ihor



Re: [BUG] org-element-cache: The inherited property is set wrong

2022-01-21 Thread Ihor Radchenko
Anders Johansson  writes:

>> I don’t know if this is the best solution though.
>> Perhaps this is needed also in org--get-local-tags where a similar
>> thing is done? (but only the fontification seems to matter there)
>
> I now noted that this differed in Ihor's org-fold-universal-core
> branch which I use and main (org-get-tags has an extra argument
> fontify for org-fold). But I believe the caching issue is relevant on
> both branches (and in either case a topic for Ihor).

Yep, it is a common bug. I have also fixed the issue in my branch now.

By the way, I am almost done with preparing merge for org-fold. Once I
figure out an issue with pixel string-width in older Emacs, it should be
properly ready to be merged(;

Best,
Ihor



Re: [BUG] org-element-cache: The inherited property is set wrong

2022-01-21 Thread Ihor Radchenko
Kaushal Modi  writes:

> I have also been seeing some issues when adding/modidying heading tags
> (C-c C-q), and I was able to narrow it down to the element caching
> mechanism.
>
> Issue: Org mode/Emacs hangs kind of indefinitely when I do C-c C-q,
> but that doesn't happen each time.
>
> Once I set org-element-use-cache to nil, Emacs stopped hanging.
>
> Looking at your bug report, I believe that the issue I am seeing with
> cache and Org tags could be very much related. So thanks for
> submitting this.

The issue here had nothing to do with hanging. You are probably seeing
yet another bug.

By hang, do you mean that even C-g does not restore responsiveness?

Best,
Ihor



Re: [PATCH] ob-plantuml: Allow setting PlantUML args for jar file

2022-01-21 Thread Ihor Radchenko
Max Nikulin  writes:

>> #!/bin/bash
>> gjl_package=plantuml
>> gjl_jar="plantuml.jar"
>> source /usr/share/java-config-2/launcher/launcher.bash
>
> It seems with with the suggested patch both -Djava.awt.headless=true and 
> -headless are passed to jar. I suspect it is either redundant or 
> launcher.bash converts "-headless" to "-Djava.awt.headless=true". In 
> ubuntu there is no room for special treatment of "-headless" option by 
> the shell wrapper:

It is redundant, but should not cause any harm. plantuml source code has:

if (argsArray.length > 0 && argsArray[0].equalsIgnoreCase("-headless")) {
System.setProperty("java.awt.headless", "true");
}

I can of course add a condition to not add -headless if we are running
jar, but I do not see much benefit except purity argument.

>> I feel that running headless mode in the ob-plantuml is deliberate.
>
> https://plantuml.com/faq
> "Basically, this is because PlantUML needs to have access to some 
> graphical resources"
>
> I have no idea what is actually affected.

It mostly looks like otherwise there are some harmless warnings in the
output. 

> Which peace of code (java or plantuml.jar) handles "-headless" option? 
> This question affects decision if jar and executable wrapper modes may 
> share same list of arguments. Plantuml site recommends namely 
> -Djava.awt.headless=true. Anyway with or without the patch, 
> "-Djava.awt.headless=true" is added unconditionally in the jar mode. I 
> would revert that patch and either add it to java header argument or to 
> a new defcustom.

I do not see much point customising this particular argument. We _do
not_ want plantuml in gui mode. Ever. Otherwise, babel behaviour will be
unpredictable. If we make it customizeable, the only "benefit" would be
allowing users to shoot their own leg.

> Are there cases when :cmdline header argument is not enough and extra 
> custom variable org-plantuml-args (org-plantump-executable-args) should 
> be used?

> Actually I have realized that I do not understand why babel code uses 
> mix of defcustom and header arguments. The latter are more flexible and 
> may be adjusted per source block. On the other hand they may be set in 
> init file. Even java executable and path to jar file may be obtained 
> from header arguments.

Good questions. I think that the main reason is that most of header args
are not merged - only the last value is used. If you define :cmdline in
source block, it will override system-wide settings. Having an
additional defcustom allows to provide a "permanent" set of parameters -
to be used no matter what.

I realise that the current situation is kind of awkward. Maybe we should
encourage ob-* libraries to use special header args instead of
defcustoms and modify built-in libraries in this spirit. Would you be
interested to write a feature request?

Best,
Ihor






Re: Exporting Org file to Html with collapsable headings

2022-01-21 Thread Juan Manuel Macías
ZIPING CHEN writes:

> I am working on a large org file with exceptional number of
> subheadings. For example, I may have org headings inside headings up
> to 20 or 30 layers deep.
>
> I may have many things like this in the middle of the file.
> ** a new heading.
>
> When I export the file to html, I like to export in such a way that
> the org headings become collapsable headline in html (toggle switch).
> I spend some time search the web, and find a theme called bigblow
> which does something close to what I want, but not exactly. It provide
> limited layer of toggle switch only. I wish to turn all layers of
> headings in org file into collapsable headline to html. 
>
> Does anybody know a way I can accomplish this?

I think that you need to add javascript and enclose the collapsible
content in a div. If you google for 'html collapsible sections' there is
quite a bit of information on how to achieve this from the html side.
Here, for example:

https://levelup.gitconnected.com/collapsible-sections-with-or-without-javascript-3fd871955a9d

On the other hand, although not exactly related to what you are looking
for, you may be interested in taking a look at 'organize'. I have not
tried it, and as far as i know, it has its limitations:

https://github.com/200ok-ch/organice

Best regards,

Juan Manuel 



Re: [PATCH] make test: Make failure results more verbose

2022-01-21 Thread Ihor Radchenko
Max Nikulin  writes:

>> Side note. In f0c474e659b81da0d2ab75e7ec109355965f7a1c I have noticed
>> "* H1\nP1\n> that likely should be
>> "* H1\nP1\n* H2\n"
>
> Unrelated to this patch, but still should be fixed.

Thanks! Fixed.

Best,
Ihor



Re: [PATCH] make test: Make failure results more verbose

2022-01-21 Thread Ihor Radchenko
Max Nikulin  writes:

> I am attaching a tentative patch for Org that should make 
> EMACS_TEST_VERBOSE setting more transparent.

Thanks! Your patch looks cleaner.
In addition, I am attaching a tentative hack to make ERT pretty-print
the failure reason as you wished. WDYT?

Though it may also be something to consider in Emacs core.

Best,
Ihor
>From 1a8520b9cb2883672b1a6d2385d539a158658890 Mon Sep 17 00:00:00 2001
Message-Id: <1a8520b9cb2883672b1a6d2385d539a158658890.1642771846.git.yanta...@gmail.com>
From: Ihor Radchenko 
Date: Fri, 21 Jan 2022 21:30:21 +0800
Subject: [PATCH] make test: Pretty print failure reason in test summary

---
 testing/org-test.el | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/testing/org-test.el b/testing/org-test.el
index 0f1e254aa..a7b6b 100644
--- a/testing/org-test.el
+++ b/testing/org-test.el
@@ -344,6 +344,13 @@ (defun org-test-strip-text-props (s)
   (let ((noprop (copy-sequence s)))
 (set-text-properties 0 (length noprop) nil noprop)
 noprop))
+
+(require 'cl-macs)
+(defun org-test-ert-reason-for-test-result:pretty-func (func result)
+  "Call `ert-reason-for-test-result' (as FUNC(RESULT)).
+Pretty-print the failure reason."
+  (cl-letf (((symbol-function 'format) (lambda (_ reason) (concat "\n" (pp-to-string reason)
+(funcall func result)))
 
 
 (defun org-test-string-exact-match (regex string &optional start)
@@ -435,7 +442,11 @@ (defun org-test-run-batch-tests (&optional org-test-selector)
 (org-test-update-id-locations)
 (org-test-load)
 (message "selected tests: %s" org-test-selector)
-(ert-run-tests-batch-and-exit org-test-selector)))
+(advice-add 'ert-reason-for-test-result :around
+#'org-test-ert-reason-for-test-result:pretty-func)
+(ert-run-tests-batch-and-exit org-test-selector)
+(advice-remove 'ert-reason-for-test-result
+   #'org-test-ert-reason-for-test-result:pretty-func)))
 
 (defun org-test-run-all-tests ()
   "Run all defined tests matching \"\\(org\\|ob\\)\".
-- 
2.34.1



org-element-cache: org-set-tags (C-c C-q) makes Emacs unresponsive at times

2022-01-21 Thread Kaushal Modi
Hello Ihor,

> The issue here had nothing to do with hanging. You are probably seeing
> yet another bug.

ok.

> By hang, do you mean that even C-g does not restore responsiveness?

Typically, within a second of doing C-c C-q, I would know that the
buffer is going to freeze, and if I do C-g soon enough, Emacs would
recover in a second or two.

But if I wait 5-6 seconds and then do C-g, it could take minutes to
recover, and I often do pkill SIGUSR2 from the terminal to get back.

Sorry, but since then I set org-element-use-cache to nil once that
issue comes back. It's usually that I am between something and I don't
think of getting a backtrace on C-g (Now I have made a note to self to
provide a backtrace in this thread when that issue repeats).

---

Right now, I set org-element-use-cache back to t, did M-x
toggle-debug-on-quit and did a couple of C-c C-q in a 10k line Org
buffer .. this time, it's responsive and snappy :|

I'll keep you posted. Thanks!!

---

Org mode version 9.5 (release_9.5-415-g9b58ea)
Emacs version: GNU Emacs 28.0.91 (build 5, x86_64-pc-linux-gnu, GTK+
Version 3.22.30, cairo version 1.15.12) of 2022-01-18, built using
commit f393d0d441c3746f98007ae54341870a296bf809.



Re: [PATCH] make test: Make failure results more verbose

2022-01-21 Thread Max Nikulin

On 21/01/2022 20:33, Ihor Radchenko wrote:

Max Nikulin  writes:


I am attaching a tentative patch for Org that should make
EMACS_TEST_VERBOSE setting more transparent.


Thanks! Your patch looks cleaner.


In the meanwhile Lars fixed ERT in Emacs-29, so empty string is 
considered as false now, see https://debbugs.gnu.org/53313
Values like "no" should not be considered as false by Org makefiles, so 
I am attaching an updated version.



In addition, I am attaching a tentative hack to make ERT pretty-print
the failure reason as you wished. WDYT?


Sorry, I was not clear enough. Summary should remain single-line. There 
are pretty-printed failure reason in the main part of the log. I was 
complained concerning the following brick



  signal(ert-test-failed (((should (equal "aB " (org-test-with-parsed-
  ert-fail(((should (equal "aB " (org-test-with-parsed-data "* Headlin
  (if (unwind-protect (setq value-5061 (apply fn-5059 args-5060)) (set
  (let (form-description-5063) (if (unwind-protect (setq value-5061 (a
  (let ((value-5061 'ert-form-evaluation-aborted-5062)) (let (form-des
  (let* ((fn-5059 #'equal) (args-5060 (condition-case err (let ((signa
  (closure (t) nil (let* ((fn-5059 #'equal) (args-5060 (condition-case
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name test-org-export/get-previous-element 
  ert-run-or-rerun-test(#s(ert--stats :selector "test-org-export/get-p

  ert-run-tests("test-org-export/get-previous-element" #f(compiled-fun
  ert-run-tests-batch("test-org-export/get-previous-element")
  ert-run-tests-batch-and-exit("test-org-export/get-previous-element")
  (let ((org-id-track-globally t) (org-test-selector (if org-test-sele
  org-test-run-batch-tests("test-org-export/get-previous-element")
  eval((org-test-run-batch-tests org-test-select-re) t)
  command-line-1(("-L" "/home/ubuntu/ert" "--eval" "(setq vc-handled-b
  command-line()
  normal-top-level()


However it will be too long when pretty printed.
>From a53095fa1c6679376708dcc1a05a446c3967d914 Mon Sep 17 00:00:00 2001
From: Max Nikulin 
Date: Sat, 15 Jan 2022 22:54:30 +0700
Subject: [PATCH] make test: Make failure summary more verbose

* mk/default.mk: By default enable verbose failure summary for Emacs-28
or newer.

Set or unset EMACS_TEST_VERBOSE environment to control reporting of failure
reasons in summary since in Emacs-28 ERT switches to verbose mode even by
an empty string (fixed in Emacs-29).
---
 mk/default.mk | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/mk/default.mk b/mk/default.mk
index c8a15bdd2..804089280 100644
--- a/mk/default.mk
+++ b/mk/default.mk
@@ -32,6 +32,20 @@ TMPDIR ?= /tmp
 testdir = $(TMPDIR)/tmp-orgtest
 
 # Configuration for testing
+# Verbose ERT summary by default for Emacs-28 and above.
+# To override:
+# - Add to local.mk
+#   EMACS_TEST_VERBOSE =
+# - Export EMACS_TEST_VERBOSE environment variable with empty value
+# - Run tests as
+#   EMACS_TEST_VERBOSE= make test [OTHER_ARGUMENTS...]
+#   or as
+#   make test EMACS_TEST_VERBOSE= [OTHER_ARGUMENTS...]
+EMACS_TEST_VERBOSE ?= yes
+ifeq (,$(EMACS_TEST_VERBOSE))
+# Emacs-28 considers empty value as true, fixed in Emacs-29
+unexport EMACS_TEST_VERBOSE
+endif
 # add options before standard load-path
 BTEST_PRE   =
 # add options after standard load path
-- 
2.25.1



Re: Question Regarding CSS Stylesheets For Art Gallery Webpage Made With Org Mode

2022-01-21 Thread Kaushal Modi
Hi Samuel,

On Sun, Jan 16, 2022 at 12:06 PM Samuel Banya  wrote:
>
> I am planning to use Emacs to create Org Mode files for the few main sections 
> of my site that aren't the Art Gallery page itself.
>
> I'm trying to figure out how to get a modern Wordpress looking Org generated 
> HTML page that rivals pages like this:
>
> https://karlkopinski.com/
> https://wyliebeckert.com/
> http://www.brucepennington.co.uk/
> https://turnislefthome.com/
> https://davidmattingly.com/sketches/
> https://www.mathewborrett.com/
> https://www.stephenfabian.com/gallery

Here's my personal opinion: Org mode is great at concisely formatting
content, so I format my blog content in Org. But then I leave it up to
static site generator giants like Hugo to make the site look good. The
kind of look you want on your website could be achieved by one of the
themes: https://themes.gohugo.io/
Static site generators have tons of other benefits like putting the
right meta data, easily creating RSS, ATOM feeds, integrating
pre-generated search index, post-processing images, etc. before
uploading to the server, minifying CSS, JS, HTML, etc.

[ I am giving examples of using Hugo because that's what I use. You
can pick any static site generator and a compatible theme. ]

> Would be curious to know everyone's thoughts on this if there's a cool way to 
> do this via Org Mode :)

I would focus on:

1. Content writing in Org mode
2. Rendering/prettifying the website using CSS, templating, etc in a
static site generator.

Of course you can do everything in Org mode and many people do it, but
then you need to design CSS, JS, etc yourself.
( I am not a web designer, so I took the static site generator
approach and started learning more about CSS and templating from
available themes. )



Kaushal



Re: Exporting Org file to Html with collapsable headings

2022-01-21 Thread Max Nikulin

On 21/01/2022 19:23, Juan Manuel Macías wrote:

ZIPING CHEN writes:


I may have many things like this in the middle of the file.
** a new heading.

I wish to turn all layers of
headings in org file into collapsable headline to html.

Does anybody know a way I can accomplish this?


I think that you need to add javascript and enclose the collapsible
content in a div. 


Have a look at info "(org) JavaScript support" 
https://orgmode.org/manual/JavaScript-support.html (I have not tried 
that folding view).


HTML has headerbody elements that 
works without JS, but it will require custom exporter.


You should ensure that deep headings can not be recognized as org inline 
tasks. Check ox-html, it may has limit on number of levels that are 
exported as headings with switching to lists for deeper structures.





Re: Question Regarding CSS Stylesheets For Art Gallery Webpage Made With Org Mode

2022-01-21 Thread Samuel Banya
Hey Kaushal,

Thanks a ton for these ideas.

Yeah, the 'Art Gallery' page itself will be just the JS based project I will 
deploy, but I'll keep that in mind to just maybe roll with custom template 
static generated sites for the other sections since I think the only way to get 
close to that look and feel is to run with one of the ideas you mentioned.

Thanks again :)

Sam

On Fri, Jan 21, 2022, at 10:11 AM, Kaushal Modi wrote:
> Hi Samuel,
> 
> On Sun, Jan 16, 2022 at 12:06 PM Samuel Banya  wrote:
> >
> > I am planning to use Emacs to create Org Mode files for the few main 
> > sections of my site that aren't the Art Gallery page itself.
> >
> > I'm trying to figure out how to get a modern Wordpress looking Org 
> > generated HTML page that rivals pages like this:
> >
> > https://karlkopinski.com/
> > https://wyliebeckert.com/
> > http://www.brucepennington.co.uk/
> > https://turnislefthome.com/
> > https://davidmattingly.com/sketches/
> > https://www.mathewborrett.com/
> > https://www.stephenfabian.com/gallery
> 
> Here's my personal opinion: Org mode is great at concisely formatting
> content, so I format my blog content in Org. But then I leave it up to
> static site generator giants like Hugo to make the site look good. The
> kind of look you want on your website could be achieved by one of the
> themes: https://themes.gohugo.io/
> Static site generators have tons of other benefits like putting the
> right meta data, easily creating RSS, ATOM feeds, integrating
> pre-generated search index, post-processing images, etc. before
> uploading to the server, minifying CSS, JS, HTML, etc.
> 
> [ I am giving examples of using Hugo because that's what I use. You
> can pick any static site generator and a compatible theme. ]
> 
> > Would be curious to know everyone's thoughts on this if there's a cool way 
> > to do this via Org Mode :)
> 
> I would focus on:
> 
> 1. Content writing in Org mode
> 2. Rendering/prettifying the website using CSS, templating, etc in a
> static site generator.
> 
> Of course you can do everything in Org mode and many people do it, but
> then you need to design CSS, JS, etc yourself.
> ( I am not a web designer, so I took the static site generator
> approach and started learning more about CSS and templating from
> available themes. )
> 
> 
> 
> Kaushal
> 


Re: change the fontsize when exporting to HTML, header not really changed

2022-01-21 Thread Uwe Brauer
>>> "JMM" == Juan Manuel Macías  writes:

> Uwe Brauer writes:
>> But it did not work neither. Did you test it? I am on GNU Emacs master
>> and git master (ok several weeks old, but still recent enough I'd say)

> I hadn't seen Eric's message, but what he says makes a lot of sense: are
> you applying a separate style sheet, perhaps with a *.setup document
> that already has a header style defined? It looks like one style
> overlaps another.


No I did not, but as I said in a different message, the problem is
solved thanks to you

#+HTML_HEAD_EXTRA:  body {font-size:150%}

Was the correct setting but deleting all the others I had left


smime.p7s
Description: S/MIME cryptographic signature


Re: Exporting Org file to Html with collapsable headings

2022-01-21 Thread Tim Cross


ZIPING CHEN  writes:

> Hi,
>
> I am working on a large org file with exceptional number of subheadings. For 
> example, I may have org headings inside headings up
> to 20 or 30 layers deep.
>
> I may have many things like this in the middle of the file.
> ** a new heading.
>
> When I export the file to html, I like to export in such a way that the org 
> headings become collapsable headline in html (toggle
> switch). I spend some time search the web, and find a theme called bigblow 
> which does something close to what I want, but not
> exactly. It provide limited layer of toggle switch only. I wish to turn all 
> layers of headings in org file into collapsable headline to
> html. 
>
> Does anybody know a way I can accomplish this?
>
> Thanks a lot.
>
> Ziping


The effect you are after can be achieved using either JS and CSS or with
just CSS. Most of the CSS frameworks out there will support this
functionality. For example

bootstrap - CSS and JS
bulma - CSS only
Tailwind - CSS only

I'm pretty sure all of the above support the ability to create a
minimised version which only includes the features you want. This can
help minimise unwanted interaction between different CSS style
definitions and reduce overall size.

Personally, I prefer bulma or tailwind over bootstrap as it avoids also
having to deal with javascript and having to bundle js code with your
final output. 



Re: [PATCH] ob-plantuml: Allow setting PlantUML args for jar file

2022-01-21 Thread Dejan Josifović

On 19-Jan-22 17:54, Max Nikulin wrote:

FYI, you can customise any header arg globally. See manual page 16.3
Using Header Arguments.


info "(org) Using Header Arguments" 
https://orgmode.org/manual/Using-Header-Arguments.html


Thanks for the info. I'm still not fully proficient in org-mode so this 
(and the discussion) is very helpful.


On 18-Jan-22 14:30, Ihor Radchenko wrote:

I am not sure about this specific case. The PlantUML executable is
literally a wrapper around java call to jar. Below is the contents of
plantuml file in my system:

#!/bin/bash
gjl_package=plantuml
gjl_jar="plantuml.jar"
source /usr/share/java-config-2/launcher/launcher.bash

Unless it is any different on your side, the arguments for jar and
executable should be literally the same.


I see your point here - no need for redundant custom variables.


I realise that the current situation is kind of awkward. Maybe we should
encourage ob-* libraries to use special header args instead of
defcustoms and modify built-in libraries in this spirit. Would you be
interested to write a feature request?


This is very interesting, I will keep an eye on this discussion to 
follow up on everything. :-)


Thanks.

Regards,

--
Dejan Josifović | Дејан Јосифовић
Software engineer | Софтверски инжењер
https://theparanoidtimes.org

()  ascii ribbon campaign
/\  www.asciiribbon.org



Re: bug#53393: 29.0.50; org mode timestamp C-c C-c not updating day of week

2022-01-21 Thread No Wayman




From: "Bruce E. Robertson" 
Date: Tue, 18 Jan 2022 10:36:22 -0800


emacs -Q test.org
cursor to "CLOCK:" line, C-c C-c
total time updates but day of week does not change
contents of test.org
--
* heading
:LOGBOOK:
CLOCK: [2022-01-17 Tue 10:29]--[2022-01-19 Tue 10:29] => 48:00
:END:
--
typing C-c C-c does update total log time for line and recently 
did

update the day of the week but no long does


Confirmed:

Yodel[1] Report 2022-01-22 00:19:18
===

--8<---cut here---start->8---
(yodel
 :save "org-bug"
 :packages* org
 :post*
 (yodel-file "org-bug-test"
   :point "|"
   :with*
   "* heading"
   " :LOGBOOK:"
   " CLOCK: | [2022-01-17 Tue 10:29]--[2022-01-19 Tue 10:29]"
   " :END:" :then*
   (require 'org-clock)
   (org-clock-update-time-maybe)
   (print (buffer-string
--8<---cut here---end--->8---

STDOUT
==


Loading /tmp/org-bug/straight-bootstrap-snippet.el (source)...



"* heading
 :LOGBOOK:
 CLOCK:  [2022-01-17 Tue 10:29]--[2022-01-19 Tue 10:29] => 48:00
 :END:"


Environment
===

- emacs version: GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, 
 GTK+ Version 3.24.31, cairo version 1.17.4)

of 2022-01-13
- system type: gnu/linux

Packages


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


[1] https://www.github.com/progfolio/yodel



Re: bug#53393: 29.0.50; org mode timestamp C-c C-c not updating day of week

2022-01-21 Thread No Wayman



It looks like the correction of the day name in timestamps is 
hardcoded in `org-ctrl-c-ctrl-c':


	((or `timestamp (and `planning (guard (org-at-timestamp-p 
'lax

 (org-timestamp-change 0 'day))



`org-clock-update-time-maybe' uses a regexp to match the start and 
end times and hands those off to `org-parse-time-string' which 
does not consider the day name.