Re: Org Babel says 1 + 1 in Python is None

2024-09-07 Thread Sébastien Gendre

But, 1 + 1 should be 11.

Joke aside, for Python, how you return the value depend of if you use a
session or not.

By default, a Python code block do not use a session. In this case, when
executed, the code is wrapped into a Python function and then this
function is called. So, to return a value, you need to use the "return"
statement.

With your example:
  src_python{return 1 + 1}


When you use a session for your code block, the last statement value is
returned if it is a top level expression. In this case, you do not use a
"return" statement.



Is it the article you have read on WORG ?
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-python.html

The part you have quoted maybe miss a reference to the section who
explain how the return mechanism work for values.


Best regards

---
Gendre Sébastien


Rudolf Adamkovič  writes:

> Today, I decided to start using Python in Org.
>
> (1) I read in "WORG":
>
>   :results {output, value}: [...] Value results are the value of the
>   last expression evaluated in the code block. Value mode is the default
>   (as with other languages).
>
> (2) So, I try it, and get:
>
>   src_python{1 + 1} {{{results(=None=)}}}
>
> I expected this to be 2.
>
> Questions:
>
> - Who is correct: (1) the documentation or (2) the implementation?
> - If (2) is correct, do I have to write `return' every time?
>
> Rudy


signature.asc
Description: PGP signature


Re: Enhancing the HTML exporter: Create a new backend or contribute to the upstream

2024-09-01 Thread Sébastien Gendre

Hello. Thank you for your reply, I add mines after the quotes.


Ihor Radchenko  writes:

>>   - A search field for an local search engine
>
> +1, but I would like to know more details - will it be something you
> want to ship with Org mode, as JS?

For now, I have done successful testes with Pagefind. When you execute
the "pagefind" binary on the root of the generated website, it will do
the indexation of the HTML pages and add a subfolder named "pagefind/".

This subfolder contain all the JS, CSS and a data needed to add a
functioning search field to each webpage.

To add the search field, you only need to add this on the webpages:





window.addEventListener('DOMContentLoaded', (event) => {
new PagefindUI({ element: "#search", showSubResults: true });
});


For readers who want more information about Pagefind, here is its
documentation:

https://pagefind.app/docs/


>> For now, the search engine use the software Pagefind:
>> https://pagefind.app
>
> It is a very young project (2022). Any alternatives? Preferably,
> well-established.

I can search for another project.

I don't know how many work it would be needed to develop a search motor
specifically for Org-mode. But doing the indexing on Org-mode files could
let the user control the indexation of each page and section directly
from them. With buffer settings and heading properties.


>>   - A main navigation menu, built from a dedicated org-mode file
>
> Maybe, but that's probably a feature for org-publish.
> Maybe we can somehow integrate it with TOC functionality.

I was thinking of the main navigation menu to navigate in the website,
between web pages, while the TOC is for navigate on one page.

Integrate the 2 is a good idea, it can help building one unified menu on
the side panel. But separate the 2 let more flexibility to users who
want to customize the exported web page. And, maybe, it can help user to
navigate too. I'm not an UX expert.

For example, on Jupyterbook and Sphink generated webpages, the website
navigation menu is on the left and the page table of content is on the
right. (On desktop)


>> - A more "modern" look
>
> That can be anything, so I need more details to say anything.

My inspiration for "modern" look are:

* Jupyterbook: https://jupyterbook.org

* The Furo theme for Sphinx: https://github.com/pradyunsg/furo


>> - More special blocks available like:
>>   - A question/answer bloc, where the answer is hidden
>>   - Important, warning and tip blocks
>>   - A generic hide-show bloc
>
> Are you referring to extending the default CSS? Something else?

At first, I was thinking of extending the CSS theme. But after
reflection, I think it would be better to introduce new kind of Org-mode
block. So we can manage their exportation to other format, like LaTeX.

My inspiration for the 2 last kind of blocks are from "Special Content
Blocks", from Jupyterbook:
https://jupyterbook.org/en/stable/content/content-blocks.html

For the question/answer, the idea is to facilitate the creation of
exercises. When a user write a lesson on a subject and want to give the
readers some practice. It would be nice to have a way to indicate which
text is the question and which text is the answer.

On the export, a question and its answer are rendered inside a frame,
with a question number. The question can have sub-questions, like 2.a,
2.b, etc.

And in case of HTML export, the answer could be hidden and shown when
user click on a button "show reply".

But, maybe this question/answer block is a big feature and need to be
kept for the future.


>> - Tab to select which content to see
>
> May you elaborate?

My inspiration are the "Tab Content" from Jupyterbook:
https://jupyterbook.org/en/stable/content/components.html#tab-content

A use case could be in a documentation, when the writer want to share a
same example in multiple languages.

But, as for the previous blocks, it maybe need a new Org-mode element.
So we can also manage it when export to LaTeX or other formats.


>> - Bibliography on a dedicated webpage when using org-publish
>
> Probably fits within "multipage export" feature we are discussing now
> https://list.orgmode.org/orgmode/ZoUdiTfbYqzPwTiX@orm-t14s/T/#u

I will take a look.


>> - A button to download the Org-mode file source of a webpage
>
> On top panel? It might be useful as default top/side panel settings in
> org-publish. Not sure.

I was more thinking to put this button at the top of the content, as
it's the source of the webpage. While the top/side panel is more related
to the website itself.

But it make sense to have it as an org-publish setting. For example, a
":html-pulish-source". When set as "t", the HTML publish function copy
the Org-mode source beside the generated HTML file. And include a link
in the HTML file to the copied Org-mode file.

Or is it better to use the "org-publish-attachment" function to copy the
Org-mode files ?


>> - Possibility to set the home page, wh

Re: Org-agenda follow and narrow

2024-09-01 Thread Sébastien Gendre

Thank you very much. :)

Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> That exactly what I was searching for. 
>>
>> Is it possible to fix the size of the new window ?
>> When it open a habit task, because of the logbook, the new window is soo
>> big that it make the agenda no more visible.
>
> You can configure everything via `display-buffer-alist'.
> Here is an example entry I use for *Warnings* buffer:
>
> ("\\*Warnings\\*" display-buffer-at-bottom (window-height . 0.3))


signature.asc
Description: PGP signature


Re: Org-agenda follow and narrow

2024-08-31 Thread Sébastien Gendre
Thank you very much. :)

That exactly what I was searching for. 

Is it possible to fix the size of the new window ?
When it open a habit task, because of the logbook, the new window is soo
big that it make the agenda no more visible.


Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> Is there a way for Follow mode to automatically narrow to task it show
>> (and its children headings/tasks) ?
>
> See `org-agenda-follow-indirect'


signature.asc
Description: PGP signature


Org-agenda follow and narrow

2024-08-31 Thread Sébastien Gendre
Hello,

With Org-agenda, I use a more and more the mode Follow
(org-agenda-follow-mode). It's very useful to remind me to look at the
entire task, instead of only its title.

But if a task is in a file with a lot of other tasks, when the Follow
mode show it, it's too much information for me on the screen. I'm easily
distracted.

Is there a way for Follow mode to automatically narrow to task it show
(and its children headings/tasks) ?

I found nothing on the manual and the only thing I found on the web
suggest to use an advice. Maybe there is another way ?

Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Re: Enhancing the HTML exporter: Create a new backend or contribute to the upstream

2024-08-27 Thread Sébastien Gendre

Some precision about the time:

I'm actually finishing the last work I have to do for the school, so I
will be very busy until December.

Until them, I can only dedicate my breaks to the enhancement of the HTML 
exporter.



Sébastien Gendre  writes:

> [[PGP Signed Part:Good signature from B586F7C77239E29E Sébastien Gendre 
>  (trust ultimate) created at 2024-08-28T03:29:14+0200 using RSA]]
>
> TL;DR: Plan to add features to HTML export, do I add them in the
>built-in HTML exporter (as upstream contribution) ? Or as a
>downloadable derived backend ? Which on do you prefer ?
>
>
> Hello,
>
> I plan to use Org-publish to create a website from Org-mode files. And I
> would have some features that are not provided by the built-in HTML
> exporter.
>
> To add theses features, my first plan was to customize an org-publish
> project. Using a custom preamble function, a custom completion function
> and some new export options added to "org-export-options-alist".
>
> It's still a work in progress, but the more feature I add, the more I
> think I need to add them in an export backend.
>
> So, my second plan is to create an export backend, derived from the
> built-in HTML exporter.
>
> But maybe you would prefer that I add these new features as a
> contribution to the built-in HTML exporter ?
>
> Here is what I plan to add, on each generated webpage, compared to what
> the built-in HTML exporter already provide:
>
> - A side panel containing:
>   - A site web name and/or logo
>   - A search field for an local search engine
>   - A main navigation menu, built from a dedicated org-mode file
> - A more "modern" look
> - More special blocks available like:
>   - A question/answer bloc, where the answer is hidden
>   - Important, warning and tip blocks
>   - A generic hide-show bloc
> - Tab to select which content to see
> - Bibliography on a dedicated webpage when using org-publish
> - A button to download the Org-mode file source of a webpage
> - Possibility to set the home page, when there is no index.org
>   
> As say above, I started it as a custom org-publish
> project. You can found my work in progress here:
> https://framagit.org/SebGen/org-documentation-template
>
> For now, the search engine use the software Pagefind:
> https://pagefind.app
>
> And the menu is made from an org-mode file where first level heading
> become menu item and links are simple org-mode links.
>
>
> Best regards
>
> ---
> Gendre Sébastien
>
> [[End of PGP Signed Part]]


signature.asc
Description: PGP signature


Enhancing the HTML exporter: Create a new backend or contribute to the upstream

2024-08-27 Thread Sébastien Gendre

TL;DR: Plan to add features to HTML export, do I add them in the
   built-in HTML exporter (as upstream contribution) ? Or as a
   downloadable derived backend ? Which on do you prefer ?


Hello,

I plan to use Org-publish to create a website from Org-mode files. And I
would have some features that are not provided by the built-in HTML
exporter.

To add theses features, my first plan was to customize an org-publish
project. Using a custom preamble function, a custom completion function
and some new export options added to "org-export-options-alist".

It's still a work in progress, but the more feature I add, the more I
think I need to add them in an export backend.

So, my second plan is to create an export backend, derived from the
built-in HTML exporter.

But maybe you would prefer that I add these new features as a
contribution to the built-in HTML exporter ?

Here is what I plan to add, on each generated webpage, compared to what
the built-in HTML exporter already provide:

- A side panel containing:
  - A site web name and/or logo
  - A search field for an local search engine
  - A main navigation menu, built from a dedicated org-mode file
- A more "modern" look
- More special blocks available like:
  - A question/answer bloc, where the answer is hidden
  - Important, warning and tip blocks
  - A generic hide-show bloc
- Tab to select which content to see
- Bibliography on a dedicated webpage when using org-publish
- A button to download the Org-mode file source of a webpage
- Possibility to set the home page, when there is no index.org
  
As say above, I started it as a custom org-publish
project. You can found my work in progress here:
https://framagit.org/SebGen/org-documentation-template

For now, the search engine use the software Pagefind:
https://pagefind.app

And the menu is made from an org-mode file where first level heading
become menu item and links are simple org-mode links.


Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Re: Org-mode element API: How to extract link description

2024-08-18 Thread Sébastien Gendre

Thank you very much.

Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> With the Org-mode element API, when I get an element of type "link", how
>> do I extract the link description ?
>
>> It's not a property of a link, from what I can see in when explore the
>> content of a link element. And I found nothing on the documentation.
>
> Link description is considered to be link contents.
> But do note that simple `org-element-at-point' does not compute
> contents. It is only available in the full parse tree. From
> `org-element-at-point', a practical way to retrieve description text is
> using substring between :contents-begin/end.


signature.asc
Description: PGP signature


Org-mode element API: How to extract link description

2024-08-18 Thread Sébastien Gendre
Hello,

With the Org-mode element API, when I get an element of type "link", how
do I extract the link description ?

It's not a property of a link, from what I can see in when explore the
content of a link element. And I found nothing on the documentation.

Did I miss something ?


Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Re: Org-publish and attachment links

2024-08-14 Thread Sébastien Gendre
Thank you very much.

Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> It work. Thank you very much.
>>
>> I didn't know that org-attach have it's own library and that it was not
>> loaded with org. I found nothing about it in the Org-attach section of
>> the manual.
>
> Right. It is indeed confusing.
> I now made export load org-attach by default.
>
> Fixed, on bugfix.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=e52858fdb4


signature.asc
Description: PGP signature


Link between org-publish project options and org-export-options-alist

2024-08-13 Thread Sébastien Gendre
Hello,

I (continue to) develop a custom preamble function. And I try to found
if there is a link between options set in an org-publish project and
options set in variable `org-export-options-alist.

For my function, I have defined one new export option in the variable
`org-export-options-alist`:

(add-to-list 'org-export-options-alist
 '(:html-doc-name-template "HTML_DOC_NAME_TEMPLATE" 
my/org-html-doc-name-template nil))

This options have a default value defined in variable
`my/org-html-doc-name-template`:

(setq my/org-html-doc-name-template "

%n

")


But, when I use org-publish and try to retrieve option 
":html-doc-name-template" from my
custom preamble function like this:

…
(plist-get info :html-doc-name-template)
…

If I do not define the options `:html-doc-name-temple` in my publish
project options, I get the value `nil` and not the value of the variable
`my/org-html-doc-name-template`.

Are the options of org-publish independent of options defined in
`org-export-options-alist` ?


Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Re: Build a menu for an HTML publish

2024-08-13 Thread Sébastien Gendre

Thank you very much for your reply.

I didn't know the bind part. I will take a look at it.




Bruno Barbier  writes:

> Hi Sébastien,
>
> Sébastien Gendre  writes:
>
> [...]
>> I cannot found a way to define "very-strawbery" value in an Org-mode
>> buffer and having it used while I manually export the Org-mode buffer.
>>
>> I tried with "#+very-strawbery: test123" and "#+OPTIONS: very-strawbery:
>> test123", without success.
>>
>> Someone have an idea ?
>
> IIUC, "BIND" should work.
>
> You put this in the exported file:
>
> #+BIND: a-string "3"
> #+BIND: a-number 3
>
> And you can then use these variables directly:
>
> (defun my/preamble-test (info)
>(message "My string: %S" a-string)
>(message "My number: %S" a-number))
>
> This works only if 'org-export-allow-bind-keywords' is t; else Org
> ignores the "#+BIND" instructions.
>
> HTH,
>
> Bruno


signature.asc
Description: PGP signature


Re: Build a menu for an HTML publish

2024-08-13 Thread Sébastien Gendre

Another reply to myself about this specific part:

Sébastien Gendre  writes:
> But if I set the variable `org-html-preamble` to my custom preamble
> function like this:
>
> (setq org-html-preamble 'my/preamble-test)
>
> I cannot found a way to define "very-strawbery" value in an Org-mode
> buffer and having it used while I manually export the Org-mode buffer.
>
> I tried with "#+very-strawbery: test123" and "#+OPTIONS: very-strawbery:
> test123", without success.
>
> Someone have an idea ?

If I want to define the value of my new option "very-strawbery" in the
level of an Org-mode buffer (or file), I need to add this new option
into the variable `org-export-options-alist` like this:

If I evaluate this:

(add-to-list 'org-export-options-alist
 '(:very-strawbery "VERYSTRAWBERY" nil nil))


To quote the docstring of `org-export-options-alist`:

> Alist between export properties and ways to set them.
> 
> The key of the alist is the property name, and the value is a list
> like (KEYWORD OPTION DEFAULT BEHAVIOR) where:
> 
> KEYWORD is a string representing a buffer keyword, or nil.  Each
>   property defined this way can also be set, during subtree
>   export, through a headline property named after the keyword
>   with the "EXPORT_" prefix (i.e. DATE keyword and EXPORT_DATE
>   property).
> OPTION is a string that could be found in an #+OPTIONS: line.
> DEFAULT is the default value for the property.
> BEHAVIOR determines how Org should handle multiple keywords for
>   the same property.  It is a symbol among:
>   nil   Keep old value and discard the new one.
>   t Replace old value with the new one.
>   ‘space’   Concatenate the values, separating them with a space.
>   ‘newline’ Concatenate the values, separating them with
>   a newline.
>   ‘split’   Split values at white spaces, and cons them to the
>   previous list.
>   ‘parse’   Parse value as a list of strings and Org objects,
> which can then be transcoded with, e.g.,
> ‘org-export-data’.  It implies ‘space’ behavior.
> 
> Values set through KEYWORD and OPTION have precedence over
> DEFAULT.

After adding my new export option, I can use it by writing this on my
Org-mode buffer/file I want to export:

#+VERYSTRAWBERRY: TestTestTest


After exporting my Org-mode buffer/file to HTML, I get a preamble with
the text "TestTestTest".


Note :

* Having a buffer option for "very-strawbery" is useful for export
  but also for publish. I can set a value that will override the
  value set in the Org-publish project settings.

* The variable `org-export-options-alist` is made for options who are
  back-end agnostic. But I didn't found a way to modify export options of
  HTML backend without redefine a new backend.


Best regards

---
Gendre Sébastien



signature.asc
Description: PGP signature


Re: Build a menu for an HTML publish

2024-08-12 Thread Sébastien Gendre

So, I can partially reply to myself:

Sébastien Gendre  writes:
> # How to pass parameters to this function
>
> If I set a function as value to the variable `org-html-preamble`, this
> function will receive a plist containing all the export options.
>
> But can I set custom export option in the publish project alist ?
> And when I export manually a file, can I set custom export option on
> buffer level ?
>
> Or each option in the plist that my function receive need to be defined
> in the HTML export backend level ?

If I use org-publish, define a publish project and set a function as
its preamble: Any custom settings in the publish project will be put in the
info plist that the preamble function receive as parameter.

For example, if I define this function:

(defun my/preamble-test (info)
  "docstring"
  (plist-get info :very-strawbery))


Then I set a publish project like this:

(setq org-publish-project-alist
  '(("pages-org"
 :base-directory "./Pages/"
 :base-extension "org"
 :recursive t
 :publishing-function org-html-publish-to-html
 :publishing-directory "./public/"
 :html-doctype "html5"
 :html-html5-fancy t
 :very-strawbery "Test 1, test 2, test 3"
 :html-preamble my/preamble-test)))


And finally I publish the project "pages-org", in my published web pages
I get a preamble with the content "Test 1, test 2, test 3".


But if I set the variable `org-html-preamble` to my custom preamble
function like this:

(setq org-html-preamble 'my/preamble-test)

I cannot found a way to define "very-strawbery" value in an Org-mode
buffer and having it used while I manually export the Org-mode buffer.

I tried with "#+very-strawbery: test123" and "#+OPTIONS: very-strawbery:
test123", without success.

Someone have an idea ?



In conclusion, about this point: It is possible to define custom
Org-mode publish settings that will be available to a preamble function.
But, I cannot found a way to set the value of "very-strawbery" that is
used when I export an Org-mode buffer instead of publish it.


Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Build a menu for an HTML publish

2024-08-11 Thread Sébastien Gendre
Hello,

I (continue to) write an online documentation with Org-mode and I want
to build the main navigation menu dynamically. I would like to have your
opinion about what I plan to do.


# What I plan

I plan to write a function that I can assign to the variable
`org-html-preamble` or the publish setting :html-preamble.

This function would take as parameters:

* The brand name and/or the brand logo url

* The main menu structure

And optionally the HTML templates for:

* The brand name and/or logo url

* The menu item

* The menu item with submenu

* The menu surrounding

* The preamble

This function will return the formatted preamble in HTML format.


# What I need to define

I need to choose how the menu structure is defined. An Elisp
alist ? An org-mode file containing only a list ?

If I choose an Elisp alist, do I reuse the Org-mode URL format ? If yes,
is there any org-mode internal function I can use to convert an url like
"file:example.org::*some headline" to "https://example.html#custom-id" ?

With the Elisp alist, I could use keys as menu labels and associated values as
targets. With this solution, I can have different kinds of targets.

If I choose an org-mode file, I cannot control how the HTML export is
built. I will need to write my own function that parse the file, extract
the needed information and format the HTML result. And I need to use a
different extension to avoid having to exclude this file with
org-publish.


# How to pass parameters to this function

If I set a function as value to the variable `org-html-preamble`, this
function will receive a plist containing all the export options.

But can I set custom export option in the publish project alist ?
And when I export manually a file, can I set custom export option on
buffer level ?

Or each option in the plist that my function receive need to be defined
in the HTML export backend level ?


Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Re: Org-publish and attachment links

2024-08-11 Thread Sébastien Gendre

It work. Thank you very much.

I didn't know that org-attach have it's own library and that it was not
loaded with org. I found nothing about it in the Org-attach section of
the manual.


Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> # TL;DR
>>
>> When I export Org-mode documents with org-publish, it cannot resolve
>> links in format "[[attachment:image.png]]".
>>
>> But when I export manually the same document with the export dispatcher,
>> the export work correctly and the attachment link is correctly resolved.
>>
>> I don't know if it's a bug, or if it's planned to work like this and a
>> feature suggestion is needed. So, I post a message here.
>
> In your script, you do not load org-attach library. So, attachment:
> links are simply not recognized.
>
>>;; Package load and configuration
>>
>>;; Use org
>>(use-package org)
>>
>>;; Use ox-publish
>>(use-package ox-publish)
>
> Add (require 'org-attach) here.


signature.asc
Description: PGP signature


Re: Examples of online documentation written with Org-mode

2024-08-10 Thread Sébastien Gendre
[[PGP Signed Part:Good signature from B586F7C77239E29E Sébastien Gendre 
 (trust ultimate) created at 2024-08-11T04:44:32+0200 using RSA]]
[1. text/plain]
It's a very good example.

Is it more common to make a single file documentation ?

András Simonyi  writes:

> Dear All,
>
>> Sébastien Gendre  writes:
>> > And I search for example of online documentation made with Org-mode. As
>> > inspirations.
>
> AFAIU, the online documentation of the Magit and Borg Emacs packages
> by Jonas Bernoulli were also made using Org (probably with the texinfo
> exporter), see https://magit.vc/manual/magit.html and
> https://emacsmirror.net/manual/borg/ -- their sources can be found at
> https://github.com/magit/magit/blob/main/docs/magit.org and
> https://raw.githubusercontent.com/emacscollective/borg/main/docs/borg.org.
>
> best wishes,
> András

[[End of PGP Signed Part]]



Re: Examples of online documentation written with Org-mode

2024-08-10 Thread Sébastien Gendre
[[PGP Signed Part:Good signature from B586F7C77239E29E Sébastien Gendre 
 (trust ultimate) created at 2024-08-11T04:41:57+0200 using RSA]]
[1. text/plain]
Thank you very much.

I will take a look.


Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> I start to explore Org-mode and org-publish to built online
>> documentation.
>>
>> And I search for example of online documentation made with Org-mode. As
>> inspirations.
>>
>> But after some search, I have only found the Org-mode Worg [1]. Other
>> found are no more online.
>
> One orthodox approach is exporting to .texi -> .html. It is how
> https://orgmode.org/manual/ and
> https://elpa.gnu.org/packages/doc/modus-themes.html are generated.
>
> Another common approach is writing elaborate README.org in
> repositories. There are many examples on GitHub, like
> https://github.com/alphapapa/org-ql/
>
> Many blogs are also made with Org mode. Not sure if it qualifies for
> documentation.
>
> You may also take a look at https://github.com/fniessen/org-html-themes
> (ReadTheOrg), https://orgmode.org/tools.html, and 
> https://orgmode.org/worg/org-blog-wiki.html

[[End of PGP Signed Part]]



Org-publish and attachment links

2024-08-10 Thread Sébastien Gendre
Hello,


# TL;DR

When I export Org-mode documents with org-publish, it cannot resolve
links in format "[[attachment:image.png]]".

But when I export manually the same document with the export dispatcher,
the export work correctly and the attachment link is correctly resolved.

I don't know if it's a bug, or if it's planned to work like this and a
feature suggestion is needed. So, I post a message here.



# Context

I plan to write a little web documentation with Org-mode.

The documentation is split into multiple Org-mode files that I put into
a "./Pages/" folder.

Each org-mode document are converted to HTML with org-publish and the
function `org-html-publish-to-html`. The result is written into the
"./Public" folder.

And there is 2 kind of statics files:

* The ones needed on each pages, like the website logo or the CSS

* The files related to a specific page, like a screenshot

For the first kind, I have a "./Static/" folder which content is copied
to "./Public/static/" with org-publish and the function
`org-publish-attachment`.

For the second type, I use the Org-mode feature "attachment" to attach
each files into an Org-mode heading and (in my Org document) I write an
attachment link like these: [[attachment:image.png]]
[[attachment:code_template.tar.gz][Template of code]]

To publish these files, I also use org-publish and the function
`org-publish-attachment`. This time, from the folder "./Pages" to the
folder "./Public".



# How to replicate this problem

For this, I skip the CSS+JS folder.

1) Create directory called "test_documentation".

2) In "test_documentation/", create 1 directory:
   * "Pages"

3) In "Page/", create 1 file named "Example.org"

4) In "Example.org", create a heading, attach a image file to it and
   make an attachment link to this file (like "[[attachment:image.png]]")

5) In "test_documentation/", create a file named "publish.el" and write
   this content in it:

   ;; Publish script for the website
   
   
   ;; Package load and configuration
   
   ;; Use org
   (use-package org)
   
   ;; Use ox-publish
   (use-package ox-publish)
   
   
   ;; Set publication configuration
   (setq org-publish-project-alist
 '(("pages-org"
:base-directory "./Pages/"
:base-extension "org"
:publishing-function org-html-publish-to-html
:publishing-directory "./public/")
   ("pages-attachment"
:base-directory "./Pages/"
:base-extension "jpg\\|png\\|gif\\|svg\\|zip"
:recursive t
:publishing-directory "./public/"
:publishing-function org-publish-attachment)))
   
   
   ;; Do the publication
   (org-publish-all t)

6) Run this publish script with this command:

   emacs -q --script publish.el




# What did I get


An error message:

