Re: BUG: org-cycle does not unfold some subtrees

2023-05-08 Thread Thomas S. Dye

Ihor Radchenko  writes:


"Thomas S. Dye"  writes:


For me, the bug bites intermittently.  I often run an Emacs
instance for more than a week before I'm bitten, so it will 
likely

be a long process to work through the packages loaded on top of
what Spacemacs loads to make a reproducer.


Others in this thread appear to be affected more frequently. So, 
you may

get lucky just by following the thread.

Also, I anticipate a problem deciding that removing a package 
has
squashed the bug; will two weeks without the bug be long 
enough?

Three?  Four or more?


You can try
M-x debug-on-variable-change  org-fold-core-style 


In case it's helpful, I set debug-on-variable-change as you 
suggested but was bitten by the bug without triggering the 
debugger.


I was alerted to the bug bite when I noticed some folded content 
after the ellipsis on two headlines, both of which folded and 
unfolded without issue (modulo the content after the ellipsis). 
In both cases, the content after the ellipsis consisted of links 
from an Org table, and just those links.  When I fold the parent 
of a misbehaving headline, the links follow the fold and show up 
after the ellipsis of the parent.  The headline that would not 
unfold did not have content after the ellipsis.


I have some ideas about what might have triggered the problem with 
links after ellipses and will check systematically when I find 
time.


Let me know if you have questions.

All the best,
Tom

--
Thomas S. Dye
https://tsdye.online/tsdye



Re: Org-mode publish: Some questions when use it for a blog

2023-05-08 Thread Sébastien Gendre
Thank you for your reply Ihor.

Ihor Radchenko  writes:



Ihor Radchenko  writes:
>
> May you please elaborate?

When a webpage is generated by `org-html-publish-to-html`, it put the
title of the document at top of the HTML content as an .

I wanted to modify it to put Author and date below this title but before
the rest of the content.


