Re: Question Regarding Creating HTML Style Buttons With Org Mode

2022-02-19 Thread Juan Manuel Macías
Samuel Banya writes:

> To clarify, did you evaluate that code block on the org mode docs
> itself?

The code must be evaluated *before* using that new type of link, or saved
to your ~/.emacs. You can simply evaluate it in your `scratch' buffer:

  (org-link-set-parameters "button"
   :face '(:foreground "green4" :underline t)
   :follow (lambda (path) (browse-url path))
   :export (lambda (path desc backend)
 (when (eq backend 'html)
   (format "%s" path desc

If you want to pass the class or id 'manually' to each link, and thus
have more control, you can evaluate this other version, where the class
or id would be added at the end of the link description, after (for
example) "!style":

  (org-link-set-parameters "button"
   :face '(:foreground "green4" :underline t)
   :follow (lambda (path) (browse-url path))
   :export (lambda (path desc backend)
 (when (eq backend 'html)
   (let* ((style (if (string-match 
"\\(!style .+\\)" desc)
 (match-string 1 desc)
   ""))
  (desc (replace-regexp-in-string 
style "" desc)))
 (format "%s" style path desc)

Example:

[[button:http://www.sambanya.com/artgallery.html][Art Gallery Page Link !style 
class="mybutton"]]

== HTML ==>


http://www.sambanya.com/artgallery.html";>Art Gallery Page Link 



> I ask because if I try to evaluate it, aka 'C-c C-c' on the
> '#begin_src' block, nothing happens.

When you evaluate the code and add the new link type 'button', does it
appear in your document with the face defined for that link: green,
underlined? Have you tried testing it on a clean Emacs/Org?

Best regards,

Juan Manuel 



Re: Question Regarding Creating HTML Style Buttons With Org Mode

2022-02-19 Thread Juan Manuel Macías
Juan Manuel Macías writes:

> If you want to pass the class or id 'manually' to each link, and thus
> have more control, you can evaluate this other version, where the class
> or id would be added at the end of the link description, after (for
> example) "!style":

PS: Sorry, this is the correct code:

  (org-link-set-parameters "button"
   :face '(:foreground "green4" :underline t)
   :follow (lambda (path) (browse-url path))
   :export (lambda (path desc backend)
 (when (eq backend 'html)
   (let ((style (if (string-match 
"\\(!style\\)\\(.+\\)" desc)
 (match-string 2 desc)
   ""))
  (desc (replace-regexp-in-string 
"\\(!style .+\\)" "" desc)))
 (format "%s" style
   path desc)


Example:

[[button:http://www.sambanya.com/artgallery.html][Art Gallery Page Link !style 
class="mybutton"]]

== HTML ==>


http://www.sambanya.com/artgallery.html";>Art Gallery Page Link 





Re: Is It Possible To Target ID And Classes With Org Mode Exports?

2022-02-19 Thread Ihor Radchenko
"Samuel Banya"  writes:

> I'm curious, is it possible to specify a 'ID' or 'Class' attribute for a 
> specific header, or link that you create in Org Mode?
>
> Asking since I'm in the process of modifying a CSS stylesheet for a site, but 
> would want more granular control to possible make containers with ID or 
> classes, but it doesn't look possible in Org Mode by default.

For headline class attribute, see Org manual -> Exporting -> HTML Export -> CSS
support (HTML_HEADLINE_CLASS property). For headline ID, you can set
CUSTOM_ID property.

Links are discussed in
https://list.orgmode.org/87mtinb2vq@posteo.net/T/#t

Best,
Ihor



Re: [BUG] Child's visibility property is overridden by parent's [9.5.2 (9.5.2-gbc8c3e @ /home/john/.emacs.d/straight/build/org/)

2022-02-19 Thread Ihor Radchenko
John Mathena  writes:

Confirmed.

> It seems like the visibility property on a parent heading overrides
> the visibility property on a child heading - is this expected? e.g.
> when I have the raw text:
>
> * Foo
> :PROPERTIES:
> :VISIBILITY: content
> :END:
> ** Bar
> :PROPERTIES:
> :VISIBILITY: folded
> :END:
> *** Baz
>
> ... I would expect (and would like) to see
>
> * Foo...
>  * Bar...
>
> that is, where Foo shows only the content below it, and Bar has all of
> its children folded. Instead, I get
>
> * Foo...
>  * Bar...
>   * Baz...

The behaviour you observe is because
org-cycle-set-visibility-according-to-property explicitly ignores all
the VISIBILITY properties in all the descendent headings of a heading
with VISIBILITY property. i.e. VISIBILITY property of Bar is ignored
when its ancestor Foo has VISIBILITY property.

This behaviour is not documented in the manual:

>>Furthermore, any entries with a ‘VISIBILITY’ property (see *note
>> Properties and Columns::) get their visibility adapted accordingly.
>> Allowed values for this property are ‘folded’, ‘children’, ‘content’,
>> and ‘all’.

I would say that the existing behaviour is a confusing and might be
considered as a bug. However, it may not always be straightforward how
to deal with different combinations of VISIBILITY setting for
ancestor/descendent headings. Consider the following example:

* Foo
:PROPERTIES:
:VISIBILITY: folded
:END:
** Bar
:PROPERTIES:
:VISIBILITY: content
:END:
*** Baz

Foo is supposed to be folded, but it is unclear how to process Bar.
Should Bar's contents be visible? Should it be folded?

Best,
Ihor




Re: Is It Possible To Target ID And Classes With Org Mode Exports?

2022-02-19 Thread Samuel Banya
Hey there,

I used 'C-h r' and found the man page for this under '13.9.12 CSS support' for 
the Org Mode manual.

Here's the section:
*   In order to add styles to a sub-tree, use the ‘HTML_CONTAINER_CLASS’**
*
*property to assign a class to the tree.  In order to specify CSS styles**
*
*for a particular headline, you can use the ID specified in a ‘CUSTOM_ID’**
*
*property.  You can also assign a specific class to a headline with the**
*
*‘HTML_HEADLINE_CLASS’ property.*

Thanks for providing this, as I had no idea you can do this, great to know!

Will use this to create some 'flexbox' elements using containers with this in 
mind :)

Thanks again,

Sam

On Sat, Feb 19, 2022, at 8:22 AM, Ihor Radchenko wrote:
> "Samuel Banya"  writes:
> 
> > I'm curious, is it possible to specify a 'ID' or 'Class' attribute for a 
> > specific header, or link that you create in Org Mode?
> >
> > Asking since I'm in the process of modifying a CSS stylesheet for a site, 
> > but would want more granular control to possible make containers with ID or 
> > classes, but it doesn't look possible in Org Mode by default.
> 
> For headline class attribute, see Org manual -> Exporting -> HTML Export -> 
> CSS
> support (HTML_HEADLINE_CLASS property). For headline ID, you can set
> CUSTOM_ID property.
> 
> Links are discussed in
> https://list.orgmode.org/87mtinb2vq@posteo.net/T/#t
> 
> Best,
> Ihor
> 


Re: processing of babel blocks and select_tags

2022-02-19 Thread Eric S Fraga
Dear Jeremie,

On Saturday, 19 Feb 2022 at 08:54, Jeremie Juste wrote:
> If I change eval: no_export to :eval no, Only the =Description= section
> is evaluated and exported. 

Interesting.  I hadn't considered trying just "no".  What a difference
this makes!  The book compiles in seconds instead of minutes.  Thank
you.

It does beg the question: why do "no" and "no-export" behave differently
on export?  Something to explore in due course but I'm happy for now.

> I have a small helper function that toggle eval yes or no at the file
> level, if it is of any help.

Very useful; always good to have little snippets like this.

Thanks again,
eric

-- 
: Eric S Fraga, with org release_9.5.2-385-g37d8bc in Emacs 29.0.50



ox-taskjuggler missing

2022-02-19 Thread Greg Sullivan
Trying to export to taskjuggler (tj3) to get a gantt chart as in this
description
.
But I can't find the taskjuggler exporter.

emacs-version
=> GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60
Version 10.14.6 (Build 18G95)) of 2021-11-18

org-version
=> Org mode version 9.4.4 (release_9.4.4 @
/Applications/Emacs.app/Contents/Resources/lisp/org/)

(require 'ox-taskjuggler)
=> Debugger entered--Lisp error: (file-missing "Cannot open load file" "No
such file or directory" "ox-taskjuggler")

There does not seem to be an "ox-taskjuggler" on melpa
.

I couldn't find any notes about taskjuggler export explicitly being removed
from the standard org distribution.
Do others with emacs 27.2 and org-mode version 9.4.4 have ox-taskjuggler
available?
If so, I must have messed up my installation.

Thanks for any guidance.
-- Greg

--
Greg Sullivan   email: gr...@sulliwood.org   cell: 617-417-4746
70 Pigeon Hill Street, Rockport, MA 01966


Re: ox-taskjuggler missing

2022-02-19 Thread Kyle Meyer
Greg Sullivan writes:

> Trying to export to taskjuggler (tj3) to get a gantt chart as in this
> description
> .
> But I can't find the taskjuggler exporter.
>
> emacs-version
> => GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60
> Version 10.14.6 (Build 18G95)) of 2021-11-18
>
> org-version
> => Org mode version 9.4.4 (release_9.4.4 @
> /Applications/Emacs.app/Contents/Resources/lisp/org/)

Hmm, based on the version and location, that's presumably the builtin
Org that shipped with Emacs 27.2.  ox-taskjuggler.el has never shipped
with Emacs, so you must have been pulling it in from somewhere else.

Anyway, ox-taskjuggler.el along with the rest of contrib/ was removed
from the main Org repo in 0555665bb (Remove the contrib/ directory,
2021-05-03), part of the 9.5 release.

It's hosted at  for the time being
and is available from .



Re: ox-taskjuggler missing

2022-02-19 Thread Tim Cross


Greg Sullivan  writes:

> Trying to export to taskjuggler (tj3) to get a gantt chart as in this 
> description.
> But I can't find the taskjuggler exporter.
>
> emacs-version
> => GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 
> Version 10.14.6 (Build 18G95)) of 2021-11-18
>
> org-version
> => Org mode version 9.4.4 (release_9.4.4 @ 
> /Applications/Emacs.app/Contents/Resources/lisp/org/)
>
> (require 'ox-taskjuggler)
> => Debugger entered--Lisp error: (file-missing "Cannot open load file" "No 
> such file or directory" "ox-taskjuggler")
>
> There does not seem to be an "ox-taskjuggler" on melpa.
>
> I couldn't find any notes about taskjuggler export explicitly being removed 
> from the standard org distribution.
> Do others with emacs 27.2 and org-mode version 9.4.4 have ox-taskjuggler 
> available?
> If so, I must have messed up my installation.
>
> Thanks for any guidance.
> -- Greg


TaskJuggler is not part of org mode. It is one of the packages in the
org contgrib package, which is now distributed via the nongnu elpa
repository (see https://elpa.nongnu.org/nongnu/).

I haven't used it in a long time and I don't think anyone is maintaining
it, so don't know how well it is working with current org versions.





Re: ox-taskjuggler missing

2022-02-19 Thread Ken Mankoff
This might be an alternative option

https://plantuml.com/gantt-diagram

Please excuse brevity. Sent from tiny pocket computer with non-haptic
feedback keyboard.

On Sat, Feb 19, 2022, 18:18 Tim Cross  wrote:

>
> Greg Sullivan  writes:
>
> > Trying to export to taskjuggler (tj3) to get a gantt chart as in this
> description.
> > But I can't find the taskjuggler exporter.
> >
> > emacs-version
> > => GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60
> Version 10.14.6 (Build 18G95)) of 2021-11-18
> >
> > org-version
> > => Org mode version 9.4.4 (release_9.4.4 @
> /Applications/Emacs.app/Contents/Resources/lisp/org/)
> >
> > (require 'ox-taskjuggler)
> > => Debugger entered--Lisp error: (file-missing "Cannot open load file"
> "No such file or directory" "ox-taskjuggler")
> >
> > There does not seem to be an "ox-taskjuggler" on melpa.
> >
> > I couldn't find any notes about taskjuggler export explicitly being
> removed from the standard org distribution.
> > Do others with emacs 27.2 and org-mode version 9.4.4 have ox-taskjuggler
> available?
> > If so, I must have messed up my installation.
> >
> > Thanks for any guidance.
> > -- Greg
>
>
> TaskJuggler is not part of org mode. It is one of the packages in the
> org contgrib package, which is now distributed via the nongnu elpa
> repository (see https://elpa.nongnu.org/nongnu/).
>
> I haven't used it in a long time and I don't think anyone is maintaining
> it, so don't know how well it is working with current org versions.
>
>
>
>


Bug: SCHEDULED's end time wrong [9.5.2 (9.5.2-gfbff08 @ /Users/liutos/.emacs.d/elpa/org-9.5.2/)]

2022-02-19 Thread Liutos
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.


Assume there is an entry as simple as following

* a simple entry

Move the cursor on the entry, then press C-c C-s for setting its
SCHEDULED property. Then type `23:59+0:30` and press Enter key. The
resulting SCHEDULED property will be an ill-formed value such as
`<2022-02-19 Sat 23:59-24:29>`, which will cause error in org agenda.

Emacs  : GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS
appkit-1671.60 Version 10.14.6 (Build 18G95))
 of 2020-08-12
Package: Org mode version 9.5.2 (9.5.2-gfbff08 @
/Users/liutos/.emacs.d/elpa/org-9.5.2/)


Re: Bug: SCHEDULED's end time wrong [9.5.2 (9.5.2-gfbff08 @ /Users/liutos/.emacs.d/elpa/org-9.5.2/)]

2022-02-19 Thread Ihor Radchenko
Liutos  writes:

> Assume there is an entry as simple as following
>
> * a simple entry
>
> Move the cursor on the entry, then press C-c C-s for setting its
> SCHEDULED property. Then type `23:59+0:30` and press Enter key. The
> resulting SCHEDULED property will be an ill-formed value such as
> `<2022-02-19 Sat 23:59-24:29>`, which will cause error in org agenda.

Could you clarify what kind of error is triggered?
<2022-02-19 Sat 23:59-24:29> is a perfectly valid date range format,
which should be handled by org-agenda without issues.

Best,
Ihor



Re: [BUG] Questionmarks in org-agenda instead of file names [9.5.2 (9.5.2-g3154c2 @ /Users/eugr/.emacs.d/straight/build/org/)]

2022-02-19 Thread Ihor Radchenko
Eugene Rakhmatulin  writes:

> Well, that happened again. See the backtrace below.

I recently managed to find a reproducer when question marks wrongly
appear in category. Just pushed the fix to main (c5a0113367). Can you
try again and let me know if it is fixes your problem?

Best,
Ihor