Re: Folding headings which contain only blank lines

2020-10-16 Thread Kyle Meyer
Mikhail Skorzhisnkii writes:

> Hi,
>
> Patch ee3c3b554799c9f0fbe387848cd9eec7e9ab9d95 breaks unfolding 
> when
> org-cycle-separator-lines set to -1.
[...]
> Unfolding will not unfold Test1 with 
> ee3c3b554799c9f0fbe387848cd9eec7e9ab9d95 applied. Reverting this 
> patch makes it working back. Is there are any other way to fix 
> this? Or may be this can be made as a customisation option?

A fix is certainly in order, and there is some discussion at
https://orgmode.org/list/CAJj=8EFJXFu9ZQ11cO24AAu=1jykW2Zr+=R4FLuKG=bljfu...@mail.gmail.com/T/#u

In that thread (), I
was trying to find an example of the issue fixed by ee3c3b55.  Dmitrii,
did ee3c3b55 solve the issue on you reported?



Re: from headers to tables, wrap long lines automatically

2020-10-16 Thread Axel Kielhorn
Hallo Uwe,

> Please look at this the resulting table has a very long entry. How could
> I force a line break? Of course I can go to the table and wrap the line,
> but this is not what I want.
> 
> Thanks 
> 
> Uwe Brauer 
> 
> #+begin_src 
> *   University Göttingen
>   :PROPERTIES:
>   :COLUMNS:  %10IP(IP) %10TIT(Title) %17Date(Date) 
>   :ID:   Issues
>   :END:
> 
> ** Grant 123456
>   :PROPERTIES:
>   :IP:   Bernhard Riemann
>   :TIT:  The final and most convincing proof the the Riemann Hypothesis 
> by very very elementary methods. 
>   :DATE: January 1859-Today
>   :END:
> 

If you are exporting to LaTeX you could use something like:

#+attr_latex: :align lllp{3.5cm}  

> #+TBLNAME: ucm
> #+BEGIN: columnview :hlines 1 :indent nil :format "%50ITEM(Project) %5IP(IP) 
> %12Date %5TIT(Titule)"
> | Project  | IP   | Date   | Titule   
>   
>  |
> |--+--++-|
> | University Göttingen |  ||  
>   
>  |
> | Grant 123456 | Bernhard Riemann | January 1859-Today | The final 
> and most convincing proof the the Riemann Hypothesis by very very elementary 
> methods. |
> #+END
> #+end_src

Greetings
Axel


Re: Deadline w/o time not showing on daily agenda

2020-10-16 Thread David Masterson
Kyle Meyer  writes:

> David Masterson writes:
>
>> Is there a way to get tasks with a deadline that doesn't have a time
>> (just a day) to show on the daily agenda?  Tasks w/ timed deadline do
>> show on the daily agenda.
>
> Could you provide a minimal example that shows the issue?

Ah.  I think I see the problem.  I'm using org-super-agenda and it seems
to have a different definition of the time-grid that doesn't include
deadlines and scheduled items,  I confused it with the base time-grid.

Thanks.
-- 
David Masterson



Re: [PATCH] org-plot abstractions and extension

2020-10-16 Thread TEC



Hello all,

I'm still hoping that someone might get back to me ... eventually,
so here's another bump.

Timothy.

TEC  writes:

Hello everyone. Just in case this has slipped through the cracks 
/

fallen under the radar --- here's a little bump.

Timothy.

TEC  writes:

Oooops, I've just noticed my patch attachment re-send was only 
addressed