> This indicates an issue with your Org installation. Consider
> re-installing Org mode and making sure that you do not put
> (require 'org) before setting `load-path'. This issue appear in several
> scenarios, depending on the kind of installation method you are using.

I Found the origin of the problem: My publication script is launch with
an `emacs -q` command. And I had updated Org-mode for my installation of
Emacs.




But, generate a RSS feed with ox-rss [1] give me some problems. The
README is not really clear on what the Org-mode file should look. And it
seems to be done to generate RSS when all blog posts are a headline in
the same document. But on my blog, each blog post is on a different
document.

I guess, until I found a better way, I'm gonna write my RSS feed
manually with help of Yasnippet.


[1] https://github.com/BenedictHW/ox-rss



> Sébastien Gendre  writes:
>
>> I try do generate a blog with Org-mode publish. 
>>
>> I'm very impressed by the publishing tool. But as it's nice to do a
>> simple website, I have some difficulties to use it for a blog.
>
> Note that ox-publish is very basic. There is a number of third-party
> packages that simplify blog export. For example, ox-hugo. See
> https://orgmode.org/worg/org-blog-wiki.html
>
>> First, I try to customize the site map:
>>
>> * Is it possible to customize the entry without writing a function ?
>>   Something like the preamble with escaped chars (ex %t, %d) ?
>
> It must be a function. If someone comes up with a patch for this, it
> would also be welcome.
>
>> * How can I set a postamble in the sitemap different from my blog
>>   posts ?
>
> Sitemap is exported just as an ordinary .org file within the project.
> So, you can, for example, modify sitemap generator function to add
> postamble manually and set #+OPTIONS: html-postamble:nil on top to
> disable default postamble.
>
>> Secondly, how can I put the author name and publication date just at the
>> bottom of the document title ? I tried with preamble, but the preamble
>> is inserted before the document that I cannot disable.
>
> May you please elaborate?
>
>> Finally, how can I generate the RSS feed ? I tried with ox-rss, but I
>> got an error about my version of Org:
>> Error (use-package): ox-rss/:catch: Invalid function: org-assert-version
>
> This indicates an issue with your Org installation. Consider
> re-installing Org mode and making sure that you do not put
> (require 'org) before setting `load-path'. This issue appear in several
> scenarios, depending on the kind of installation method you are using.




Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-08 Thread Konstantinos Chousos
> This checks out.  I tested previews with lualatex for a bit, and it's
> about 8-10x slower than pdflatex.  One big chunk of this gap is the
> absence of precompilation, the rest appears to be inherent to lualatex.
> I'm not familiar with lualatex, so if someone knows how it can be sped
> up I'd be glad to be educated.  For now I'd recommend using pdflatex for
> LaTeX previews.

Yes, you're right. Tested pdflatex myself and the difference is like
night and day. My choice to use lualatex was based in the fact that I
write in greek as well and sometimes may need greek script in latex
fragments. But, seeing the difference in speed, both in buffer
previews and in live ones, I'll probably stick with pdflatex and just
work around the language part.

> I've had trouble getting LaTeX environments to show via eldoc in the
> echo-area, whereas eldoc-box has worked fine.  I'm making a note to
> investigate this later.

In my setup it only works if I open the eldoc buffer. But eldoc-box
doesn't work.

>> I tried setting `org-latex-preview-default-process' to `dvipng' and
>> found that previews as well appear blank. Don't know what might be the
>> problem.
>
> Is this in the context of previews or HTML exports?

Both. But with pdflatex it works.


Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-08 Thread Karthik Chikmagalur
> Yeah, it kinda works ok now. It is kinda slow, but it probably takes
> the same time as the normal previews. May the fact that I use
> `lualatex' be the culprit?

This checks out.  I tested previews with lualatex for a bit, and it's
about 8-10x slower than pdflatex.  One big chunk of this gap is the
absence of precompilation, the rest appears to be inherent to lualatex.
I'm not familiar with lualatex, so if someone knows how it can be sped
up I'd be glad to be educated.  For now I'd recommend using pdflatex for
LaTeX previews.

As a result of this issue (plus other issues with xelatex), I'm
considering adding an option to specify different LaTeX compilers for
previews and exports, with the default option continuing to be
the value of `org-latex-compiler'.

> Both `buffer' and `eldoc' work as expected. Although, when I use `eldoc' and
> use the `eldoc-box' package, nothing is shown. But, this probably isn't
> in the scope of this conversation and it's really secondary.

I've had trouble getting LaTeX environments to show via eldoc in the
echo-area, whereas eldoc-box has worked fine.  I'm making a note to
investigate this later.

> I tried setting `org-latex-preview-default-process' to `dvipng' and
> found that previews as well appear blank. Don't know what might be the
> problem.

Is this in the context of previews or HTML exports?

-Karthik



Re: org-babel-expand-call-block

2023-05-08 Thread Ihor Radchenko
Samuel Culpepper  writes:

> Hi orgmode, I thought it would be nice share a little excursion into
> babel's code expansion; nothing groundbreaking, and nobody asked, but it
> may address a more comprehensive tangling, or maybe just some ergonomics
> for copying code.

Do I understand correctly that you are trying to get #+calls to LOB
blocks expanded as usual via org-babel-expand-src-block?

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



Re: [ox-gfm] (was: org mode to github markdown)

2023-05-08 Thread Bhavin Gandhi
On Mon, 8 May 2023 at 18:35, Uwe Brauer  wrote:
>
> >>> "GdaO" == General discussions about Org-mode  writes:
>
> > Uwe Brauer  writes:
>
> >> There seems no export backend for (github) markdown
>
> > I think you are looking for "ox-gfm".
>
> Thanks, I realized this is an important pkg for my purpose (although I
> have to see how it can be included in my email export)
>
> But also I can run the function org-gfm-export-as-markdown directly, I
> would like to include this exporter directly in the usual
> org-export-dispatch but I don't now how, there is now repository or
> webapge for this package, and also no email address of the author

I think this is the package we are referring to?
https://github.com/larstvei/ox-gfm
https://list.orgmode.org/m2eh1adtye@ifi.uio.no/

> Anybody has an idea how to incldue ox-gfm into the org-export-dispatch?

The README says loading ox-gfm adds it to the org-export-dispatch, I
tried doing (require 'ox-gfm) and it started showing up. But I don't
know if there is any other/better way to do that.

-- 
Bhavin Gandhi (bhavin192) | https://geeksocket.in



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

2023-05-08 Thread Ihor Radchenko
Marcin Borkowski  writes:

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

"+property=\"value\""

I just tried #+BEGIN: clocktable :scope subtree :match "+ID=\"Organization\""
and it worked.

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



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



Re: [BUG] Tangling of clojure code blocks is broken [9.7 (9.7-??-0807107 @ /Users/ag/.emacs.d/.local/straight/build-30.0.50/org/)]

2023-05-08 Thread Ihor Radchenko
Daniel Kraus  writes:

> The problem is that or :results value (/the default) I only want the
> result of the last expression and I do that `binding` of stdout to surpress
> all other output.
> But I guess during tangle this should just be ignored?
> Is there a simple way to find out if `org-babel-execute:clojure` is
> executed or tangled?

You can just move this extra logic arranging :results to
org-babel-execute:clojure.

> If it should be ignored on tangle, what about the :var defines.

:var defines are affecting how the code is written. :results should not.
So, :var is expected to affect tangling.
If necessary, code block expansion can be disabled via :no-expand header
argument:

   By default Org expands code blocks during tangling.  The ‘no-expand’
header argument turns off such expansions.  Note that one side-effect of
expansion by ‘org-babel-expand-src-block’ also assigns values (see *note
Environment of a Code Block::) to variables.  Expansions also replace
noweb references with their targets (see *note Noweb Reference
Syntax::).  Some of these expansions may cause premature assignment,
hence this option.  This option makes a difference only for tangling.
It has no effect when exporting since code blocks for execution have to
be expanded anyway.

> We recently discussed this for ob-scheme where there was a problem with the
> `let` wrapper.
> Is it ok or expected that a the tangled code is wrapped in a let block?
> Should I change it to a global `def`?

I think that keeping `let' should be fine as long as it does not break
things. In the previous discussion, the whole issue was that `let' was
not always safe in that particular lisp dialect.

We just need to make sure that it is documented.

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



Re: An Org-mode-based blogging engine?

2023-05-08 Thread Dr. Arne Babenhauserheide

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.

You can find it on https://hg.sr.ht/~arnebab/draketo/browse

- Emacs-tooling:
  https://hg.sr.ht/~arnebab/draketo/browse/draketo.el?rev=tip
- Publishing setup:
  https://hg.sr.ht/~arnebab/draketo/browse/setup.el.in?rev=tip
- Makefile: https://hg.sr.ht/~arnebab/draketo/browse/Makefile.am?rev=tip
- Description: https://hg.sr.ht/~arnebab/draketo/browse/README?rev=tip
- Example Template:
  https://hg.sr.ht/~arnebab/draketo/browse/org-templates/level-1.org?rev=tip
- Page with its own RSS-feed: 
https://hg.sr.ht/~arnebab/draketo/browse/politik/kommentare.org?rev=tip

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

Check :-)

> 2. I want to publish a whole set of HTML files from a single Org mode
> file.

I don’t have that. Instead I have the function M-x draketo-go that
enables quick ido-completion for all sites.

> 3. I want to be able to fully customize the HTML produced.

Mostly yes. See https://www.draketo.de

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

I just use
#+html: 
...
#+html: 

Also @@html:@@ ... @@html:@@

or

#+begin_kasten

#+end_kasten

(custom block with its own shortcut and style)

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de


signature.asc
Description: PGP signature


[ox-gfm] (was: org mode to github markdown)

2023-05-08 Thread Uwe Brauer
>>> "GdaO" == General discussions about Org-mode  writes:

> Uwe Brauer  writes:

>> There seems no export backend for (github) markdown

> I think you are looking for "ox-gfm".

Thanks, I realized this is an important pkg for my purpose (although I
have to see how it can be included in my email export)

But also I can run the function org-gfm-export-as-markdown directly, I
would like to include this exporter directly in the usual
org-export-dispatch but I don't now how, there is now repository or
webapge for this package, and also no email address of the author

Anybody has an idea how to incldue ox-gfm into the org-export-dispatch?

Thanks

Uwe Brauer 

-- 
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: org mode to github markdown

2023-05-08 Thread Uwe Brauer
>>> "MN" == Max Nikulin  writes:

> On 08/05/2023 02:45, Ihor Radchenko wrote:
>> In particular, vanilla
>> markdown allow direct HTML fragments, which are disabled in
>> GitHub/Reddit/many other websites for security reasons.

> GitHub allows some HTML tags. I have noticed e.g. floating  and
>  collapsed fragments in
> https://github.com/org-roam/org-roam/blob/main/README.md
> see
> https://github.com/org-roam/org-roam/blob/main/README.md?plain=1

But enumerated or bullet list, bold, underline and italics and  more
importantly source code follow a different markup syntax, isn't



> P.S. GitHub allows raw  in .org files as well:
> https://github.com/alphapapa/org-ql/blob/master/README.org?plain=1




-- 
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: [PATCH] Add tests for ob-haskell (GHCi)

2023-05-08 Thread Ihor Radchenko
Bruno Barbier  writes:

> Let me know if you see further improvement before pushing this.

Thanks for the update!

I can see that you limited the tests scope to :session blocks.
Would it be possible to extend the existing tests to :compile yes case?
>From a glance, it does not look like you need to change much - Haskell
behaviour should be similar with or without ghci.

> From 9972b926f55cb970e0b520f8726a3684118017b6 Mon Sep 17 00:00:00 2001
> From: Ihor Radchenko 
> Date: Fri, 24 Mar 2023 11:20:22 +0100
> Subject: [PATCH 02/13] org-babel-haskell-initiate-session: Remove secondary
>  prompt
>
> * lisp/ob-haskell.el (org-babel-haskell-initiate-session): Set
> secondary prompt to "".  If we do not do this, org-comint may treat
> secondary prompts as a part of output.

> +(sleep-for 0.25)
> +;; Disable secondary prompt.

It would be useful to explain the purpose of disabling the secondary
prompt in the source code comment itself, not just in the commit
message. It will improve readability.

> From 352d18399961fedc45cc2d64007016426e1ecd40 Mon Sep 17 00:00:00 2001
> From: Ihor Radchenko 
> Date: Fri, 24 Mar 2023 11:26:00 +0100
> Subject: [PATCH 04/13] * testing/lisp/test-ob-haskell-ghci.el: Enable fixed

I do not see PATCH 03/13 in the attachments.

> From 7d66cff5cc23bb786cb2843f4326d2869512ccac Mon Sep 17 00:00:00 2001
> From: Bruno BARBIER 
> Date: Sat, 25 Mar 2023 10:06:44 +0100
> Subject: [PATCH 06/13] ob-haskell: Implement sessions
>
> +  (unless session-name
> +;; As haskell-mode is using the buffer name "*haskell*", we stay
> +;; away from it.
> +(setq session-name (generate-new-buffer-name "*ob-haskell*")))
> +  (let ((session (get-buffer session-name)))

session is not a buffer or nil, if no buffer named session-name exists.

> +(save-window-excursion
> +  (or (org-babel-comint-buffer-livep session)

Below, (org-babel-comint-buffer-livep session) is nil, which implies
either that session is nil, does not exist, not live, or does not have a
process attached.

> +  (let ((inferior-haskell-buffer session))
> +(when (and (bufferp session) (not (org-babel-comint-buffer-livep 
> session)))

(not (org-babel-comint-buffer-livep session)) is always t here.
Also, session may be a killed buffer object. It is still a buffer, but
not usable. See `buffer-live-p'.

> +  (when (bufferp "*haskell*") (error "Conflicting buffer 
> '*haskell*', rename it or kill it."))
> +  (with-current-buffer session (rename-buffer "*haskell*")))

So, you are now renaming the unique session buffer back to "*haskell*".
And never rename it back to expected :session . Users might be confused.

> +(save-window-excursion
> +  ;; We don't use `run-haskell' to not popup the buffer.
> +  ;; And we protect default-directory.
> +  (let ((default-directory default-directory))
> +(inferior-haskell-start-process))

This is a workaround for a nasty side effect of running
`inferior-haskell-start-process'. We should report this to haskell-mode
developers, leaving appropriate comment in the code.

> +  (sleep-for 0.25)
> +  (setq session inferior-haskell-buffer)
> +  (with-current-buffer session (rename-buffer session-name))

This generally looks like a brittle workaround for inner workings of
haskell-mode. I recommend sending an email to haskell-mode devs,
requesting multiple session support. Otherwise, this whole code
eventually be broken.

> Subject: [PATCH 10/13] * testing/lisp/test-ob-haskell-ghci.el: Test output
>  without EOL
> ...
> +(ert-deftest ob-haskell/output-without-eol-1 ()
> +  "Cannot get output from incomplete lines, when entered line by line."
> +  :expected-result :failed
> +  (should (equal "123"
> + (test-ob-haskell-ghci ":results output" "
> +  putStr(\"1\")
> +  putStr(\"2\")
> +  putStr(\"3\")
> +  putStr(\"\\n\")
> +"

May you explain more about this bug?

> Subject: [PATCH 11/13] lisp/ob-haskell.el: Fix how to use sessions
>
> +  (org-babel-haskell-with-session

This kind of names are usually dedicated to macro calls. But
`org-babel-haskell-with-session' is instead a function. I think a macro
will be better. And you will be able to get rid of unnecessary lambda.

> +   params
> +   (lambda (session)
> + (cl-labels
> + ((csend (txt)
> +  (eom ()
> +  (with-output (todo)

When using `cl-labels', please prefer longer, more descriptive function
names. These functions do not have a docstring and I now am left
guessing and reading the function code repeatedly to understand the
usage.

> +  (full-body (org-babel-expand-body:generic
> +  body params
> +  (org-babel-variable-assignments:haskell params)))

I think we want `org-babel-expand-src-block' here instead of using
semi-internal ob-core.el parts.

> -(let ((buffer 

Re: An Org-mode-based blogging engine?

2023-05-08 Thread Martin Steffen



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.

Martin






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

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

Marcin> Here are my requirements, in no particular order.

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

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

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

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

Marcin> Any thought, suggestions, recommendations?

Marcin> -- Marcin Borkowski http://mbork.pl




Re: [BUG] Tangling of clojure code blocks is broken [9.7 (9.7-??-0807107 @ /Users/ag/.emacs.d/.local/straight/build-30.0.50/org/)]

2023-05-08 Thread Daniel Kraus
Hi!

Ag  writes:

> Setting :results output header makes it work as expected. Without it -
> it's as I described, wrapped.

I can reproduce the bug.

The problem is that or :results value (/the default) I only want the
result of the last expression and I do that `binding` of stdout to surpress
all other output.
But I guess during tangle this should just be ignored?
Is there a simple way to find out if `org-babel-execute:clojure` is
executed or tangled?

If it should be ignored on tangle, what about the :var defines.
We recently discussed this for ob-scheme where there was a problem with the
`let` wrapper.
Is it ok or expected that a the tangled code is wrapped in a let block?
Should I change it to a global `def`?

Thanks for the bug report.

PS, a minimal repo is

minimal-org-clj.el:
#+BEGIN_SRC emacs-lisp
;;; Minimal setup to load latest `org-mode'.

;; Activate debugging.
(setq debug-on-error t
  debug-on-signal nil
  debug-on-quit nil)

;; Add latest Org mode to load path.
(add-to-list 'load-path (expand-file-name "/home/daniel/.emacs.d/lib/org/lisp"))

(org-babel-do-load-languages
 'org-babel-load-languages
 '((clojure . t)))
#+END_SRC

/usr/bin/emacs -Q -l minimal-org-clj.el

And then tangle something like:

#+begin_src clojure :backend babashka :tangle foo.clj
{:foo :bar}
#+end_src

Cheers,
  Daniel



Re: An Org-mode-based blogging engine?

2023-05-08 Thread Ihor Radchenko
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

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

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



Re: An Org-mode-based blogging engine?

2023-05-08 Thread General discussions about Org-mode.
Hello Marcin,

I’m on mobile, so please excuse my brevity and top-posting.  Did you check the 
org website?  I remember from my orgweb translation that there is one 
particular page which outlines all the different tools that integrate org with 
blogging.  Maybe those will give you some inspirations. 

--
Best, 


RY

> On May 8, 2023, at 16:18, Marcin Borkowski  wrote:
> 
> 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  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.
> 
> Any thought, suggestions, recommendations?
> 
> -- 
> 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: [BUG] Tangling of clojure code blocks is broken [9.7 (9.7-??-0807107 @ /Users/ag/.emacs.d/.local/straight/build-30.0.50/org/)]

2023-05-08 Thread Ihor Radchenko
Ag Ibragimov  writes:

> I'm using the latest, org-version reports "Org mode version 9.7 
> (9.7-??-fdea200 ..."

Please detail the steps you tried. At least "version 9.7" does not look
right because the latest version is labeled "9.7-pre".

Also, provide the clojure backend you are using.

> This particular line here is causing the problem I described:
>
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/ob-clojure.el#n191
>
> ```emacs-lisp
> (if cljs-p
> "(binding [cljs.core/*print-fn* (constantly nil)]"
>   "(binding [*out* (java.io.StringWriter.)]") ;;; <- this one
> ```

Maybe, but please provide more data to reproduce the problem on our side.

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