Error: user-error ("Unable to resolve link: \"attachment:image.png\"")
  mapbacktrace(#f(compiled-function (evald func args flags) #))
  debug-early-backtrace()
  debug-early(error (user-error "Unable to resolve link: 
\"attachment:image.png\""))
  user-error("Unable to resolve link: %S" "attachment:image.png")
  org-export-data…

I cut from the org-export-data, because it is amazingly long and didn't
add any useful info.




# What did I expected

Attachment link would be resolved like with manual HTML export.




# Versions

* Emacs: 29.4

* Org-mode: 9.6.15


Best regards


signature.asc
Description: PGP signature


Re: Examples of online documentation written with Org-mode

2024-08-10 Thread Sébastien Gendre
Thank you very much.

Samuel Loury  writes:

> [[PGP Signed Part:No public key for 75D23CED7439106A created at 
> 2024-08-10T14:41:26+0200 using RSA]]
> Sébastien Gendre  writes: 
>
> […] 
>
>  And I search for example of online documentation made with Org-mode. As 
> inspirations. 
>
>  But after some search, I have only found the Org-mode Worg [1]. Other found 
> are no more online. 
>
> I don't know if that helps, but the documentation of clk1 is in org-mode. I 
> try hard to use literate programming. All the use cases2 are made
> with babel and tangled into tests so that I am very confidant that what I 
> promise (hence show in the documentation) is indeed what the end
> user will be able to do. 
>
> My best, – Konubinix GPG Key : 7439106A Fingerprint: 5993 BE7A DA65 E2D9 06CE 
> 5C36 75D2 3CED 7439 106A 
>
> Notes de bas de page: 
>
> 1
>
> https://clk-project.org/ 
>
> 2
>
> https://clk-project.org/doc/use_cases/ 
>
> [[End of PGP Signed Part]]


signature.asc
Description: PGP signature


Examples of online documentation written with Org-mode

2024-08-10 Thread Sébastien Gendre
Hello,

I start to explore Org-mode and org-publish to built online
documentation.

And I search for example of online documentation made with Org-mode. As
inspirations.

But after some search, I have only found the Org-mode Worg [1]. Other
found are no more online.


Best regards

---
Gendre Sébastien


[1] https://orgmode.org/worg/


signature.asc
Description: PGP signature


Re: Properties drawer at buffer/file level

2024-07-29 Thread Sébastien Gendre
"Martin Edström"  writes:

> Bit off-topic, but I have still not understood what functionality the
> file-level drawers actually enable. I suppose dropping support is out
> of the question? It seems every other function I write has to have
> special-purpose code to handle the case of outline level 0... it's a
> maintenance burden. I got the impression it was only added due to
> org-roam, but it does not actually need them. It works fine with a
> traditional top-level heading instead of a #+title.

I only use a buffer level properties drawer with Org-roam.

But I have difficulties to understand why Org-roam use it and not use a
heading at lever 1 with an ID.

Maybe for the export ?

I had never understand if, with org-mode, using the top-level heading
for the document title is a good idea. Doesn't it cause problem with
export ?

I got the same kind of questioning with Org-ql. For example, if I made a
blog with Org-mode, org-publish and Org-ql.

I write 1 blog post per org-mode file and I want to automatically build
the home page of the blog with Org-ql. For Org-ql, in each post file, I
need to have a top level heading representing the blog post. But if I do
that, it will break the HTML export ?


signature.asc
Description: PGP signature


Re: Properties drawer at buffer/file level

2024-07-29 Thread Sébastien Gendre

I get nil.



"Martin Edström"  writes:

> The property drawer has to come first for technical reasons.  Just try 
> manually moving the property drawer beneath the title, then do
>
> M-: (org-entry-get nil "ID")
>
> and what do you get? Nil.
>
> Martin
>
> On Mon, 29 Jul 2024 18:02:35 +0200, Sébastien Gendre  wrote:
>
>> Hello,
>> 
>> 
>> If I set a property with `(org-set-property)' when the point is at the
>> top of a buffer, before any heading, I got a property drawer inserted at
>> in the first line of the buffer.
>> 
>> But if I already have buffer settings, like "#+TITLE:", the property
>> drawer is put before these settings.
>> 
>> Is it possible to tell Org-mode to put the buffer properties drawer after
>> the buffer settings ?
>> 
>> 
>> More context:
>> 
>> I try to use Org-roam to take notes about books I read. With this, I got
>> 1 file per book, with the title of the book set as buffer setting
>> "#+TITLE:".
>> 
>> But when I add other information (like author, editor, etc)
>> into a property drawer of my note, these additional info are inserted
>> before the title.
>> 
>> On a new note, I got this:
>> 
>>  :PROPERTIES:
>>  :ID:   A-unique-ID
>>  :Author:   Author Name
>>  :Editor:   Editor Name
>>  :END:
>>  #+Title: Book title
>> 
>> 
>> Instead of this:
>> 
>>  #+Title: Book title
>>  :PROPERTIES:
>>  :ID:   A-unique-ID
>>  :Author:   Author Name
>>  :Editor:   Editor Name
>>  :END:
>> 
>> Which is visually very different from what I got when the property
>> drawer is set for a heading. And the actual result feel less intuitive
>> than what I got with heading.
>> 
>> 
>> Best regards
>> 
>> ---
>> Gendre Sébastien


signature.asc
Description: PGP signature


Properties drawer at buffer/file level

2024-07-29 Thread Sébastien Gendre
Hello,


If I set a property with `(org-set-property)' when the point is at the
top of a buffer, before any heading, I got a property drawer inserted at
in the first line of the buffer.

But if I already have buffer settings, like "#+TITLE:", the property
drawer is put before these settings.

Is it possible to tell Org-mode to put the buffer properties drawer after
the buffer settings ?


More context:

I try to use Org-roam to take notes about books I read. With this, I got
1 file per book, with the title of the book set as buffer setting
"#+TITLE:".

But when I add other information (like author, editor, etc)
into a property drawer of my note, these additional info are inserted
before the title.

On a new note, I got this:

 :PROPERTIES:
 :ID:   A-unique-ID
 :Author:   Author Name
 :Editor:   Editor Name
 :END:
 #+Title: Book title


Instead of this:

 #+Title: Book title
 :PROPERTIES:
 :ID:   A-unique-ID
 :Author:   Author Name
 :Editor:   Editor Name
 :END:

Which is visually very different from what I got when the property
drawer is set for a heading. And the actual result feel less intuitive
than what I got with heading.


Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


If org-html-preamble set to function, is there parameter(s) ?

2024-07-27 Thread Sébastien Gendre
Hello,


If I set the variable `org-html-preamble' to a function, is this
function receive parameter(s) ?

The manual say nothing about it:
https://orgmode.org/manual/HTML-preamble-and-postamble.html

But I have a doubt, as a function that built a preamble need to know
some information, like the language of the page for example.

Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Re: Cannot yank media when image come from Gnome screenshot

2024-07-23 Thread Sébastien Gendre
Thank you for your reply.

I use the Emacs version provided on Fedora 40.
I will look how to compile a more recent version of Emacs and test it.

Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> Here is the full backtrace:
>>
>>
>> Debugger entered--Lisp error: (wrong-type-argument sequencep image/png)
>>   mapc(#f(compiled-function (elt) #) image/png)
>>   seq-do(#f(compiled-function (elt) #) 
>> image/png)
>>   #f(compiled-function #'sequence #> 0x19945316743f723a>)(#f(compiled-function (elt) #> 0x94038afefa059ab>) image/png)
>>   apply(#f(compiled-function #'sequence #) 
>> #f(compiled-function (elt) #) image/png nil)
>>   seq-map(#f(compiled-function (elt) #) 
>> image/png)
>>   seq-filter(#f(compiled-function (type) #) 
>> image/png)
>
> The error is originating from Emacs itself, not from Org mode.
> May you try newer version of Emacs? If you still see the error, please
> report it as Emacs bug.


signature.asc
Description: PGP signature


Re: Cannot yank media when image come from Gnome screenshot

2024-07-23 Thread Sébastien Gendre

Here is the full backtrace:


Debugger entered--Lisp error: (wrong-type-argument sequencep image/png)
  mapc(#f(compiled-function (elt) #) image/png)
  seq-do(#f(compiled-function (elt) #) image/png)
  #f(compiled-function #'sequence #)(#f(compiled-function (elt) #) 
image/png)
  apply(#f(compiled-function #'sequence #) 
#f(compiled-function (elt) #) image/png nil)
  seq-map(#f(compiled-function (elt) #) image/png)
  seq-filter(#f(compiled-function (type) #) 
image/png)
  yank-media--find-matching-media("x/special-\\(?:gnome|KDE|mate\\)-files")
  yank-media()
  funcall-interactively(yank-media)
  command-execute(yank-media record)
  execute-extended-command(nil "yank-media" "yank")
  funcall-interactively(execute-extended-command nil "yank-media" "yank")
  command-execute(execute-extended-command)


Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> I got a bug when I try to yank a screenshot made with Gnome-shell.
>> I don't know yet if it's a bug with Org-mode handling the media, or the
>> yank-media function or the Gnome-shell screenshot feature.
>
> Thanks for reporting!
>
>> What I get:
>>
>> * In the mini-buffer, I get the error message:
>>   "Wrong type argument: sequencep, image/png"
>>
>> * If I go into the "*Messages*" buffer, the full error message is:
>>   "seq-do: Wrong type argument: sequencep, image/png"
>
> May you please enable debug-on-error (M-x toggle-debug-on-error) and
> share the full backtrace displayed when you trigger the error?


signature.asc
Description: PGP signature


Re: org-cite-insert function docstring and documentation don't tell how to validate

2024-07-23 Thread Sébastien Gendre

Yes, but how this information tell me that I have to do a special key
binding to validate my citation selection and to have the
citation link inserted into my org-mode document ?



Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> What do you mean ?
>
> When a prompt is displayed in Emacs, you enter something in the minibuffer.
> You can type some text there (with completion) or you can type nothing.
> If you type nothing, your input is empty.


signature.asc
Description: PGP signature


Re: org-cite-insert function docstring and documentation don't tell how to validate

2024-07-23 Thread Sébastien Gendre

What do you mean ?

Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> You mean that the mini-buffer is empty ?
>
> I mean that what you type in the minibuffer is empty.


signature.asc
Description: PGP signature


Re: org-cite-insert function docstring and documentation don't tell how to validate

2024-07-23 Thread Sébastien Gendre

You mean that the mini-buffer is empty ?



Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> What does "empty input exists" mean ?
>
> Empty minibuffer input.


signature.asc
Description: PGP signature


Cannot yank media when image come from Gnome screenshot

2024-07-23 Thread Sébastien Gendre
Hello,

I got a bug when I try to yank a screenshot made with Gnome-shell.
I don't know yet if it's a bug with Org-mode handling the media, or the
yank-media function or the Gnome-shell screenshot feature.


What I do:

* From the system menu of Gnome-shell, I choose the action to take a
  screenshot

* I took a screenshot from a selected zone, confirm the screenshot and
  got a notification message telling me "You can past the screenshot
  from the clipboard"

* On an Org-mode document, I place the point where I want to past the
  screenshot and call the Emacs function "yank-media"


What I get:

* In the mini-buffer, I get the error message:
  "Wrong type argument: sequencep, image/png"

* If I go into the "*Messages*" buffer, the full error message is:
  "seq-do: Wrong type argument: sequencep, image/png"


What I expected:

* The image present in the clipboard is attached to the org-mode heading
  and a link to this attachment is created under the point


Versions:

* Org-mode: 9.7.2

* Emacs: 29.4

* Gnome-shell: 46.3.1




Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Re: org-cite-insert function docstring and documentation don't tell how to validate

2024-07-23 Thread Sébastien Gendre

What does "empty input exists" mean ?

Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> I have found that on Vanilla Emacs, it's "C-j".
>>
>> And with Vertico, it's "Alt-Enter".
>>
>> I wonder if we need to document it. In the docstring of
>> "org-cite-insert" and in the documentation. Of course, not mentioning
>> every possible shortcut. But at least telling how the command
>> "org-cite-insert" behave. And the general idea of how user can stop the
>> reference selection.
>
> The minibuffer prompt in `org-cite-insert' says: "empty input exits"
> IMHO, it is more than enough. In fact, better than shelving it deep into
> the manual/docstring.


signature.asc
Description: PGP signature


Re: org-cite-insert function docstring and documentation don't tell how to validate

2024-07-22 Thread Sébastien Gendre

I have found that on Vanilla Emacs, it's "C-j".

And with Vertico, it's "Alt-Enter".

I wonder if we need to document it. In the docstring of
"org-cite-insert" and in the documentation. Of course, not mentioning
every possible shortcut. But at least telling how the command
"org-cite-insert" behave. And the general idea of how user can stop the
reference selection.


András Simonyi  writes:

> Dear All,
>
> On Sun, 21 Jul 2024 at 12:15, Sébastien Gendre  wrote:
>
>> I have seen if a special keyboard shortcut is needed after selecting a
>> key to cite, but neither in the documentation or the function docstring
>> I found it.
>> Any idea ?
>
> I think it depends on the used completion system, but one of the
> non-obvious shortcuts for this
> that I've seen was "C-u C-j" (e.g., for Ivy), perhaps it's worth a try.
>
> best wishes,
> András


signature.asc
Description: PGP signature


org-cite-insert function docstring and documentation don't tell how to validate

2024-07-21 Thread Sébastien Gendre
Hello,


I am trying to use the Org-mode citation system, as described in the
documentation: https://orgmode.org/manual/Citation-handling.html

For inserting a citation, I call interactively the function
org-cite-insert, as described in the documentation:
https://orgmode.org/manual/Citations.html

But when I select a citation in the mini-buffer and validate with "enter",
the citation key is added in the mini-buffer and Org-mode continue to
ask me what I want to cite. I cannot end it and actually have a citation
link inside my documentation.

I have seen if a special keyboard shortcut is needed after selecting a
key to cite, but neither in the documentation or the function docstring
I found it.

Any idea ?

Version of Org-mode:   9.7.2
Version of Emacs:  29.4


Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Built a list of Org-mode files with Org-ql

2024-07-16 Thread Sébastien Gendre
Hello,

I try to do something with Org-mode and Org-ql[1], but don't know if
it's possible.

I have a directory with a few Org-mode files in it. And inside another
Org-mode file, I try to generate a table that list all the Org-mode
files of this directory.

Each Org-mode file of this directory have a "#+TITLE", a "#+DATE" and a
"#+KEYWORDS" buffer setting, and I would to use them as column in the
created table. And to sort this table by the "#+DATE" field.

I have looked into Org-ql dynamic bloc [2] to do that. Org-ql is an
amazing package, I love it. But, from what I understand, it only work
for searching Org-mode headings, not for searching Org-mode files like I
try to do.

Any one have an idea or a suggestion ?


Footnotes:

[1] https://github.com/alphapapa/org-ql
[2] https://github.com/alphapapa/org-ql?tab=readme-ov-file#dynamic-block




Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Property: How to define allowed values at file level

2024-07-14 Thread Sébastien Gendre
Hello,

After reading the manual about property syntax[1], I want to set the
allowed values for a property at the file level.

So, at the beginning of my buffer, I have written this:

#+PROPERTY: Review_ALL: ⭐ ⭐⭐ ⭐⭐⭐  ⭐


But when I try to set the property of an heading, with keyboard shortcut
C-c C-x p, and select the property "Review": I can set any value.

Didn't the minibuffer should offer me only the values above, with completion ?

Did I misunderstand the manual ? Is it not possible to set allowed
values at a file level ?



[1] https://orgmode.org/manual/Property-Syntax.html


Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Using Org-mode for literate Emacs configuration with use-package

2024-07-13 Thread Sébastien Gendre
Hello,

I am using Org-mode and the elisp function `(org-babel-load-file)` to
write my Emacs configuration into an Org-mode document. It's very
useful to document my configuration and I can quickly do exports to HTML
or PDF when a friend want to know more about my configuration.

But, I have a problem.

Sometimes, I need to split a package configuration into multiple
sections of my Org-mode document. For example Org-mode, because I set a
lot of settings. By spiting my config, I can correctly document each
option and organize it in a more comprehensible way.

But with the elisp function `(use-package)`, I need to join each package
configuration into the call of `(use-package)` function. Which prevent
me from splitting my config into Org-mode sections.

I was thinking of writing Org-mode source block with different parts of
my `(use-package)` call, so I can distribute it into different section of my
Org-mode document. But in this case, I can no-longer evaluate my
`(use-package)` call directly from my Org-mode document.


Do you have any suggestion ? How do you manage this problem ?


Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Re: Capture from Firefox to Org-mode

2024-07-12 Thread Sébastien Gendre

Thank you for your clarification. I will take a look.

Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> Ihor Radchenko  writes:
>>> I wrote https://github.com/yantar92/org-capture-ref to do exactly
>>> this. 
>>
>> Is it meant to be used with org-ref ?
>
> No. It has nothing to do with org-ref.
>
>> I didn't plan to build a bibliography with bibtex (at least for now). I
>> just plan to built a simple book reading tracker with Org-mode. But I
>> keep a note about your suggestion, it could be very helpful in the
>> future.
>
> org-capture-ref does not create bibtex. It just stores metadata and
> chooses a format of that metadata in Org headings that is compatible
> with ol-bibtex library.
>
> I use org-capture-ref as reading tracker myself.
>
> Examples of books/articles captured by org-capture-ref:
>
>  DONE Cal Newport [Goodreads] Digital Minimalism: Choosing a Focused Life 
> in a Noisy World :book:ATTACH:
> CLOSED: [2021-02-27 Sat 22:33]
> :PROPERTIES:
> :ID: goodreads_digit_minim_choos_focus_life
> :CREATED: [2020-07-28 Tue 10:18]
> :Effort:   0:20
> :HOWPUBLISHED: Goodreads
> :URL:  https://www.goodreads.com/book/show/40672036-digital-minimalism
> :NOTE: Online; accessed 12 July 2024
> :AUTHOR:   Cal Newport
> :BTYPE:book
> :TITLE:Digital Minimalism: Choosing a Focused Life in a Noisy World
> :END:
>
> * DONE Blair [JAMA] (1989) Physical Fitness and All-Cause Mortality 
> :article:ATTACH:
> SCHEDULED: <2021-03-14 Sun>
> :PROPERTIES:
> :TITLE:Physical Fitness and All-Cause Mortality
> :BTYPE:article
> :ID:   3c7ab86d5821f6c622d20c6b83605ef5e4e02691
> :AUTHOR:   Steven N. Blair
> :JOURNAL:  JAMA
> :VOLUME:   262
> :NUMBER:   17
> :PAGES:2395
> :YEAR: 1989
> :DOI:  10.1001/jama.1989.03430170057028
> :URL:  https://doi.org/10.1001/jama.1989.03430170057028
> :CREATED:  [2021-03-13 Sat 20:50]
> :HOWPUBLISHED: Jamanetwork
> :NOTE: Online; accessed 13 March 2021
> :END:


signature.asc
Description: PGP signature


Re: Capture, template expansion and keyword for link type

2024-07-12 Thread Sébastien Gendre

Thank you for your reply.
I wrote more after the quotes below.

Max Nikulin  writes:
> Have a look into `org-capture' code. It calls `org-store-link'.

Thank you for this information.


Max Nikulin  writes:
>> Is there a way to discover the keywords that a major mode provide to a
>> capture template ?
>
> See specific store link functions, e.g. `org-gnus-store-link'.

Reading the `org-gnus-store-link' function, I see that is set: type,
file, node, link and description.

I have seen that the variable `org-link-parameters' list all the defined
org links. With its different functions, including the store function
(associated with :store parameter).

I wonder if I can write an Elisp function that retrieve all the
properties set for each org link types and tell we at which mode they
are used. After all, with Elisp code could be data too.

But not now.

Anyway, thank you very much. I will explore starting from
`org-link-parameters', as it seems to have a lot of org links. 



Max Nikulin  writes:
>> A new parameter added to the org-protocol url is only accessible
>> through
>> the ":query" key ? It will not create a new "%:keywoard" automatically ?
>
> With "capture" subprotocol it does not mapped to keywords.

This morning, I have explored how org-capture work. Especially the
capture subprotocol. I think I will need to make another subprotocol.
Maybe a "capture-plus" that will accept any keys and make all of them
accessible as a '%:keymord'.



Max Nikulin  writes:
> Not all books have authors in metadata. Some have editors since every
> chapter has its own author. To avoid handling such logic in capture
> templates I decided to resort to formatting inside an extension (or
> formatting performed by a dedicated tool if site has API, e.g.
> GitHub).

Can you tell me more about this ?



Max Nikulin  writes:
>> And then, I could simply create a capture template that would use the
>> keywords "%:author", "%:title", etc.
>
> If you are using Emacs-30 I would suggest to keep away from
> org-protocol hacks and to rely on `server-eval-args-left' handled by a
> dedicated function
>
> emacsclient --eval '(my-capture)' 'my-proto://something?param=value'
>
> For older versions you may either use backslash hell like in
> emacsclient-mail.desktop or to define custom subprotocol for
> org-protocol.

Is there any change planned for org-protocole in Emacs 30 ?

The big advantage for org-protocole, is that it's based on an URL that
any external software can recognize and pass to Emacs and it's easy to
write a custom sub-protocole.


signature.asc
Description: PGP signature


Re: Capture from Firefox to Org-mode

2024-07-11 Thread Sébastien Gendre

Thank you for your reply.

I write wore after the quotes below.


Max Nikulin  writes:
> On 09/07/2024 23:45, Morgan Willcock wrote:
>> Just to mention another option, I use this one:
>> https://addons.mozilla.org/en-US/firefox/addon/linkremark/
>
> In its current state it does not extract metadata specific to books or
> events. Dublin Core or other similar metadata are on TODO list, but
> with low priority. The extension may give priority to doi: links and
> it may be starting point to fetch an entry from some database.
>
> If "magazin to buy" page contains schema.org/Product metadata (LD-JSON
> or microdata) then it may work.
>
> I wonder what is expected capture result for events and what metadata
> are available?

For an event, I was thinking of extracting event title, date, place and
organization of an event announced on a Mobilizon web site.


Max Nikulin  writes:
> I have not tried it, but the following package has extractors for some
> sites:
> 

I was already suggested this package on another message, but it seems
too much for what I need.


signature.asc
Description: PGP signature


Re: Capture from Firefox to Org-mode

2024-07-11 Thread Sébastien Gendre


Morgan Willcock  writes:
> Just to mention another option, I use this one:
>
> https://addons.mozilla.org/en-US/firefox/addon/linkremark/
>
> I took the easy option and just use the default "integration" which uses
> the clipboard, but I think org-protocol is supported as well.

A very nice suggestion. I will look at it.

Thank you very much.


signature.asc
Description: PGP signature


Re: Capture from Firefox to Org-mode

2024-07-11 Thread Sébastien Gendre
Thank you for the suggestions, I will take a look.

Chris Keschnat  writes:

> Sébastien Gendre  writes:
>
> Hi,
> I'm not actively using this but I had it configured and just tested that
> it works. It might not answer you're questions directly, but I hope it helps.
>
>> How to capture data from a web page to Org-mode ?
>>
>> * What I need
>> I want to be able to capture different kind of information :
>> - Article, to read later
>> - Book, with all its metadata (title, author, subject, etc)
>> - Magazin, to buy later (title, editor, price, etc)
>> - IRL event, that I want to go
>>
>> For each case, different kind of data is needed to be extracted from the
>> web page and passed to Org-capture.
>
> This should all be possible.
>
>> * Capture Protocol
>>
>> I know it exist an org-protocol for capture, but after reading the
>> manual (section 17.16.2 The capture protocol), there is something
>> I did not understand.
>>
>> On the URL of the capture protocol, key value pairs can be specified.
>> But are they a predefined set of keys, independent to the capture
>> template, or are they related to the capture template special words (ex:
>> %a) ?
>>
>> Is it possible, with Org-protocol, to pass data to be stored into org entry
>> properties, or an arbitrary string ?
>
> Capturing the selection works.
>
> Sample capture templates:
> #+begin_src emacs-lisp
>   ("p" "Protocol" entry (file+headline ,(concat my-org-dir "inbox.org") 
> "Inbox")
>"* %^{Title}\nSource: %u, %c\n #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?")
>
>   ("L" "Protocol Link" entry (file+headline ,(concat my-org-dir "inbox.org") 
> "Inbox")
>"* %? [[%:link][%:description]] \nCaptured On: %U")
> #+end_src
>
>> * Firefox extension for Org capture
>>
>> I have found 2 extensions for capturing to Org-mode from Firefox:
>>
>> - Org Capture (by Kosta):
>>   https://addons.mozilla.org/fr/firefox/addon/org-capture/
>>
>> - org-protocol (by Wojciech Siewierski):
>>   https://addons.mozilla.org/fr/firefox/addon/org-protocol/
>>
>> Which one do you suggest ?
>
> I'm using this one instead.
>
> Extension: https://github.com/Stebalien/org-capture-extension
> Image of configured extension: https://0x0.st/XMHN.png
>
> PS:
> I had also used this in the past. If you're willing to have a local
> python script listening on a port instead of using org-protocol,
> it might be an alternative.
>
> https://github.com/karlicoss/grasp


signature.asc
Description: PGP signature


Re: Capture from Firefox to Org-mode

2024-07-11 Thread Sébastien Gendre

Thank you for your replies.

I wrote more after the quotes below.

Ihor Radchenko  writes:
> I wrote https://github.com/yantar92/org-capture-ref to do exactly
> this. 

Is it meant to be used with org-ref ?

I didn't plan to build a bibliography with bibtex (at least for now). I
just plan to built a simple book reading tracker with Org-mode. But I
keep a note about your suggestion, it could be very helpful in the
future.

Thank you very much.

Ihor Radchenko  writes:
> Yes, but passing non-standard data is an undocumented feature. (It is
> stored in :query property that you may need to extract via
> %(plist-get (org-capture-get :query) :my-keyword) placeholder or
> something similar.

Thank you for the info. I will take a note about it.


signature.asc
Description: PGP signature


Re: Capture, template expansion and keyword for link type

2024-07-11 Thread Sébastien Gendre

Thank you for your reply.

I have write more, after the quotes below.

Ihor Radchenko  writes:
> 1. If there is %a placeholder in the template, org-capture stores link
>to the location from where you called org-capture
>
> 2. If there is no placeholder, the last stored link is used

But how the "%:keyword" information are built ?

What I have understand from the documentation, it has something to do
with a "link". But I found the documentation unclear about this.


The text help for "%:keyword" only say:
"Specific information for certain link types, see below."

And bellow it say:
"For specific link types, the following keywords are defined:"

And the footnote say:
"If you define your own link types (see Adding Hyperlink Types), any
property you store with org-store-link-props can be accessed in capture
templates in a similar way."

As I didn't plan to define custom link, and read all the manual part
about it, as a simple org-capture user I have difficulties to understand
how the "%:keywords" are generated and how I can know which ones a
available in which condition.

At least, based on what the section "10.1.3.2 Template expansion" of
Org-mode documentation tell me.

Mak Nikulin say that these "%:keyword" are created by major modes.


Ihor Radchenko  writes:
> Not directly. Additional keywords are stored inside undocumented %:query
> keyword value.

So, I would need to use the "%(EXP)", and as "EXP", I need to write
Elisp code that will extract supplemental data passed on the
org-protocol url during the call ?


Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Re: Capture, template expansion and keyword for link type

2024-07-11 Thread Sébastien Gendre
Max Nikulin  writes:
> See the "Link type, Available keywords" table in this section.
> `org-capture' may be executed in various Emacs buffers and available
> keywords may depend on major mode.

Is it necessary to call "org-store-link" before calling "org-capture" to
extracet the informations used by theses keywords ?

Or did I missundertant how it work ?

I found the documentation unclear about this.

Is there a way to discover the keywords that a major mode provide to a
capture template ?



Max Nikulin  writes:
> Some time ago I tried %(exp) elisp snippets in templates (untested)
>
>   "* [[%:link][%:description]]
> #+BEGIN_QUOTE
> %i
> #+END_QUOTE
> %(let ((bla (plist-get (plist-get org-store-link-plist :query) :bla)))
>(or bla "No bla"))"
>
> emacsclient
> 'org-protocol:/capture?template=s&title=Hello&body=World&url=http:%2F%2Fexample.com&bla=foo'

A new parameter added to the org-protocol url is only accessible through
the ":query" key ? It will not create a new "%:keywoard" automatically ?



What I would love to do, is creating a Firefox extension that can
extract different metadata from known well known web site and pass them
to an Org-mode capture through org-protocol.

For example, for a book, extracting author, title, year, etc.

And then, I could simply create a capture template that would use the
keywords "%:author", "%:title", etc.

I was also thinking, instead of a Firefox extension, creating an Elisp
function that take a web page URL as parameter, extract the metadata
from the web page and then call Org-capture providing the keywords
"%:author", "%:title", etc, to the template.

But I don't know how to do the last part and I cant found documentation
about it. And with this second solution, I don't know how to make it
work with org-protocol. As an org-protocol call result directly in an
Org-capture call. And extracting metadata from Firefox give more
flexibility on manually selecting information to extract on the web page.



signature.asc
Description: PGP signature


Capture, template expansion and keyword for link type

2024-07-10 Thread Sébastien Gendre
Hello,


I was reading the Org-mode manual, at section "10.1.3.2 Template
expansion":
https://orgmode.org/manual/Template-expansion.html

And I was a little bit confused by the "%:keyword". The manual say:
"Specific information for certain link types, see below."

Where did this link come from ?

When is it defined, and from/to where ?

To be able to use the "%:keyword" in a capture: Do I need to store a
link before calling org-capture ? Or do the call of org-capture will
automatically store a link to where my point is before the call ?

The manual page of template expansion did not explain it.

Also, if a capture template is selected after an org-protocol call, the
documentation say that only 3 keywords are available: %:link’,
‘%:description’ and ‘%:annotation’.

Is it possible to passe more keyword through an org-protocol call ?



Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Capture, template expansion and keyword for link type

2024-07-10 Thread Sébastien Gendre
Hello,


I was reading the Org-mode manual, at section "10.1.3.2 Template
expansion":
https://orgmode.org/manual/Template-expansion.html

And I was a little bit confused by the "%:keyword". The manual say:
"Specific information for certain link types, see below."

Where did this link come from ?

When is it defined, and from/to where ?

To be able to use the "%:keyword" in a capture: Do I need to store a
link before calling org-capture ? Or do the call of org-capture will
automatically store a link to where my point is before the call ?

The manual page of template expansion did not explain it.

Also, if a capture template is selected after an org-protocol call, the
documentation say that only 3 keywords are available: %:link’,
‘%:description’ and ‘%:annotation’.

Is it possible to passe more keyword through an org-protocol call ?



Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Capture from Firefox to Org-mode

2024-07-09 Thread Sébastien Gendre
Hello everyone,

How to capture data from a web page to Org-mode ?



* What I need

I want to be able to capture different kind of information :

- Article, to read later

- Book, with all its metadata (title, author, subject, etc)

- Magazin, to buy later (title, editor, price, etc)

- IRL event, that I want to go


For each case, different kind of data is needed to be extracted from the
web page and passed to Org-capture.



* Capture Protocol

I know it exist an org-protocol for capture, but after reading the
manual (section 17.16.2 The capture protocol), there is something
I did not understand.

On the URL of the capture protocol, key value pairs can be specified.
But are they a predefined set of keys, independent to the capture
template, or are they related to the capture template special words (ex:
%a) ?

Is it possible, with Org-protocol, to pass data to be stored into org entry
properties, or an arbitrary string ?



* Firefox extension for Org capture

I have found 2 extensions for capturing to Org-mode from Firefox:

- Org Capture (by Kosta):
  https://addons.mozilla.org/fr/firefox/addon/org-capture/

- org-protocol (by Wojciech Siewierski):
  https://addons.mozilla.org/fr/firefox/addon/org-protocol/

Which one do you suggest ?





Best regards

---
Gendre Sébastien



PS:

I have seen a typo in the manual "17.16.2 The capture protocol":
https://orgmode.org/manual/The-capture-protocol.html

At the end of the first phrase, it miss a space between the "a" and
"capture". Instead of "a capture", we have "acapture".


signature.asc
Description: PGP signature


Re: Using Org-mode macros as LaTeX macros

2024-06-01 Thread Sébastien Gendre


Thank you for your reply, Bruno.

I need to have an Org document that could be used as easily as possible
by anyone else. Sadly, having to define new Emacs function could be too
much for what my school ask.

Or I need to make it available publicly as an Emacs package.




Bruno Barbier  writes:

> Hi Sébastien,
>
>
> Sébastien Gendre  writes:
>
>> TL;DR: How can I use the Org-mode macros as LaTeX macros inside an
>>export LaTeX bloc ?
>>
>
> It looks like macros are not expanded in latex export blocks, indeed.
>
> You may define your own filter to ask Org to expand them.
>
> With the 2 functions below, and this configuration:
>
>  (add-to-list 'org-export-filter-export-block-functions
>   'my-latex-filter-export-block)
>
>
> the following org document:
>
>  #+MACRO: orga School Name
>
>  #+begin_export latex
>  \begin{titlepage}
>Some custom LaTeX here
>This is my school: {{{orga}}}
>  \end{titlepage}
>  \newcommand{\orga}orga
>  #+end_export
>
> is exported like this:
>
>  \begin{titlepage}
>Some custom LaTeX here
>This is my school: School Name
>  \end{titlepage}
>  \newcommand{\orga}{School Name}
>
>
> Bruno. 
>
>
>
>
> (cl-defun my-org-macro-expand-text (text &key templates)
>   "Expand TEMPLATES in TEXT.
> Assume the current-buffer is an org mode buffer.
> If TEMPLATES is nil, use 'org-macro-templates'."
>   (unless templates (setq templates org-macro-templates))
>   (with-temp-buffer
> (insert text)
> (org-mode)
> (goto-char (point-min))
> ;; Extracted from 'org-macro-replace-all'
> (while (re-search-forward "{{{[-A-Za-z0-9_]" nil t)
>   (let ((macro (save-excursion
>(goto-char (match-beginning 0))
>(org-element-macro-parser)))
> value)
> (when macro 
>   (let* ((value (org-macro-expand macro templates))
>(begin (org-element-begin macro)))
>   (delete-region
>begin
>(progn (goto-char (org-element-end macro))
> (skip-chars-backward " \t")
> (point)))
>   (save-excursion (insert value))
> (buffer-substring (point-min) (point-max
>
> (defun my-latex-filter-export-block (text backend info)
>   "Replace macros in LaTeX export blocks."
>   (when (org-export-derived-backend-p backend 'latex)
> (my-org-macro-expand-text text)))
<#secure method=pgpmime mode=sign>



Using Org-mode macros as LaTeX macros

2024-05-31 Thread Sébastien Gendre

TL;DR: How can I use the Org-mode macros as LaTeX macros inside an
   export LaTeX bloc ?



Hello,


In a document I write for my school, using Org-mode, I have defined a
Org-mode macro. Named "orga" (for organization) and who have the name of
my school as value.


Example:

#+MACRO: orga School Name


It's very useful to re-use the name of my school in the entire document.
And I can also re-use the title, author name, etc, who are defined at
the top of my Org-mode document with "#+TITLE:", "#+AUTHOR:", etc.


But my school ask for a special title page in the PDF export, with a
specific design. Something very different from what I get by default
with an Org-mode to LaTeX/PDF export.


For now, I have disabled the auto title generation, with an "#+OPTIONS:
title:nil". And I created an export LaTeX bloc at the top of my Org
document. In this bloc, I can make a custom title page in LaTeX and
export to a PDF who have the design requested by the school.

Example:

#+begin_export latex
\begin{titlepage}
  Some custom LaTeX here…
\end{titlepage}
#+end_export


But, I cannot use Org-mode macros inside this export LaTeX bloc. If I
write "{{{title}}}" in this bloc, it is exported into LaTeX with no
Org-mode macro substitution. I also tried to define a LaTeX macros, that
use the Org-mode macro value, with "#+LATEX_HEADER:" like this:

#+LATEX_HEADER:  \newcommand{\orga}orga


But the result in the LaTeX export file is:
"\newcommand{\orga}orga". And not "\newcommand{\orga}{School
Name}". No Org-mode macro substitution.

How can I use the Org-mode macros as LaTeX macros inside my export LaTeX
bloc ?

I have searched on the web, but didn't success to found a solution.


Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Re: Managing acronyms in an Org-mode document

2024-05-26 Thread Sébastien Gendre
Thank you very much.

I will take a look at it.

Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> Is there a way to manage acronyms in an Org-mode document ?
>
> https://github.com/tecosaur/org-glossary
<#secure method=pgpmime mode=sign>



LaTeX brocs: Babel vs export

2024-05-26 Thread Sébastien Gendre
Hello,

tl;dr: Which is the best option between LaTeX source bloc and LaTeX
   export bloc to embed some LaTeX code in my Org-mode document ?
   

I'm a last year student and very soon I will have to write a "Mémoire"
about my diploma work. (Sorry for using the french name, I didn't found
the English word and I'm sure it's not "Memory", like in computer
memory).

I plan to use Org-mode to write my "Mémoire", then export it to LaTeX
then PDF. And because I will have to draw some electronic circuits, I
want to use the LaTeX pkg named "CircuitIkz". And I want to put the
drawn circuits in figures with a caption.

For doing it, the manual say I can write the latex code into an export
block, like this:

#+BEGIN_EXPORT latex
  any arbitrary LaTeX code
#+END_EXPORT

I have done it with success, but I have to define the figure and the
caption in LaTeX, into the export bloc.

But I remember that it's possible to use Babel source bloc, indicate
"latex" as language then evaluate it. But I've never do it. Is it better
than using export bloc ? Does it give a simple way to encapsulate the
result into a figure with caption ?



Best regards

---
Gendre Sébastien



signature.asc
Description: PGP signature


Manual table of content on specific object type

2024-05-25 Thread Sébastien Gendre
Hello,

I have a question about manual table of content of specific type of
objects with a caption.

On the manual, chapter "13.3 Table of Contents", the keyword "#+TOC:"
can be used to list tables and listings if they have caption. But we can
have caption on more than tables and listings.

Is it possible to have a TOC of figures, or any other object with a
caption ? If yes, where can I found the list of object type and the word
to use ?



Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


Managing acronyms in an Org-mode document

2024-05-25 Thread Sébastien Gendre
Hello,


Is there a way to manage acronyms in an Org-mode document ?

For example:

1. I write a list of acronyms and their definition inside a "List of
   acronyms" heading
   
2. In my document, when I simply write the acronyms in my text

3. When I export my Org-mode document, the first time that an acronym is
   written, it appear in full version and all the other times it appear
   in acronym version


Best regards

---
Gendre Sébastien


signature.asc
Description: PGP signature


[no subject]

2024-04-11 Thread Sébastien Gendre
Hello,

When I try to execute a block of PlantUML in an Org document, I get an
error message:

"org-babel-execute-src-block: No org-babel-execute function for plantuml!"




I have configured Org mode to enable execution of plantUML source block
by adding this in my init.el:

(setq plantuml-default-exec-mode 'executable)
(setq org-plantuml-exec-mode 'plantuml)
(add-to-list
 'org-babel-load-languages
 '(plantuml . t))




Here is an example of PlantUML block:
#+begin_src plantuml :file ./images/FPGA/DCC/
  @startuml
  robust "Signal DCC" as DCC_sign
  DCC_sign has +U,0,-U

  @DCC_sign
  0 is +U
  +58 is -U
  +58 is +U
  +100 is -U
  +100 is +U
  +100 is -U
  +100 is +U
  +58 is -U
  +58 is +U
  +100 is -U
  +100 is +U
  +58 is -U
  +58 is +U
  +58 is -U
  +58 is +U
  +100 is -U
  +100 is +U

  @enduml
#+end_src

My version of Org-mode is: 9.6.15


What did I miss ?



Re: When src block result is an image, how to define caption, html and latex attributes ?

2024-04-10 Thread Sébastien Gendre


"Fraga, Eric"  writes:
> I tend to name every src block
> anyway as it makes navigation easier (using
> org-babel-goto-named-src-block).


I didn't know this function exist. Thank you very much. :)



Re: When src block result is an image, how to define caption, html and latex attributes ?

2024-04-09 Thread Sébastien Gendre


Ihor Radchenko  writes:

> P.S.
>
> We should really indicate the difference between normal and affiliated
> keywords better.

What do you mean ?



Re: When src block result is an image, how to define caption, html and latex attributes ?

2024-04-09 Thread Sébastien Gendre
If I name the source block, it work.

Is it because:

* When a source block is named, it's result is also named

* When a result is named, Org-mode can locate it and replace its value

* But when a result is not named, Org-mode insert a #+RESULTS: just
  after the block and create a new one if it cannot found the previous
  one right after the block

?


"Fraga, Eric"  writes:

> On Tuesday,  9 Apr 2024 at 16:11, Sébastien Gendre wrote:
>> If I add them manually after the result generation, and generate again
>> the result, the #+CAPTION, #+LATEX_ATTR and #+HTML_ATTR are moved after
>> the result.
>
> Does this happen if your src block is NAMEd?




Re: When src block result is an image, how to define caption, html and latex attributes ?

2024-04-09 Thread Sébastien Gendre
If I place the #+CAPTION: and #+HTML_ATTR before the #+RESULTS:, then
generate again the result of the source block, I got a new #+RESULTS: on
top of the previous and its caption and html attributes.

Example, before regenerate the source block result:



#+CAPTION: Test image
#+HTML_ATTR: :width 30px
#+RESULTS:
[[file:images/simple-test.png]]



And after regenerate the source block result:



#+RESULTS:
[[file:images/simple-test.png]]

#+CAPTION: Test image
#+HTML_ATTR: :width 30px
#+RESULTS:
[[file:images/simple-test.png]]



My version of Org-mode is 9.6.15


Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> When a source block create a result who is an image, how can I define
>> the #+CAPTION, #+LATEX_ATTR and #+HTML_ATTR of this image ?
>>
>> If I add them manually after the result generation, and generate again
>> the result, the #+CAPTION, #+LATEX_ATTR and #+HTML_ATTR are moved after
>> the result.
>
> I am unable to reproduce. The updated result does not displace the
> affiliated keywords on my side, using the latest main and the latest
> stable Org mode version.




When src block result is an image, how to define caption, html and latex attributes ?

2024-04-09 Thread Sébastien Gendre
Hello,


When a source block create a result who is an image, how can I define
the #+CAPTION, #+LATEX_ATTR and #+HTML_ATTR of this image ?

If I add them manually after the result generation, and generate again
the result, the #+CAPTION, #+LATEX_ATTR and #+HTML_ATTR are moved after
the result.

In org-babel documentation, I didn't found any header argument like
":result-caption" or something similar. There is a post processing, but
I cannot found the list of available post processing actions and their
config.


Best regards




Re: Questions about splitting a tree into multiple files

2024-03-14 Thread Sébastien Gendre
Thank you.


Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> At first, I create one Org file where each book is a heading of level 1.
>> The title of the heading is the title of the book, the status is a TODO
>> keyword, the properties use Org-mode properties feature. And the notes
>> are simply headings of level 2, where the title of these headings
>> correspond to the chapter of the book.
>> ...
>> Now, after adding a lot of books and notes, the file is too big. I want
>> to split it into multiple files: Each file is a book.
>>
>> But with this, I have multiple problems:
>>
>> A file doesn't have a status. If I want to assign a status, I have to
>> create a heading of level 1 representing the book. But in this case,
>> when I export the file to PDF or HTML, the result doesn't have a title.
>> And instead of having each notes as a level 1 section, I have 1 section
>> of level 1, representing the book, and all the rest are sections of level
>> 2.
>
> Rather than exporting the whole file, you can export subtree. Then, book
> heading title will be used as exported document title.




Org-agenda: List project with deadlines

2024-03-11 Thread Sébastien Gendre
Hello,

I have some problems to manage my tasks for school with Org-mode. I had
read manual, blog posts and tried different way. With no success.


* What I need.

For the school, I have a list of projects to do. Each with a deadline
and different level of importance. And each project have their how
tasks. Some with schedule, some with deadline and some with neither.

Some times, I need to see only the list of projects, with their status,
deadline, percentage done, importance and class name. How many days left
would be nice. But not their inner tasks.

When I work on a project, I need to see its tasks with their
deadline/schedule, importance/optionality and status.



* The problem I got

I search a good way to manage it with Org-mode, but I have difficulty to
do it easily. I always end with a complex system.


** Record the information

Each class have its own file. In each class file, I have a section named
"Projects and Tasks". As the name say, this section regroup the class
projects and tasks.

For each project and their tasks, I was thinking of creating a heading
for the project and sub-heading for its tasks. Adding a [%] in the
project title, a level A to C for its importance, a DEADLINE for its
deadline and a tag for the class name.

To record a new projects, I use a capture template to not forget
anything. The new project go into an Inbox.org file and I use Org-refile
to move it to its file.

But how do I differentiate a project from a task for Org-mode ? Tags
have inheritance. Do I use a property ?

Is it a good idea to organize every thing by classes ? Or is it better
to have one Org file named "Assignments" to regroup every projects ? In
these files, I have other information recorded, like the taken notes,
the list of distributed documents and their notes and also the list of
class sessions to see them in my agenda.


** List the projects

To list only the projects, I wanted to use Org-agenda todo list view and
editing the column shown. But the manual say it may cause issues.

What can I do ? Do I use it correctly or do I need to it in a completely
different way ? Is it better to use a column view for it ? If yes, is it
possible to build a column view from multiple files ?


** List of tasks from a project

What is the best way to do it ? A custom Org-agenda view for each
project ? A column view under the project top heading ?


* Conclusion

I have the felling that wanting to have everything well organized and
using Org-agenda push me to think of too much complex ways to do thing.

Maybe I need to do like with a bullet journal, with an Org-mode file
instead of a page and don't try to use too much features.

Do you have any suggestion ? Do I forget something ? For what I have
suggested, am I completely wrong ?



Best regards



Re: Summarize a list of work for school

2024-03-11 Thread Sébastien Gendre
When you display a list of tasks in Org-agenda, you have these columns:

- Category
- Status
- Task title
- Tags

But what I need in my list of work for school is:
- Task title
- Importance
- Deadline date and time
- Name of the work



Malik  writes:

> Hello,
>
> I am also thinking about a good org-agenda configuration.
> Your usecase sounds good.
>
> What do you mean about the fixed columns and about what issues are you 
> thinking?
>
> Am 10. März 2024 08:54:45 MEZ schrieb "Sébastien Gendre" :
>
>  Hello,
>
> I want to use Org-mode to track the works I have to do for school.
>
> For each course, I have a one file in which I write everything about the
> course. Including the work I have to do, with it's deadline and
> other information.
>
> And I need a view which summarize all the works to do and display
> information with these columns:
>
> - Name of the work
> - Percentage done
> - Deadline date and time
> - Importance
>
> I was thinking of using a custom agenda view, but by default the columns
> are fixed. And activating the column view in agenda can cause issues, if
> I read correctly the manual.
>
> Do you have any suggestion ?
>
> Best regards




Re: How to get in-buffer setting from Elisp code

2024-03-10 Thread Sébastien Gendre
This is it.

Thank you very much.


Gerard Vermeulen  writes:

> On 10.03.2024 12:39, Sébastien Gendre wrote:
>> Hi,
>> Thank you for your reply.
>> I talk about the Org-mode In-Buffer settings:
>> https://orgmode.org/manual/In_002dbuffer-Settings.html
>> 
> Try for instance: (org-collect-keywords '("TITLE"))
>
> See:
> https://emacs.stackexchange.com/questions/21459/programmatically-read-and-set-buffer-wide-org-mode-property
>
> Regards -- Gerard




Re: How to get in-buffer setting from Elisp code

2024-03-10 Thread Sébastien Gendre
Hi,

Thank you for your reply.

I talk about the Org-mode In-Buffer settings:
https://orgmode.org/manual/In_002dbuffer-Settings.html



Bruno Barbier  writes:

> Hi Sébastien,
>
> Sébastien Gendre  writes:
>
>> Hello,
>>
>> How can I access to an in-buffer setting value, from Elisp code ?
>>
>
> IIUC, they are called "Buffer-Local Variables".
>
> Using 'buffer-local-value' should give you the value of a variable in a
> buffer.
>
> See the manual for more:
>   (info "(elisp) Buffer-Local Variables")
>
>
> Bruno




Questions about splitting a tree into multiple files

2024-03-10 Thread Sébastien Gendre
Hello,

I have some questions about splitting an Org-mode tree of headings into
multiple files.

Lets take an example: I want to track books I have read and take notes
about each book.

Each book have a title, a status, some properties and notes. The properties are:

* Author
* Editor
* Year

At first, I create one Org file where each book is a heading of level 1.
The title of the heading is the title of the book, the status is a TODO
keyword, the properties use Org-mode properties feature. And the notes
are simply headings of level 2, where the title of these headings
correspond to the chapter of the book.

Now, after adding a lot of books and notes, the file is too big. I want
to split it into multiple files: Each file is a book.

But with this, I have multiple problems:

A file doesn't have a status. If I want to assign a status, I have to
create a heading of level 1 representing the book. But in this case,
when I export the file to PDF or HTML, the result doesn't have a title.
And instead of having each notes as a level 1 section, I have 1 section
of level 1, representing the book, and all the rest are sections of level
2.

A file can have properties, but they are written before in-buffer
settings.

If I use org-agenda to summarize all the book, they have to be heading.
Not only files.

To say it simply, when I split one Org file to multiples ones: Org-mode
features, like Agenda or status tracking, need to continue using
headings to represent books. While exporting need to use files to
represent books.

And I'm a bit confuse by this.


Best regards




Summarize a list of work for school

2024-03-10 Thread Sébastien Gendre
Hello,

I want to use Org-mode to track the works I have to do for school.

For each course, I have a one file in which I write everything about the
course. Including the work I have to do, with it's deadline and
other information.

And I need a view which summarize all the works to do and display
information with these columns:

- Name of the work
- Percentage done
- Deadline date and time
- Importance

I was thinking of using a custom agenda view, but by default the columns
are fixed. And activating the column view in agenda can cause issues, if
I read correctly the manual.

Do you have any suggestion ?


Best regards





How to get in-buffer setting from Elisp code

2024-03-09 Thread Sébastien Gendre
Hello,

How can I access to an in-buffer setting value, from Elisp code ?


Best regards



Re: ox-coma-letter and org-export-dispatch

2023-06-21 Thread Sébastien Gendre
It work.

Thank you. :)


Nick Dokos  writes:

> Sébastien Gendre  writes:
>
>
>> Recently I tested the export functions of ox-coma-letter. It work very
>> well.
>>
>> But I cannot found the entries in org-export-dispatch.
>>
>
> You probably need to load (or require) the feature. Add this to your
> init file:
>
> --8<---cut here---start->8---
> (require 'ox-koma-letter)
> --8<---cut here---end--->8---




ox-coma-letter and org-export-dispatch

2023-06-21 Thread Sébastien Gendre
Hello,


Recently I tested the export functions of ox-coma-letter. It work very
well.

But I cannot found the entries in org-export-dispatch.

Did I miss something ?



Best regards

---
Gendre Sébastien



Re: Export settings in subtree level with org-koma-letter

2023-06-16 Thread Sébastien Gendre
So, I posted my question too soon.

To use the export option as properties, I had to add EXPORT_ prefix.

Example, not this:
:PROPERTIES:
:LANGUAGE: en
:AUTHOR: Me
:FROM_ADDRESS: 4 place of nowhere
:END:

But this:
:PROPERTIES:
:EXPORT_LANGUAGE: en
:EXPORT_AUTHOR: Me
:EXPORT_FROM_ADDRESS: 4 place of nowhere
:END:

Sorry.


Sébastien Gendre  writes:

> Hello,
>
> I try to use Org-mode and org-koma-letter to make letters.
>
> I want to have one file where each first level headline as a letter. So,
> I tried to define the export settings of org-koma-letter as headline
> properties. With no success.
>
>
> Here is an example:
>
> #+begin_src org
>
> * Example of letter
> :PROPERTIES:
> :LANGUAGE: en
> :AUTHOR: Me
> :FROM_ADDRESS: 4 place of nowhere
> :EMAIL: m...@example.com
> :PHONE_NUMBER: 000-000-000
> :TO_ADDRESS: Someone, 4 place somewhere
> :OPENING: Hello,
> :CLOSING: Bye.
> :DATE: \today
> :PLACE: Here
> :OPTIONS: foldmarks:nil phone:t email:t
> :END:
>
> This is a test of text, a test of text, a test of text, a test of
> text, a test of text, a test of text, a test of text, a test of text,
> a test of text, a test of text, a test of text, a test of text, a test
> of text, a test of text, a test of text, a test of text, a test of
> text, a test of text, a test of text, a test of text, a test of text,
> a test of text, a test of text, a test of text, a test of text, a test
> of text, a test of text, a test of text, a test of text, a test of
> text, a test of text, a test of text, a test of text, a test of text,
> a test of text, a test of text, a test of text, a test of text.
>
>
> * Another example of letter
> :PROPERTIES:
> :LANGUAGE: en
> :AUTHOR: Not me
> :FROM_ADDRESS: 5 place of nowhere
> :EMAIL: not...@example.com
> :PHONE_NUMBER: 000-000-001
> :TO_ADDRESS: Someone, 5 place somewhere
> :OPENING: Hello there,
> :CLOSING: I'll be back.
> :DATE: \today
> :PLACE: There
> :OPTIONS: foldmarks:nil phone:t email:t
> :END:
>
> This is not a test of text, not a test of text, not a test of text, not a 
> test of
> text, not a test of text, not a test of text, not a test of text, not a test 
> of text,
> not a test of text, not a test of text, not a test of text, not a test of 
> text, not a test
> of text, not a test of text, not a test of text, not a test of text, not a 
> test of
> text, not a test of text, not a test of text, not a test of text, not a test 
> of text,
> not a test of text, not a test of text, not a test of text, not a test of 
> text, not a test
> of text, not a test of text, not a test of text, not a test of text, not a 
> test of
> text, not a test of text, not a test of text, not a test of text, not a test 
> of text,
> not a test of text, not a test of text, not a test of text, not a test of 
> text.
>
> #+end_src
>
> After an export with ~(org-koma-letter-export-to-pdf nil t)~, in the
> resulted PDF, only the author and date are set.
>
> Do I do something wrong ?
>
> Emacs version: 28.2
> Orgmode version: 9.5.5
>
>
>
> Best regards.




Export settings in subtree level with org-koma-letter

2023-06-16 Thread Sébastien Gendre
Hello,

I try to use Org-mode and org-koma-letter to make letters.

I want to have one file where each first level headline as a letter. So,
I tried to define the export settings of org-koma-letter as headline
properties. With no success.


Here is an example:

#+begin_src org

* Example of letter
:PROPERTIES:
:LANGUAGE: en
:AUTHOR: Me
:FROM_ADDRESS: 4 place of nowhere
:EMAIL: m...@example.com
:PHONE_NUMBER: 000-000-000
:TO_ADDRESS: Someone, 4 place somewhere
:OPENING: Hello,
:CLOSING: Bye.
:DATE: \today
:PLACE: Here
:OPTIONS: foldmarks:nil phone:t email:t
:END:

This is a test of text, a test of text, a test of text, a test of
text, a test of text, a test of text, a test of text, a test of text,
a test of text, a test of text, a test of text, a test of text, a test
of text, a test of text, a test of text, a test of text, a test of
text, a test of text, a test of text, a test of text, a test of text,
a test of text, a test of text, a test of text, a test of text, a test
of text, a test of text, a test of text, a test of text, a test of
text, a test of text, a test of text, a test of text, a test of text,
a test of text, a test of text, a test of text, a test of text.


* Another example of letter
:PROPERTIES:
:LANGUAGE: en
:AUTHOR: Not me
:FROM_ADDRESS: 5 place of nowhere
:EMAIL: not...@example.com
:PHONE_NUMBER: 000-000-001
:TO_ADDRESS: Someone, 5 place somewhere
:OPENING: Hello there,
:CLOSING: I'll be back.
:DATE: \today
:PLACE: There
:OPTIONS: foldmarks:nil phone:t email:t
:END:

This is not a test of text, not a test of text, not a test of text, not a test 
of
text, not a test of text, not a test of text, not a test of text, not a test of 
text,
not a test of text, not a test of text, not a test of text, not a test of text, 
not a test
of text, not a test of text, not a test of text, not a test of text, not a test 
of
text, not a test of text, not a test of text, not a test of text, not a test of 
text,
not a test of text, not a test of text, not a test of text, not a test of text, 
not a test
of text, not a test of text, not a test of text, not a test of text, not a test 
of
text, not a test of text, not a test of text, not a test of text, not a test of 
text,
not a test of text, not a test of text, not a test of text, not a test of text.

#+end_src

After an export with ~(org-koma-letter-export-to-pdf nil t)~, in the
resulted PDF, only the author and date are set.

Do I do something wrong ?

Emacs version: 28.2
Orgmode version: 9.5.5



Best regards.




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.




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

2023-04-29 Thread Sébastien Gendre
Hello,

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.

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) ?

* How can I set a postamble in the sitemap different from my blog
  posts ?


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.


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

Best regards



Org-mode notes about school lessons

2023-02-24 Thread Sébastien Gendre
Hello everyone,

I used Org-mode for taking notes in some school lessons, but it was a
bit chaotic. I try to make it more efficient, easy to navigate and
manage.

I would like to know if you have any advice or suggestions.

Here, I will explain what I need, what I think to do this semester and
where I don't know how or what to do. It could be a long e-mail.

* What I need

First, I need to take notes for all school lessons.

For each lessons, I need to note:
- Name
- Schedule
- Classroom
- Teacher name and e-mail
- Assistant name and e-mail
- URL to the web page of this lesson on our online learning website
- List of all distributed documents
- Note on each of the distributed documents
- Lesson plan
- Notes taken in classroom while the teacher speak
- Notes taken while doing the practice work
- Tasks asked by the teacher

Secondly, I need a quick view on the week lessons schedule: For each day,
what lesson I have, when and where.

Thirdly, I need to manage the projects that teachers ask us to do. With 
deadlines.


* What I plan to do

As I need to write a lot for each lesson, and each lesson are mostly
independent from each other, I plan to have 1 file per lesson.

In each file, I plan to have the same structure:
- General information
- Tasks and Projects
- Distributed documents
- Notes

In "General information", I put the schedule of the lesson, the
classroom, the teacher and assistant name and e-mail and the URL to our
online platform.

In "Tasks and Projects", I put all work the teacher ask us to do. For
each, an Org-mode sub-headline with a TODO status. A project is just a task
with sub-tasks. Or maybe have a PROJECT status ?

In "Distributed documents", I create a sub-headline for each document. I
then attach a copy of the document to its sub-headline with org-attach.
Finally, I took note with Org-noter.

In "Notes" I make a tree of sub-headline based on the lesson plan. And,
when the teacher talk about a subject, I took a note in it's
sub-headline.


* What I miss

There is some point I'm note sure on what or how to do it.

First, the tasks. I don't know If it's better to keep them in the lesson
org file or move them with all my other tasks (home and work). I think
to include them in the org-agenda, so I can have global view of all ma
tasks. From school, work and home.

Second, the weekly schedule. Is it better to have a column view on a
separate file or to see the all the lessons in my org-agenda ? In the
first case, is it possible to build a column view from different file ?
In the second case, how to do it and to manage vacations ?

Third, do I include my work notes inside the lesson file ? Or do I
create a separate file for each works ? Some work asked to do are just
exercise, but some are rated and in this case we are asked to write a
report.

Fourth, is it better to include my school notes into org-roam with other
knowledge or keep them separate ? If I mix what I learn on my free time
and what I learn on school time, it would make more to review before an
exam.


I'm open to any suggestions or advice. Do not hesitate. ;)


Best regards



Re: PDF export, table of contents and internal links

2022-06-29 Thread Sébastien Gendre
Thanks for your advice.

You remember me that, in the past, I had modified
"org-latex-pdf-process". I just forget about it.

By looking this variable with "describe-variable", I see its default
value is:
"latexmk -f -pdf -%latex -interaction=nonstopmode -output-directory=%o %f"

I modified it to be:
"%latex -shell-escape -interaction nonstopmode -output-directory %o %f"

Because, when I wanted to add "-shell-escape" option to latexmk, it
seemed too complex to me.

If I learned LaTeX syntax in the past, I never take enough time to learn
how work each compilation possibility. I feel lost with all the
pdflatex, teklive, lualatex, double or quadruple compilation, etc.

Do you have good articles or book to suggest about this part of LaTeX ?

To come back to "org-latex-pdf-process", I only added "-shell-escape"
for the minted package. To have beautify code block. But maybe it exist
better solution ? Someone have experience with Engrave Faces ?


Juan Manuel Macías  writes:

> Hi, Sébastien,
>
> Sébastien Gendre writes:
>
>> To generate the table of contents, I have to compile my .tex file into
>> PDF 2 times. The first time, I got no toc. The second time the toc was
>> here.
>
> I would say It's a normal LaTeX thing. Sometimes LaTeX needs more than
> one compilation to finish processing things like TOC or
> cross-references, because it writes to auxiliary files if there has been
> any change in those elements. What I suggest is that you use latexmk as
> the default 'org-latex-pdf-process'. latexmk is a script that takes care
> of intelligently compiling everything, as many times as necessary.
>
> I have in my init:
>
> (setq org-latex-pdf-process
>   '("latexmk -lualatex -output-directory=%o -e '$lualatex=q/lualatex
>   %%O -shell-escape %%S/' %f"))
>
> (I use LuaTeX instead of pdfTeX).
>
> Best regards,
>
> Juan Manuel 




PDF export, table of contents and internal links

2022-06-29 Thread Sébastien Gendre
Hello,

Recently I wrote a little document in Org-mode and I exported it to
LaTeX then PDF.

But I got a problem: In the PDF, there was no table of contents and the
internal links were absent.

In the PDF I had a "Table of contents" title, but only the title. Below
it, I got nothing.

On Org-mode side, the table of contents is not disable. And in the .tex
file, I got a "\tableofcontents" below the "\maketitle".

To generate the table of contents, I have to compile my .tex file into
PDF 2 times. The first time, I got no toc. The second time the toc was
here.

Same situation with internal links.

Did I got this problem because the generated PDF was 76 pages ?
How can I fix it so I can have toc generated from Org-mode export ?


Best regards.

---
Sébastien





Re: Tips on using Org-mode to manage a reading list

2022-05-16 Thread Sébastien Gendre
Thanks for your suggestions.

I got to many books and articles for a table, but using tables for statistics 
could be usefull. :)

Le 17 mai 2022 01:28:47 GMT+02:00, William Denton  a écrit :
>On 16 May 2022, Sébastien Gendre wrote:
>
>> My goals are to:
>>  * List books and articles I want to read
>>  * Track books I have to buy and which I already own
>>  * Track books and articles I have read
>>  * Take notes on books I have read
>> 
>> The following is what I plan to do.
>> 
>> The idea is to use an Org-mode heading for each book and the
>> properties of the books become the ones of the Org-mode heading. The
>> synopsis of the book can be in the body of the heading.
>
>I use Org to track my reading, but keep less information, so a simple table is 
>enough.  In 2015 I wrote up how it looked:
>
>https://www.miskatonic.org/2015/01/01/reading-diary-in-org/
>
>The basic annual reading list is still the same, but I'm doing a lot more with 
>the data now, using R to generate charts and other analysis.
>
>Your plan looks very much like something I saw on Planet Emacslife¹ a week or 
>two ago ... but now I can't find it because it scrolled off the bottom.  Maybe 
>someone else here saw it?  Or is the one who wrote it?  It was someone using 
>properties to store information about the books and then using a column view 
>to display all the information in a table.
>
>Could you fit everything into a table?  That's simpler than using properties. 
>But if you need lots of bibliographic detail, I guess that's the best solution 
>in Org.
>
>If you were willing to look outside Org then I'd recommend Zotero,² which is 
>designed to keep track of all that; there are Emacs tools to talk to Zotero, 
>or you could dump a BibTeX file and use Org's citation system.  If I were 
>doing what you want to do, I'd keep basic lists in tables in Org, keep notes 
>on books in structured headings grouped by subject and then chronological 
>order, and use Zotero for bibliographic management.
>
>Good luck!  Whatever you get started with, it'll be easy to refine and adapt 
>in a month or six depending on what you need.
>
>Bill
>
>¹ https://planet.emacslife.com/
>² https://www.zotero.org/
>
>--
>William Denton
>https://www.miskatonic.org/
>Librarian, artist and licensed private investigator.
>Toronto, Canada

Tips on using Org-mode to manage a reading list

2022-05-16 Thread Sébastien Gendre
Hello.

I want to use Org-mode to manage a reading list and I'm looking for
tips.

My goals are to:
  * List books and articles I want to read
  * Track books I have to buy and which I already own
  * Track books and articles I have read
  * Take notes on books I have read

The following is what I plan to do.

The idea is to use an Org-mode heading for each book and the
properties of the books become the ones of the Org-mode heading. The
synopsis of the book can be in the body of the heading.

Example:
#+begin_example

* TO-READ Four Futures - Life After Capitalism
:PROPERTIES:
:Title: Four Futures - Life After Capitalism
:Author:Peter Frase
:Score: 
:Publisher: Verso Books
:Release_date:  Unknown
:Link:  https://www.versobooks.com/books/1847-four-futures
:Pages: 
:END:

An exhilarating exploration into the utopias and dystopias that
could develop from present society

#+end_example

I can then structure my Org-mode file like I want. Here, the first
level headings are:
  * Articles
  * Books

In the "Books" heading I have the headings "Non-fiction" and
"Fiction".

To track the status of the books, I set the following for the Org-mode
file:
  * TO-GET
  * TO-READ
  * READING
  * READ (DONE state)

For adding new books, I can use Org-capture with a custom template.
The captured book can be saved inside an "Inbox" Org-mode file, then
moved to its destination heading with Org-refile.

For searching a book inside the file, I can use "Sparse Trees" or
Org-ql.

If I get the digital version of the book, I can attach it to its
corresponding heading with Org-attach.

And for taking notes, I can create headings inside the book heading.
Using Emacs narrow to focus on it. If I get the digital version of the
book, I can use Org-noter.

End of description.


Do you have any suggestions or idea ?

I don't know how to manage books with several volumes.
Do I create a heading for each volumes ?
Do I create one heading for the whole collection ?

The first is easy with 2 or 3 volumes, but not when I got 23 or more in a 
collection.

Do you have idea to manage borrowing and loaning books ?

Thank you in advance. :)


Best regards



Tips on using Org-mode to manage a reading list

2022-05-16 Thread Sébastien Gendre
Hello.

I want to use Org-mode to manage a reading list and I'm looking for
tips.

My goals are to:
  * List books and articles I want to read
  * Track books I have to buy and which I already own
  * Track books and articles I have read
  * Take notes on books I have read

The following is what I plan to do.

The idea is to use an Org-mode heading for each book and the
properties of the books become the ones of the Org-mode heading. The
synopsis of the book can be in the body of the heading.

Example:
#+begin_example

* TO-READ Four Futures - Life After Capitalism
:PROPERTIES:
:Title: Four Futures - Life After Capitalism
:Author:Peter Frase
:Score: 
:Publisher: Verso Books
:Release_date:  Unknown
:Link:  https://www.versobooks.com/books/1847-four-futures
:Pages: 
:END:

An exhilarating exploration into the utopias and dystopias that
could develop from present society

#+end_example

I can then structure my Org-mode file like I want. Here, the first
level headings are:
  * Articles
  * Books

In the "Books" heading I have the headings "Non-fiction" and
"Fiction".

To track the status of the books, I set the following for the Org-mode
file:
  * TO-GET
  * TO-READ
  * READING
  * READ (DONE state)

For adding new books, I can use Org-capture with a custom template.
The captured book can be saved inside an "Inbox" Org-mode file, then
moved to its destination heading with Org-refile.

For searching a book inside the file, I can use "Sparse Trees" or
Org-ql.

If I get the digital version of the book, I can attach it to its
corresponding heading with Org-attach.

And for taking notes, I can create headings inside the book heading.
Using Emacs narrow to focus on it. If I get the digital version of the
book, I can use Org-noter.

End of description.


Do you have any suggestions or idea ?

I don't know how to manage books with several volumes.
Do I create a heading for each volumes ?
Do I create one heading for the whole collection ?

The first is easy with 2 or 3 volumes, but not when I got 23 or more in a 
collection.

Do you have idea to manage borrowing and loaning books ?

Thank you in advance. :)


Best regards



Re: org-agenda todos list sorted by earliest deadline first

2022-05-10 Thread Sébastien Gendre


So, I updated to Org-mode 9.5.3 from ELPA and the problem is gone.

Now, I get the tasks in the agenda in the correct order: Earliest
deadlines firsts, on top of the tasks list, then the tasks without
deadlines.

The only option I have to set is:
```
(setq org-agenda-sorting-strategy '((agenda deadline-down time-up habit-up 
priority-down timestamp-down category-keep)
(todo deadline-up priority-down 
category-keep)
(tags priority-down category-keep)
(search category-keep)))
```

Do the `deadline-up` option will apply to all todo lists in the agenda ?
Even the ones in custom views ?





Ihor Radchenko  writes:

> Sébastien Gendre  writes:
>
>> If I evaluate the same setq and define the same tasks, my result withe 
>> org-agenda tasks list are:
>>
>> Global list of TODO items of type: ALL
>> Press ‘N r’ (e.g. ‘0 r’) to search again: (0)[A$
>>   (1)TODO (2)DONE
>>   test:   TODO test1
>>   test:   TODO test2
>>   test:   TODO test3
>>   test:   TODO test4
>>
>> I tested at this moment with Org version 9.5.2 on Emacs version 27.2
>
> I am unable to reproduce using Emacs 27.2 + latest Org main or bugfix.
> Can you try to reproduce starting from emacs -Q?
> See https://orgmode.org/manual/Feedback.html or
> https://open.tube/videos/watch/4d819114-43bf-42df-af94-f94fc53dd0d9 for
> detailed instructions.
>
> Best,
> Ihor




Re: Release 9.5.3

2022-04-20 Thread Sébastien Gendre
Nice, thanks everyone for all the work. 🥰

Where can we found the release notes of this version ?

Le 20 avril 2022 08:28:15 GMT+02:00, Bastien  a écrit :
>Hi all,
>
>Org 9.5.3, a bug fix release, is out.  Enjoy!
>
>Since Org 9.5.4 is expected to be merged with Emacs 28.2, only
>critical bug fixes should go to the bugfix branch now.
>
>Thanks,
>
>-- 
> Bastien


Re: org-agenda todos list sorted by earliest deadline first

2022-04-05 Thread Sébastien Gendre
Tested with "emacs -q", I got the same result.



Le 5 avril 2022 09:14:43 GMT+02:00, Ihor Radchenko  a écrit 
:
>Sébastien Gendre  writes:
>
>> If I evaluate the same setq and define the same tasks, my result withe 
>> org-agenda tasks list are:
>>
>> Global list of TODO items of type: ALL
>> Press ‘N r’ (e.g. ‘0 r’) to search again: (0)[A$
>>   (1)TODO (2)DONE
>>   test:   TODO test1
>>   test:   TODO test2
>>   test:   TODO test3
>>   test:   TODO test4
>>
>> I tested at this moment with Org version 9.5.2 on Emacs version 27.2
>
>I am unable to reproduce using Emacs 27.2 + latest Org main or bugfix.
>Can you try to reproduce starting from emacs -Q?
>See https://orgmode.org/manual/Feedback.html or
>https://open.tube/videos/watch/4d819114-43bf-42df-af94-f94fc53dd0d9 for
>detailed instructions.
>
>Best,
>Ihor


Re: org-agenda todos list sorted by earliest deadline first

2022-04-04 Thread Sébastien Gendre
If I evaluate the same setq and define the same tasks, my result withe 
org-agenda tasks list are:

Global list of TODO items of type: ALL
Press ‘N r’ (e.g. ‘0 r’) to search again: (0)[A$
  (1)TODO (2)DONE
  test:   TODO test1
  test:   TODO test2
  test:   TODO test3
  test:   TODO test4

I tested at this moment with Org version 9.5.2 on Emacs version 27.2

Le 5 avril 2022 07:44:25 GMT+02:00, Ihor Radchenko  a écrit 
:
>Sébastien Gendre  writes:
>
>> I've tested it, but the tasks with no deadlines are still on top of the list.
>
>I am unable to reproduce on my side using latest stable Org.
>I used the following example org file:
>
>
>* TODO test1
>* TODO test2
>* TODO test3
>DEADLINE: <2022-04-04 Mon>
>* TODO test4
>DEADLINE: <2022-04-06 Wed>
>--
>
>(setq org-agenda-sorting-strategy '((agenda deadline-down time-up habit-up 
>priority-down timestamp-down category-keep)
>   (todo deadline-up priority-down 
> category-keep)
>   (tags priority-down category-keep)
>   (search category-keep)))
>
>The todo agenda buffer looks like:
>
>Global list of TODO items of type: ALL
>Press ‘N r’ (e.g. ‘0 r’) to search again: (0)[ALL] (1)TODO (2)DONE
>  bug:TODO test3
>  bug:TODO test4
>  bug:TODO test1
>  bug:TODO test2
>
>
>Best,
>Ihor


Re: org-agenda todos list sorted by earliest deadline first

2022-04-04 Thread Sébastien Gendre
I've done it, but tasks with no deadlines are still on top of the list

Le 4 avril 2022 13:42:26 GMT+02:00, Ihor Radchenko  a écrit 
:
>Sébastien Gendre  writes:
>
>> My Emacs version is 27.2 and Org is 9.4.4.
>>
>> The value of "org-agenda-sorting-strategy" is:
>>
>> ((agenda habit-down time-up priority-down category-keep)
>>  (todo priority-down category-keep deadline-up)
>>  (tags priority-down category-keep deadline-up)
>>  (search category-keep))
>
>Try to move deadline-up to beginning of the lists:
>
>((agenda habit-down time-up priority-down category-keep)
> (todo deadline-up priority-down category-keep)
> (tags deadline-up priority-down category-keep)
> (search category-keep))
>
>Best,
>Ihor


Re: org-agenda todos list sorted by earliest deadline first

2022-04-04 Thread Sébastien Gendre
I've tested it, but the tasks with no deadlines are still on top of the list.

Le 4 avril 2022 13:42:26 GMT+02:00, Ihor Radchenko  a écrit 
:
>Sébastien Gendre  writes:
>
>> My Emacs version is 27.2 and Org is 9.4.4.
>>
>> The value of "org-agenda-sorting-strategy" is:
>>
>> ((agenda habit-down time-up priority-down category-keep)
>>  (todo priority-down category-keep deadline-up)
>>  (tags priority-down category-keep deadline-up)
>>  (search category-keep))
>
>Try to move deadline-up to beginning of the lists:
>
>((agenda habit-down time-up priority-down category-keep)
> (todo deadline-up priority-down category-keep)
> (tags deadline-up priority-down category-keep)
> (search category-keep))
>
>Best,
>Ihor


Re: org-agenda todos list sorted by earliest deadline first

2022-04-02 Thread Sébastien Gendre
My Emacs version is 27.2 and Org is 9.4.4.

The value of "org-agenda-sorting-strategy" is:

((agenda habit-down time-up priority-down category-keep)
 (todo priority-down category-keep deadline-up)
 (tags priority-down category-keep deadline-up)
 (search category-keep))

Le 2 avril 2022 23:16:23 GMT+02:00, Samuel Wales  a écrit 
:
>perhaps try including your code and the emacs and org versins.  i
>think there have been recentish changes insorting strategy.
>
>might also try paradoxically deadline-down etc.
>
>On 4/2/22, Sébastien Gendre  wrote:
>> Hello.
>>
>> In org-agenda, for the todos list, I try to have tasks with deadlines at
>> top. With earliest deadline first.
>>
>> But, when I customize the variable "org-agenda-sorting-strategy" by adding
>> "deadline-up" for "todo" and "tags", it has no effect.
>>
>> Any advice ?
>
>
>-- 
>The Kafka Pandemic
>
>A blog about science, health, human rights, and misopathy:
>https://thekafkapandemic.blogspot.com


org-agenda todos list sorted by earliest deadline first

2022-04-02 Thread Sébastien Gendre
Hello.

In org-agenda, for the todos list, I try to have tasks with deadlines at top. 
With earliest deadline first.

But, when I customize the variable "org-agenda-sorting-strategy" by adding 
"deadline-up" for "todo" and "tags", it has no effect. 

Any advice ?

Code blocks and quotes export style

2022-03-13 Thread Sébastien Gendre
Hello everyone. _o/

When I export an Org file to LaTeX and finally PDF, the code blocks and quotes 
often exceed the width of the page.

Is it possible to set some style of the exported blocks ? Like we can set the 
size for images ? I can't found it.

Thanks for your help.


Séb

Re: How do you manage complex project with Org-mode

2022-03-02 Thread Sébastien Gendre
Hello Eric,

Thanks for your reply and advice.

I will look at custom agenda view and clocking. But I have bad memory of
clocking tools because of the way previous jobs used it (It was not
Emacs).


Eric Abrahamsen  writes:

> Sébastien Gendre  writes:
>
>> Hello,
>>
>> I don't know if it's the correct place to ask it. If not, sorry to ask in
>> the wrong place.
>>
>> How do you manage complex project with Org-mode ?
>>
>> I used Org-mode for several periods of time in recent years. It worked
>> very well for short and day to day tasks. When only a few of theme have
>> deadlines and when you have plenty of time to do them.
>>
>> But, as a student, I regularly have big and important projects to do for
>> the school. The kind of project who need several days to be done, with
>> deadlines too soon, and if you fail one them the consequences can be
>> disastrous. And generally, I have to many of these project in the same
>> time and not enough time to do all the work. So, I also need to follow
>> the progress of each project to choose which is sufficiently advanced to
>> be stop for the benefit of another less advanced project.
>>
>> And I don't know how to manage this kind of projects with Org-mode. How
>> to do it, without failing a 6 days project because I spent to much time
>> on something else and I have only 3 days left with 3 half-day important
>> appointment I cannot cancel. I can't risk failing a single one of these
>> project by trying. So, when I am in a period with a lot of these
>> projects, I stop using Org-mode and concentrate on doing these project
>> as fast as I can. And because I often have this kind of project, I spend
>> most of the year without being able to use Org-mode.
>>
>> So, if you have any suggestion on how to manage, in Org-mode, projects
>> with:
>> * Lot of work to do (many days)
>> * Short deadline (not enough time)
>> * High importance (disastrous consequences in my future in case of fail)
>> * Many of them in the same time
>> * Progression need to be followed to chose where to sacrifice time to
>>   limit the damages
>
> Interesting questions! I have the same general problem of, when things
> heat up too much, I stop using the Org agenda. It's quite the opposite
> of how it's supposed to work, but I guess it's something about human
> psychology. I'll be interested to see what people say in this thread.
>
> Some suggestions that come to mind:
>
> - Create custom agenda views for each project, providing an overview of
>   that project only, but use a single unified agenda view for each day's
>   schedule. Look at the per-project agenda to decide if/how to complete
>   it, but draw the action items into the unified schedule when deciding
>   how to spend your day. It should become evident pretty quickly what
>   you actually have time for. Projects are many, but there is only one
>   of you.
> - Maybe consider using `org-trigger-hook' and `org-blocker-hook' to cut
>   down on TODO overwhelm.
> - Use time estimates and then TODO clocking to more swiftly disabuse
>   yourself of unrealistic expectations. This plus a schedule agenda can
>   also help you make sure you stop work at a reasonable time and go do
>   something else.
> - Say no to more work :) Looking at your solid-packed agenda for the
>   next day works wonders for saying no.
>
> Good luck!




Re: How do you manage complex project with Org-mode

2022-03-02 Thread Sébastien Gendre
Hello Quiliro,

Thank for you reply and advice. :)

Generally, I use the GTD workflow. Or what I think it is (I'm not an
expert). I started with 3 files:

* Tasks.org
* Notes.org
* Inbox.org

Now, the file "Notes.org" is a folder. And inside I got a file per
subject.

I capture notes and tasks, with org-capture, that end in the file "Inbox.org".

On my phone, I use Orgzly as a pocket inbox, for when I'm not in front of
my computer. The files of Orgzly are sync with my PC using Syncthing.

Everyday, at the end of the day, I review the inbox(s):
* I do little tasks (< 3 min)
* I complete the description of the other tasks and refile them (with
  org-refile)

Everyday, at the beginning of the day, I look at the agenda (Org-agenda)
to see what I need to do. If I have free time and still energy, I search
for tasks to do in advance.

This workflow work very well and ask few effort for managing it. But I
never take the risk to use it for important project. But maybe it's an
irrational fear. Maybe it would work.

Based on suggestions in this mailing list, I take time to think about
what define a work given by the school and what I need to do to
accomplish them best. And I think of a simple "Project" workflow that
can integrate with my actual workflow.

I think this simple "Project" workflow will be:

* Each project is a headline with the status "PROJECT"
* Each project have the deadline defined by the school work deadline
* Each project have a complete description with every info needed to work
* Each project have one or many tasks (as sub headlines with a TODO/NEXT/DONE 
status)
* Each task have an importance, time and effort estimation
* Each task have its own deadline, distributed along the remaining time
* When I set a task deadline, I look at its estimations and also other projects 
tasks
* To create a new project, I use Org-capture with a template

Every time I create a new project, it start with one task: "Planning the
project". With a deadline at 2 days max. The description of this task is
a checkbox list of thing to do when planning the project.

And finally, 2 times per week, I got a repetitive task: "Review the
projects progress". With this, I should be able to adjust spending time
and effort.

I think it would be simple and need only a few Org-mode configurations.
And by doing like that, every time I look at the agenda, I will see what
work I need to do every days. Task of each project or review of all
projects.




Quiliro Ordóñez  writes:

> Hello Seb.
>
> It is great that you want to use org for your planning.  It is the best
> tool I know of.  Tim's advice sounds the best introductory one and
> others even gave you advanced advice.  Nevertheless, you never told us
> how you use org and why it takes so much time for you.  Perhaps you
> could take less time to plan and more time to do, without completely
> trashing the planning.  Then you could increment the planning until it
> proves to be more time consuming.  At that point you can reduce a little
> planning again.  It is a tuning process.
>
> Happy Hacking!
>
> Quiliro




Re: How do you manage complex project with Org-mode

2022-03-02 Thread Sébastien Gendre
Hello Antonio,

Thanks for your reply and advice. :)

I looked at TaskJuggler and I see how it could help. But, by looking at the
screenshot, I see too much information in the same time. And, as someone
with difficulty to concentrating, I need more minimalist tools.

But I will try it one time.


Antonio Carlos Padoan Junior  writes:

> Hello,
>
> I'm not sure if I will help you with my advice, but I really appreciate
> to use taskjuggler mixed with org-mode. There is somewhere in the web an
> org-exporter to taskjuggler. I think recently a topic on this matter
> appeared in this list.
>
> Taskjuggler can help you optimizing complex plannings and can be used in a
> professional context.
>
> For sure you will need to invest some time on it but it is a good
> middle-term investment.
>
> Good luck,




Re: How do you manage complex project with Org-mode

2022-03-02 Thread Sébastien Gendre
Hello Milan,

Thank you for your reply and advice. :)

Indeed, using deadline with longer in-advance warnings is a good idea. I
completely forget this feature. Using priority and split big task
is also a good advice. Today I pay attention to keep Org-mode as simple as
possible. It was not the case in the past and few times I stopped using
Org-mode because of that.



Milan Zamazal  writes:

>>>>>> "SG" == Sébastien Gendre  writes:
>
> SG> But, as a student, I regularly have big and important projects
> SG> to do for the school. The kind of project who need several days
> SG> to be done, with deadlines too soon, and if you fail one them
> SG> the consequences can be disastrous. And generally, I have to
> SG> many of these project in the same time and not enough time to do
> SG> all the work. So, I also need to follow the progress of each
> SG> project to choose which is sufficiently advanced to be stop for
> SG> the benefit of another less advanced project.
>
> SG> And I don't know how to manage this kind of projects with
> SG> Org-mode. How to do it, without failing a 6 days project because
> SG> I spent to much time on something else and I have only 3 days
> SG> left with 3 half-day important appointment I cannot cancel. I
> SG> can't risk failing a single one of these project by trying. So,
> SG> when I am in a period with a lot of these projects, I stop using
> SG> Org-mode and concentrate on doing these project as fast as I
> SG> can. And because I often have this kind of project, I spend most
> SG> of the year without being able to use Org-mode.
>
> Hi, I’d join the suggestion to keep things simple in the beginning.  My
> task flow is different from yours but in order not to miss really
> important things, I use the following:
>
> - Deadlines, with longer in-advance warnings when needed (e.g. “-3w” in
>   DEADLINE).
>
> - I use priority A for and only for stuff that is on risk of really bad
>   consequences if not handled ASAP.  And I schedule such stuff to a
>   future date if it doesn’t make sense to work on it now for any reason.
>
> As for progress, I’d say that if you don’t know how far are you with
> your short-term tasks and which of them require attention currently then
> you might have a problem with your workflow.  Maybe you are too
> overloaded or you don’t split your time among the tasks appropriately.
> Org mode is a good tool to implement support for different workflows but
> cannot help if a used workflow doesn’t work very well for you.  Again,
> starting simple with Org mode and paying attention first to how you work
> and how it could be improved generally might be a good idea (and a
> life-long process for many of us).
>
> Regards,
> Milan




Re: How do you manage complex project with Org-mode

2022-03-02 Thread Sébastien Gendre
Hello Tim,

Thanks for your response and advice.

I want to keep Org-mode as simple as possible. As you suggest.

In the past, I ended up several times with a too complex Org-mode
workflow and stop using it because of that. That because, today, I want
to keep it simple. Usually, I apply a GTD workflow (or what I think it
is, I'm not an expert).

As you say, I need to learn skills for project management. But the
project management methods we learned at school where to rigid. And, at
work, the method is more "do the job, stop thinking, be professional".
But it's, or was, the kind of job where you are asked to "not write test
to save time". I generally have bad experiences at work.

To manage school big work, I think of managing them as projects.

I want to apply a simple "Project" workflow:

* Each project is a headline with the status "PROJECT"
* Each project have the deadline defined by the school work deadline
* Each project have a complete description with every info needed to work
* Each project have one or many tasks (as sub headlines with a status)
* Each task have a importance, time and effort estimation
* Each task have its own deadline, distributed along the remaining time
* When I set a task deadline, I look at its estimations and also other projects 
tasks
* To create a new project, I use Org-capture with a template

Every time I create a new project, it start with one task: "Planning the
project". With a deadline at 2 days max. The description of this task is
a checkbox list of thing to do when planning the project.

And finally, 2 times per week, I got a repetitive task: "Review the
projects progress". With this, I should be able to adjust spending time
and effort.

I think it would be simple and need only a few Org-mode configurations.
And by doing like that, every time I look at the agenda, I will see what
work I need to do every days. Task of each project or review of all
projects.






Tim Cross  writes:

> Sébastien Gendre  writes:
>
>> Hello,
>>
>> I don't know if it's the correct place to ask it. If not, sorry to ask in
>> the wrong place.
>>
>
> I think it is the correct place. This is a list for general org mode
> discussions. Such discussions can be technical or about how to use org mode.
>
>> How do you manage complex project with Org-mode ?
>>
>> I used Org-mode for several periods of time in recent years. It worked
>> very well for short and day to day tasks. When only a few of theme have
>> deadlines and when you have plenty of time to do them.
>>
>> But, as a student, I regularly have big and important projects to do for
>> the school. The kind of project who need several days to be done, with
>> deadlines too soon, and if you fail one them the consequences can be
>> disastrous. And generally, I have to many of these project in the same
>> time and not enough time to do all the work. So, I also need to follow
>> the progress of each project to choose which is sufficiently advanced to
>> be stop for the benefit of another less advanced project.
>>
>> And I don't know how to manage this kind of projects with Org-mode. How
>> to do it, without failing a 6 days project because I spent to much time
>> on something else and I have only 3 days left with 3 half-day important
>> appointment I cannot cancel. I can't risk failing a single one of these
>> project by trying. So, when I am in a period with a lot of these
>> projects, I stop using Org-mode and concentrate on doing these project
>> as fast as I can. And because I often have this kind of project, I spend
>> most of the year without being able to use Org-mode.
>>
>
> The first thing I would say is that org mode is NOT going to solve your
> problems of too many tasks with competing priorities in too short a time
> period or mitigate the impact from missed deadlines etc. In fact, no
> project management software can do this.
>
> Org mode is merely a tool which can help you manage tasks, deadlines,
> schedules, priorities and project information. It can help you track
> your tasks so fewer are overlooked/forgotten, it can help you manage
> your deadlines and scheduling of time and it can help you manage
> priorities and provide you with an overview of things that can alert you
> to issues earlier, allowing for a wider range of mitigation
> strategies. However, it is just a tool and how well you use that tool
> will come down to experience and self discipline.
>
>
>> So, if you have any suggestion on how to manage, in Org-mode, projects
>> with:
>> * Lot of work to do (many days)
>> * Short deadline (not enough time)
>> * High importance (disastrous consequences in my future in case o

Re: How do you manage complex project with Org-mode

2022-03-02 Thread Sébastien Gendre
Hello Arne,

Thank you for your reply and advice. :)

"Dr. Arne Babenhauserheide"  writes:
> Do I understand it right that what you need is to track the time
> required to reach milestones, not following the *progress*?

Well, what I want by "follow the progress" is to see:

* How many work I have done
* How many work remains to be done
* How many time left
* How many time other project need

I want to avoid spending to much time on a project sufficiently finished
to the detriment of another project. Or, if no project can be finished,
do enough of work to have a not so bad grade.

As you suggest, having milestone with their own deadline seems to be a
great idea. A better idea that having one big task for representing an
entire project (like I wanted to do). I will try using effort
estimation. But I will avoid customizing too much Org-mode. In the past,
I ended up several times with a too much complex workflow.

I think I will make a "Project" workflow. Something simple:

* Each project is a headline with the status "PROJECT"
* Each project have the deadline defined by the school work deadline
* Each project have a complete description with every info needed to work
* Each project have one or many tasks (as sub headlines with a status)
* Each task have a importance, time and effort estimation
* Each task have its own deadline, distributed along the remaining time
* When I set a task deadline, I look at its estimations and also other projects 
tasks
* To create a new project, I use Org-capture with a template

Every time I create a new project, it start with one task: "Planning the
project". With a deadline at 2 days max. The description of this task is
a checkbox list of thing to do when planning the project.

And finally, 2 times per week, I got a repetitive task: "Review the
projects progress". With this, I should be able to adjust spending time
and effort.

I think it would be simple and need only a few Org-mode configurations.
And by doing like that, every time I look at the agenda, I will see what
work I need to do every days. Task of each project or review of all
projects.



"Dr. Arne Babenhauserheide"  writes:

> [[PGP Signed Part:Undecided]]
> Hello Seb,
>
> It sounds like org-mode can be a great fit.
>
> Sébastien Gendre  writes:
>> But, as a student, I regularly have big and important projects to do for
>> the school. The kind of project who need several days to be done, with
>> deadlines too soon, and if you fail one them the consequences can be
>> disastrous. And generally, I have to many of these project in the same
>> time and not enough time to do all the work. So, I also need to follow
>> the progress of each project to choose which is sufficiently advanced to
>> be stop for the benefit of another less advanced project.
>
> Do I understand it right that what you need is to track the time
> required to reach milestones, not following the *progress*? So following
> progress seems like it would take more mental bandwidth than needed.
>
> You could have one org-mode task (headline) per milestone, with a
> DEADLINE (org-deadline), and then SCHEDULE (org-schedule) appointments.
>
> To track how much time you will still need, you can use org-set-effort.
> I did that at work for a while to train to get better at estimating. By
> having the effort in a clocktable I could see progress *when needed*.
> Hitting R in the org-agenda shows the clockreport-mode and you can see
> the Effort in the agenda by setting
> (org-agenda-clockreport-parameter-plist (quote (:link t :maxlevel 2
> :properties ("Effort". For a while I had the clocktable active by
> default.
>
> You can also add that to the column-mode (org-columns) to get a quick
> overview for a file (leave with org-columns-quit). Customize:
> (org-columns-default-format
>"%25ITEM %TODO %3PRIORITY %TAGS %17Effort(Estimated Effort){:} %CLOCKSUM")
>
>> And I don't know how to manage this kind of projects with Org-mode. How
>> to do it, without failing a 6 days project because I spent to much time
>> on something else and I have only 3 days left with 3 half-day important
>> appointment I cannot cancel. I can't risk failing a single one of these
>> project by trying. So, when I am in a period with a lot of these
>> projects, I stop using Org-mode and concentrate on doing these project
>> as fast as I can. And because I often have this kind of project, I spend
>> most of the year without being able to use Org-mode.
>
> I found that org-mode is the only organization tool for which using the
> tool actually reduces the time I need for organization. That works by
> taking notes in org-mode, too, and keeping it simple.
>
> What I do:
>
> ** Custom star

Re: How do you manage complex project with Org-mode

2022-03-02 Thread Sébastien Gendre
Hello Matt,

Thanks for your reply and advice. :)

I already use Org-mode since a few years and it work great with little
tasks. Tasks that take a few hours maximum. My workflow is GTD, or
something very close (I'm not an expert of this subject).

My concern was more for school works that need many days. I don't want
to see, too late, on my agenda, a work to do. Like seeing 3 days before
the deadline that I need to do a 5 days work. It never append because,
when I got a lot to do for school, I stop using Org-mode to don't take
the risk. So, in reality, I don't know if it will append. Maybe it's an
irrational fear. But, because I often got a lot of work to do for school,
I spend a lot of time not using Org-mode.


Matt  writes:

>   On Mon, 28 Feb 2022 20:43:47 -0500 Sébastien Gendre  wrote 
> 
>
>  > And I don't know how to manage this kind of projects with Org-mode. How
>  > to do it, without failing a 6 days project because I spent to much time
>  > on something else and I have only 3 days left with 3 half-day important
>  > appointment I cannot cancel. I can't risk failing a single one of these
>  > project by trying. So, when I am in a period with a lot of these
>  > projects, I stop using Org-mode and concentrate on doing these project
>  > as fast as I can. And because I often have this kind of project, I spend
>  > most of the year without being able to use Org-mode.
>
> It sounds like you have a lot going on! If none of what you need to do
> explicitly requires Org, you may have to scale back what you learn
> about Org to fit the time you've got. Give yourself permission to
> accept that the time you have right now for Org isn't what you want.
> (I hope that's because you're learning lots of other cool things in
> school.) In situations like these, I like to do just a little each
> day. Maybe that means reading one paragraph a night before bed. It
> sounds like you're really excited about Org. (If you are, you've come
> to the right place. The people here love Org :) Reading about Org
> would be something fun to look forward to each night. You might be
> surprised at how motivating that one little paragraph can be! Working
> through the manual in this way will give you a good overview of how
> Org can be used and what you personally might use Org it for.
>
>  > So, if you have any suggestion on how to manage, in Org-mode, projects
>  > with:
>  > * Lot of work to do (many days)
>  > * Short deadline (not enough time)
>  > * High importance (disastrous consequences in my future in case of fail)
>  > * Many of them in the same time
>  > * Progression need to be followed to chose where to sacrifice time to
>  >   limit the damages
>  > 
>  > I will be happy to read them. :)
>
> My suggestion is to not try something new on anything that has a tight
> deadline. Org is new to you and learning things takes time. This is
> all normal. Life will throw a lot at you. Some times all I get is 20
> minutes at the end of the day. Some days, I get nothing at all. This
> is because I've filled my life with other cool things, like a partner,
> a house, friends, etc. If I get to spend some time doing something I
> think is worthwhile (like trying to help a fellow Org enthusiast),
> that's time well spent in my book.
>
> Isn't there some saying that goes like, "every avalance starts as a 
> snowflake?" Read a little, experiment a little, and over time, you'll be 
> surprised at how much you've learned. You'll get there!  




How do you manage complex project with Org-mode

2022-02-28 Thread Sébastien Gendre
Hello,

I don't know if it's the correct place to ask it. If not, sorry to ask in
the wrong place.

How do you manage complex project with Org-mode ?

I used Org-mode for several periods of time in recent years. It worked
very well for short and day to day tasks. When only a few of theme have
deadlines and when you have plenty of time to do them.

But, as a student, I regularly have big and important projects to do for
the school. The kind of project who need several days to be done, with
deadlines too soon, and if you fail one them the consequences can be
disastrous. And generally, I have to many of these project in the same
time and not enough time to do all the work. So, I also need to follow
the progress of each project to choose which is sufficiently advanced to
be stop for the benefit of another less advanced project.

And I don't know how to manage this kind of projects with Org-mode. How
to do it, without failing a 6 days project because I spent to much time
on something else and I have only 3 days left with 3 half-day important
appointment I cannot cancel. I can't risk failing a single one of these
project by trying. So, when I am in a period with a lot of these
projects, I stop using Org-mode and concentrate on doing these project
as fast as I can. And because I often have this kind of project, I spend
most of the year without being able to use Org-mode.

So, if you have any suggestion on how to manage, in Org-mode, projects
with:
* Lot of work to do (many days)
* Short deadline (not enough time)
* High importance (disastrous consequences in my future in case of fail)
* Many of them in the same time
* Progression need to be followed to chose where to sacrifice time to
  limit the damages

I will be happy to read them. :)


Best regards

-
Seb







[Concept talk] Org-connector

2021-08-10 Thread Sébastien Gendre
Hello everyone,

I wanted to talk about a concept for Org-mode. For now it's just a
concept, but maybe it already exist a package that do it.

The concept is called org-connector: It's a package that let you connect
an Org-mode file with an external tickets or tasks manager and let you
manage your tasks or tickets from Org-mode.

For example, if your company use Owncloud Deck to manage tasks of the IT
team:
1. Create an Org-mode file
2. At the top of the file, add `#+CONNECTOR: owncloud_deck` and
   `#+CONNECT_TO: https://ourcload.com/url/to/one/deck`
3. Run the interactive command `oc-sync`

Then, for every task on the specified Owncloud Deck, you have now an Org
entry on your file. You can edit them and run the interactive commands
`oc-sync`, `oc-push` or `oc-pull` to sync, send or receive tasks. If a
conflict is detected between a local task and a task on the external
task manager, org-connector ask you if you want to fix it with SMERGE or
EDIFF.

org-connector package provide all `oc-*` functions, a few back-ends and
everything needed to declare a new back-ends. Other back-ends can be
provided by other packages.


What do you thing ? Something like that already exist ?
What kind of feature do you think is needed ?
How do you think this package must be developed ? What best practice do
you suggest ? Any advice or idea ?

Best regards

---
Gendre Sébastien

GPG ID: B586 F7C7 7239 E29E