to Bastien (maybe this is why I haven't heard anything?).
This is what I get for mixing mail clients and not paying 
attention

I guess 😅.

If someone would be willing to have a look through my work, and 
comment

- that would be fantastic.

I'd love to get my code into shape to be merged :)

All the best,

Timothy.





Re: [Share] collect some idea about auto eval code when TAB expand headline

2020-10-16 Thread stardiviner


Jeremie Juste  writes:

> Hello,
>
> I don't see very clearly how you want to use the code.
> (It might well be because of my lack of skills)
>
> Could you give a usage example?

Aha, I forget to copy an example here.

It looks like this.

#+begin_src org
,* 《三生三世 十里桃花》  :LOG:TV:
  :PROPERTIES:
  :EVAL: src_sh{mpg123 "三生三世 十里桃花/杨宗纬 张碧晨 - 凉凉.mp3"} 
  :END:

#+end_src

>
> Best regards,
>
> Jeremie
>
>
> On Friday, 16 Oct 2020 at 13:01, stardiviner wrote:
>> I write an elisp config for Org Mode to auto evaluate inline source block in 
>> property "EVAL".
>>
>> #+begin_src emacs-lisp
>> (defcustom org-property-eval-keywords-list '("EVAL")
>>   "A list of property keywords for evaluate code."
>>   :type 'list
>>   :safe #'listp
>>   :group 'org)
>>
>> (defun org-property-eval-code (&optional state)
>>   "Evaluate Org inline source block in property value."
>>   (when (memq state '(children subtree))
>> (if-let ((inline-src-block (org-entry-get nil "EVAL" nil)))
>> (with-temp-buffer
>>   (insert inline-src-block)
>>   (goto-char (point-min))
>>   (require 'ob-async nil t)
>>   (setq-local org-babel-default-inline-header-args
>>   '((:results . "silent") (:async . t)))
>>   (let* ((context (org-element-context))
>>  (src-block-info (org-babel-get-src-block-info nil context))
>>  (type (org-element-type context)))
>> (when (eq type 'inline-src-block)
>>   ;; ob-async: `org-babel-execute-src-block:async'
>>   (org-babel-execute-src-block nil src-block-info)))
>>
>> (add-hook 'org-cycle-hook #'org-property-eval-code)
>> #+end_src
>>
>> A question:
>>
>> How to get all property keywords under headline? I want to use ~member~ to 
>> detect
>> whether property keywords has member in defined custom list
>> ~org-property-eval-keywords-list~.
>>
>> Second question:
>>
>> Do you have any good idea or suggest about this?
>>
>> Thanks for sharing your idea.


-- 
[ 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: should be

2020-10-16 Thread Tim Cross


This one is a little 'tricky'. The  tag means emphasis and is not
the same as underline (browsers are free to 'interpret' emphasis as
anything which will emphasise the text from surrounding text, which
could be bold, italic, underline or a combination. If we changed
underline to  tags, I'm sure we would get a post about text not
being underlined in html export.

There use to be a  tag for underline, but that has been replaced by
'unarticulated text' and it is recommended to now use CSS text
decoration properties to do underline.

On the other hand, I don't think Emacs' EWW/shr support the CSS text
decoration properties, so I'm not sure if you will get underlined text
when viewing org HTML in Emacs EWW.

The real challenge here is in how to map org mode specific attributes
such as italic, underline and bold to HTML's semantic tags of ,
 etc. In hindsight, it probably would have been better for org
to have used sematnic markup types, leaving it to each exporter to
interpret how the different semantic types map to character types.

One solution could be to make all of them CSS classes, have a default
CSS for italic, bold, underline, code etc. Users could then add their
own CSS to render each as they preferred when not happy with the defaults. 

Pankaj Jangid  writes:

> For this org mode text:
>
> #+begin_src org
> - This text is /emphasized/
> - This text is *in bold*
> - This text is _underlined_
> - This text uses =a teletype font=
> #+end_src
>
> the follow is the HTML output:
>
> #+begin_src
> 
> This text is emphasized
> This text is in bold
> This text is underlined
> This text uses a teletype font
> 
> #+end_src
>
> In case of /italics/, CSS class is used whereas for other formatting
> cases native HTML elements are used. Shouldn't the _underline_ be
> converted into  tags?
>
> Regards


-- 
Tim Cross



Re: [Share] collect some idea about auto eval code when TAB expand headline

2020-10-16 Thread Jeremie Juste


Hello,

I don't see very clearly how you want to use the code.
(It might well be because of my lack of skills)

Could you give a usage example?

Best regards,

Jeremie


On Friday, 16 Oct 2020 at 13:01, stardiviner wrote:
> I write an elisp config for Org Mode to auto evaluate inline source block in 
> property "EVAL".
>
> #+begin_src emacs-lisp
> (defcustom org-property-eval-keywords-list '("EVAL")
>   "A list of property keywords for evaluate code."
>   :type 'list
>   :safe #'listp
>   :group 'org)
>
> (defun org-property-eval-code (&optional state)
>   "Evaluate Org inline source block in property value."
>   (when (memq state '(children subtree))
> (if-let ((inline-src-block (org-entry-get nil "EVAL" nil)))
> (with-temp-buffer
>   (insert inline-src-block)
>   (goto-char (point-min))
>   (require 'ob-async nil t)
>   (setq-local org-babel-default-inline-header-args
>   '((:results . "silent") (:async . t)))
>   (let* ((context (org-element-context))
>  (src-block-info (org-babel-get-src-block-info nil context))
>  (type (org-element-type context)))
> (when (eq type 'inline-src-block)
>   ;; ob-async: `org-babel-execute-src-block:async'
>   (org-babel-execute-src-block nil src-block-info)))
>
> (add-hook 'org-cycle-hook #'org-property-eval-code)
> #+end_src
>
> A question:
>
> How to get all property keywords under headline? I want to use ~member~ to 
> detect
> whether property keywords has member in defined custom list
> ~org-property-eval-keywords-list~.
>
> Second question:
>
> Do you have any good idea or suggest about this?
>
> Thanks for sharing your idea.




Re: Folding headings which contain only blank lines

2020-10-16 Thread Mikhail Skorzhisnkii

Hi,

Patch ee3c3b554799c9f0fbe387848cd9eec7e9ab9d95 breaks unfolding 
when

org-cycle-separator-lines set to -1.

How to reproduce:
 1. Set org-cycle-separator-lines to -1;
 2. Try to fold and then unfold "Test" in the following file:
#+begin_example
,* Test 1
,** Test 2




,* Test 3
#+end_example

Unfolding will not unfold Test1 with 
ee3c3b554799c9f0fbe387848cd9eec7e9ab9d95 applied. Reverting this 
patch makes it working back. Is there are any other way to fix 
this? Or may be this can be made as a customisation option?


Bastien  writes:


Hi Dmitrii,

Dmitrii Korobeinikov  writes:

When everything is folded (e.g. on startup), ellipses show 
after every
heading which has anything in it at all. This is true as well 
for the
headings containing only one or more blank lines. And while you 
can
unfold such lines, you can't fold them back unless you use 
Shift-Tab.
This appears to be inconsistent. Shouldn't it be possible to 
tab fold

such headings too?


this should be fixed now (in ee3c3b554), thanks for reporting 
this.



Kind regards,
 Mikhail Skorzhinskii



database approach: extract from headers with properties different tables.

2020-10-16 Thread Uwe Brauer


Hi 

I have the following example

* Group1
   :PROPERTIES:
   :COLUMNS:  %10Is(Sheet Nr) %10Ej(Exercise Nr) %7TODO(Status) %26TAGS(Which) 
%17Date(Date) %7STATUS(Status){X/} 
   :ID:   Issues
   :END:

** WAIT:Annu2021:
   :PROPERTIES:
   :ID:   Issue:1
   :Date: <2020-07-26 Sun>
   :STATUS:   [X]
   :IS:   H1
   :EJ:   E1
   :END:

** WAIT:Annu2021:
   :PROPERTIES:
   :ID:   Issue:2
   :Date: <2020-07-26 Sun>
   :STATUS:   [X]
   :IS:   H2
   :EJ:   E1
   :END:


That resuls in 

#+TBLNAME: grupo1
#+BEGIN: columnview :hlines 1 :indent nil :match "/-DONE"  :format 
"%50ITEM(Group) %5Is(Sheet) %5Ej(Exercise) %12TODO %8TAGS(Course) %12Date 
%7Status(Status){X/}"
| Group  | Sheet | Exercise | TODO | Course | Date | Status |
|+---+--+--++--+|
| Group1 |   |  |  ||  | [2/2]  |
|| H1| E1   | WAIT | :Annu2021: | <2020-07-26 Sun> | [X]|
|| H2| E1   | WAIT | :Annu2021: | <2020-07-26 Sun> | [X]|
#+END

* Group2
   :PROPERTIES:
   :COLUMNS:  %10Is(Sheet Nr) %10Ej(Exercise Nr) %7TODO(Status) %26TAGS(Which) 
%17Date(Date) %7STATUS(Status){X/} 
   :ID:   Issues
   :END:

** WAIT:Annu2021:
   :PROPERTIES:
   :ID:   Issue:1
   :Date: <2020-07-26 Sun>
   :STATUS:   [X]
   :IS:   H1
   :EJ:   E2
   :END:

** WAIT:Annu2021:
   :PROPERTIES:
   :ID:   18c81241-5ccc-4e88-8f9e-ebe24ffbdf36
   :Date: <2020-08-05 Wed>
   :Status:   [X]
   :IS:   H2
   :EJ:   E2
   :END:

Results in 



#+BEGIN: columnview :hlines 1 :indent nil :match "/-DONE"  :format 
"%50ITEM(Group) %5Is(Sheet) %5Ej(Exercise) %12TODO %8TAGS(Course) %12Date 
%7Status(Status){X/}"
#+TBLNAME: grupo2
| Group  | Sheet | Exercise | TODO | Course | Date | Status |
|+---+--+--++--+|
| Group2 |   |  |  ||  | [2/2]  |
|| H1| E2   | WAIT | :Annu2021: | <2020-07-26 Sun> | [X]|
|| H2| E2   | WAIT | :Annu2021: | <2020-08-05 Wed> | [X]|
#+END



Question: can I somehow extract a table only for sheet1 which contains
both groups?

Like 


| Sheet | Group  | Exercise | TODO | Course | Date | Status |
|---++--+--++--+|
| H1||  |  ||  ||
|   | Group1 | E1   | WAIT | :Annu2021: | <2020-07-26 Sun> | [X]|
|   | Group2 | E2   | WAIT | :Annu2021: | <2020-08-05 Wed> | [X]|





should be

2020-10-16 Thread Pankaj Jangid
For this org mode text:

#+begin_src org
- This text is /emphasized/
- This text is *in bold*
- This text is _underlined_
- This text uses =a teletype font=
#+end_src

the follow is the HTML output:

#+begin_src

This text is emphasized
This text is in bold
This text is underlined
This text uses a teletype font

#+end_src

In case of /italics/, CSS class is used whereas for other formatting
cases native HTML elements are used. Shouldn't the _underline_ be
converted into  tags?

Regards



Re: export to babel, sometimes a block environment is inserted.

2020-10-16 Thread Uwe Brauer
>>> "ESF" == Eric S Fraga  writes:

> On Thursday, 15 Oct 2020 at 19:44, Uwe Brauer wrote:
>> How can I avoid this annoying block environment?

> I know you have sort of solved this (by promoting the headline to a
> higher level) but the question I would have asked is: what did you want
> the export engine to do with a subheading?

Well because this is how I would have written it starting directly in Latex.
Subsections help me to organize the documents, so I thought subheadings
would be converted to subsections, without interfering with blocks. So I
have learned something I did not know before.


> In beamer, org assumes that a subheading starts some kind of block and
> the default is just a basic block. 

Ok I did not know that. I have to admit I use org mode, either because
of its excellent table editor, or if I want to export text+some code to LaTeX


> You can change this to other types or have org ignore the actual
> headline. I use the latter to provide some structure to the org file
> without affecting the output.

I think I have to learn more about that.


smime.p7s
Description: S/MIME cryptographic signature


from headers to tables, wrap long lines automatically

2020-10-16 Thread Uwe Brauer


Hi

Please look at this the resulting table has a very long entry. How could
I force a line break? Of course I can go to the table and wrap the line,
but this is not what I want.

Thanks 

Uwe Brauer 

#+begin_src 
*   University Göttingen
   :PROPERTIES:
   :COLUMNS:  %10IP(IP) %10TIT(Title) %17Date(Date) 
   :ID:   Issues
   :END:

** Grant 123456
   :PROPERTIES:
   :IP:   Bernhard Riemann
   :TIT:  The final and most convincing proof the the Riemann Hypothesis by 
very very elementary methods. 
   :DATE: January 1859-Today
   :END:


#+TBLNAME: ucm
#+BEGIN: columnview :hlines 1 :indent nil :format "%50ITEM(Project) %5IP(IP) 
%12Date %5TIT(Titule)"
| Project  | IP   | Date   | Titule 

 |
|--+--++-|
| University Göttingen |  ||

 |
| Grant 123456 | Bernhard Riemann | January 1859-Today | The final and 
most convincing proof the the Riemann Hypothesis by very very elementary 
methods. |
#+END
#+end_src






Re: best practices query: non-emacs packages based on tangled source

2020-10-16 Thread TEC



Hi Greg,

Just one little thing that occurs to me, for accepting PRs if you 
add

the header arg (globally would probably be best) :comments link
That with M-x org-babel-detangle should help with accepting PRs.

Hope that helps,

Timothy.

Greg Minshall  writes:

hi.  i apologize if this has been asked before (especially if by 
me).
but, since i had a question recently about Org Src... buffers, 
this came

up.

i'm wondering what people do who want to release a non-emacs'y 
package
(an R package, say, or ...), and who did their development "from 
within"

a .org file.

i can "build" whatever files are needed to release the package. 
but,
it's nice to be able to let people look at the sources, maybe 
submit

'pull requests', etc.

if anyone has any techniques they've used, liked (or hated), i'd 
love to

hear.

thank you very much, Greg





Re: best practices query: non-emacs packages based on tangled source

2020-10-16 Thread Diego Zamboni
Hi Greg,

What I do with my Elvish modules (https://github.com/zzamboni/elvish-modules
, https://github.com/zzamboni/elvish-completions) is to just include the
Org files together with the tangled .elv files.

--Diego


On Thu, Oct 15, 2020 at 8:28 PM Greg Minshall  wrote:

> hi.  i apologize if this has been asked before (especially if by me).
> but, since i had a question recently about Org Src... buffers, this came
> up.
>
> i'm wondering what people do who want to release a non-emacs'y package
> (an R package, say, or ...), and who did their development "from within"
> a .org file.
>
> i can "build" whatever files are needed to release the package.  but,
> it's nice to be able to let people look at the sources, maybe submit
> 'pull requests', etc.
>
> if anyone has any techniques they've used, liked (or hated), i'd love to
> hear.
>
> thank you very much, Greg
>
>


Re: export to babel, sometimes a block environment is inserted.

2020-10-16 Thread Eric S Fraga
On Thursday, 15 Oct 2020 at 19:44, Uwe Brauer wrote:
> How can I avoid this annoying block environment?

I know you have sort of solved this (by promoting the headline to a
higher level) but the question I would have asked is: what did you want
the export engine to do with a subheading?

In beamer, org assumes that a subheading starts some kind of block and
the default is just a basic block.  You can change this to other types
or have org ignore the actual headline.  I use the latter to provide
some structure to the org file without affecting the output.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-57-g8402c4



Re: best practices query: non-emacs packages based on tangled source

2020-10-16 Thread Eric S Fraga
On Thursday, 15 Oct 2020 at 21:11, Greg Minshall wrote:
> i can "build" whatever files are needed to release the package.  but,
> it's nice to be able to let people look at the sources, maybe submit
> 'pull requests', etc.

I have recently done this with a Julia project which I make available at
github.  All code and documentation is developed in a single org and
files tangled etc. to create the github repository for the project.

I include the org file in the repository although the HTML that I
generate from it (as documentation) is hosted on my work web site for
visibility reasons.

If you're interested, you can see all the files including the complete
org file at https://github.com/ericsfraga/Fresa.jl

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-57-g8402c4