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

2022-10-08 Thread Jean Louis
* Sébastien Gendre  [2022-03-02 23:44]:
> 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

When speaking of multiple projects related to multiple entities such
as companies, organizations, people, businesses, one has to divide it
all by those groups. And then there is time involved. Any work done
has to be calculated maybe in total, but maybe for the project within
one group of people, and maybe for one period within the whole
time. Thus there are various considerations.

What really matter is the priority. Org mode can't know what it
is. You know it best. 

You will know what is priority as for such you don't have much time to
write it down, you just do it. Like waking up, brushing teeth, those
are actual priorities, we don't write the down.

- Units of work or tasks may be subproducts to the actual work, you
  may do 100 of them and not reach the point that other people may say
  it is valuable enough. Counting completed tasks is less useful and
  may be deceptive. Count the actual products you have produced. Not
  single tasks that one eventually cannot compare to each other.

  Instead of putting focus on counting the number of advertising
  pieces sent (which you should count), you should focus greatly on
  counting the actual sales. Convert this idea to your organizations
  schema.

- For how much work remains to be done, one shall not just count as
  robot what one has written in the computer, but rather look at the
  purpose of the work. You may write 100 tasks to reach the purpose,
  and when you reach the purpose you may have still 27 tasks
  pending. If you have reached the purpose, those tasks may be
  redundant. Think about it. Awarding oneself for some numbers in
  computer is meaningless.

- How much time is left for major actions will be always in your
  mind. For smaller actions and mass of tasks that is something you
  can track with computer.

- Estimating time for projects is difficult and never accurate,
  especially if you are given rather shorter periods of time for some
  reason. It is better focusing on purpose and getting purpose
  done. Many assignees may not understand the purpose of the task. I
  suggest special property PURPOSE to be clear what the task means and
  why it is done. As overdoing the task just because it is written
  misses the purpose easily.

  Let us say you wish to watch movie in cinema, and you first take
  list of 10 cinema's in the town with the purpose to call them all
  and find out which movies play. Then you start calling or visiting
  their websites, and at the 3rd cinema your friend in the room tells
  you should watch that great movie, and you make that decision, and
  it is just 30 minutes before the movie starts. Are you going to keep
  pushing to find out the remaining 7 cinemas' programs or you are
  moving now to watch the actual movie? Stress must be made that
  PURPOSE of the task is important and that people shall not dwell on
  something that is redundant.

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

Sounds very good to me.

> * Each task have a importance, time and effort estimation

Each task has the important, but let's go back to purpose. You wish to
complete the project, tasks can't be illogically or out of the
order. Thus they have to be in the order. Importance is automatically
there if the logical order of tasks is part of the structure.

In order to paint a room you have to purchase paint brushes, paint in
the town and bring it to the school. You can't just go to school first
and paint without first bringing paint brushes. There is logical order
involved in everything what human do or shall do. Importance is useful
only when person misses to have the sense for logical order.

> * Each task have its own deadline, distributed along the remaining
> * time

And what do you do if you miss the deadline?


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



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

2022-10-08 Thread Jean Louis
* Sébastien Gendre  [2022-03-03 00:36]:
> 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.

Maybe you mean to say "To finish the planning of the project"?

Though I would not write that as a task, it is redundant as it is
self-referencing.

Either your project planning is finished or not finished, or maybe it
is pending, but you or your senior will know it.

But to write in the project that one has to plan project is redundant.

To give another extreme example, after writing "Planning the project"
in the project one could write as next "Write a task in the project"
in order to write a task, and that way it leads to developed traffic,
too much work and self-referencing.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



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

2022-10-08 Thread Jean Louis
* Sébastien Gendre  [2022-03-01 05:35]:
> And I don't know how to manage this kind of projects with Org-mode.

Just use pen and paper notebook. Carry it with you.


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Re: test-org-table/sort-lines: Failing test on macOS

2022-10-08 Thread Ihor Radchenko
[I am adding Rudolf's email back to CC just in case]

Max Nikulin  writes:

>> Should we then modify the test to set locale explicitly?
>
> Rudolf cited the context of this test and "C" locale is explicitly used 
> there.

Oops. Missed it. Thanks for the clarification.

>> Note that Rudolf is using Emacs 29.
>
> and macOS, so libc and locales version may be different as well.

[Max, correct me if my further suggestion is wrong.]

Rudolf, can you (1) try sort in terminal to confirm that "C" locale
behaves as expected in MacOS; (2) If sort works fine, you may consider
reporting Emacs bug.

> If libc is sane (assuming that sort is linked to the same libc)
>
> printf 'a\nb\n' | LC_COLLATE=C sort
> printf 'b\na\n' | LC_COLLATE=C sort
> printf 'A\nB\n' | LC_COLLATE=C sort
> printf 'B\nA\n' | LC_COLLATE=C sort
> printf 'a\nb\n' | LC_COLLATE=C.UTF-8 sort
> printf 'b\na\n' | LC_COLLATE=C.UTF-8 sort
> printf 'A\nB\n' | LC_COLLATE=C.UTF-8 sort
> printf 'B\nA\n' | LC_COLLATE=C.UTF-8 sort
>
> then you might face an Emacs bug.

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



Re: problem with the on-line manual

2022-10-08 Thread Ihor Radchenko
Giuseppe Lipari  writes:

> By further investigating the problem I had, I tried to export the
> following snippet:
>
> ---
> ** Example
> *** Temperature control  :B_example:
> :PROPERTIES:
> :BEAMER_env: example
> :END:
>
> Let us make a simple example of temperature control.
>
> #+attr_latex: :float t :width .5\textwidth
> [[file:room1-crop.pdf]]
> ---
>
> When exported, this produces the following :
>
> ---
> \begin{frame}[label={sec:orgb828ded}]{Example}
> \begin{example}[Temperature control]
> \footnotesize
> Let us make a simple example of temperature control.
>
> \begin{t}
> \centering
> \includegraphics[width=.5\textwidth]{room1-crop.pdf}
> \end{t}
> ---
> Which is of course not what I want. Notice the \begin{t} ... \end{t}.
> ...
> Is this a bug, or has the syntax changed in a way that is not documented yet ?

Try the latest main branch from Git. (see
https://orgmode.org/manual/Installation.html)

On main, the export yields

\begin{frame}[label={sec:org8efec4c}]{Example}
\begin{example}[Temperature control]
Let us make a simple example of temperature control.

\begin{figure}[htbp]
\centering
\includegraphics[width=.5\textwidth]{room1-crop.pdf}
\end{figure}
\end{example}
\end{frame}

which looks right to me.

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



Re: Markdown export is non-deterministic?

2022-10-08 Thread Ihor Radchenko
Matias Eyzaguirre  writes:

> I’m using org-mode to generate a markdown README for a project that is
> under version control. I’ve noticed that the anchor tags used for the
> table of contents seem to be annoyingly random and change from export
> to export. Is it possible to make the generated ids deterministic?

In addition to the detailed explanation by Max, you can use ox-publish.
Publishing will preserve the ids as much as possible.

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



Re: [BUG] Erroneous link highlighting in src blocks (9.5.5-geeae6e)

2022-10-08 Thread Ihor Radchenko
Tim Loderhose  writes:

> Hi,
>
> In recent org, org-highlight-links including 'bracket' will hide content
> with double brackets inside src blocks.
> A vanilla config loading 9.5.5 org (I did this through straight.el) can 
> reproduce this with a
> minimal org file including just:
>
> #+begin_src python
> [[a]]
> #+end_src
>
> The brackets will be hidden.

Thanks for reporting!

This is related to the new folding engine that broke the brittle balance
of current regexp-based Org fontification.

In general, fontification issues are numerous in Org and have to be
fixed by a complete rewrite of our fontification system. See
https://orgmode.org/list/87ee7c9quk.fsf@localhost

However, in a view of upcoming Org release, I am going to fix this
particular issue now. It is not too difficult.

Fixed on main now.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=41a409f79d07fe7a3e8c5f934b97e4a2884bf948

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



Re: [tip] Create and Insert a public Nextcloud/Owncloud link

2022-10-08 Thread Max Nikulin

On 08/10/2022 21:29, Juan Manuel Macías wrote:


Many times I need to create and share a public link to a file
in my local folder. In the Nextcloud forum I learned how it can be done
from the command line using curl,

..

│(result-raw (shell-command-to-string
│ (concat "curl -u "
│ "\""
│ my-username
│ ":"
│ my-passwd
│ "\""


Juan Manuel, your function is a nice proof of concept, but posting such 
code you are responsible for users who may try to use it verbatim having 
less experience with elisp.


Use at least `shell-quote-argument' (though it docstring has a link to 
info "(elisp)Security Considerations"). Just adding quote characters is 
unsafe. You may avoid non-alphanumeric characters in passwords and file 
names for good reasons, but for other users a quote character may 
dramatically change the executed command.


When TRAMP support is not necessary, arguments should be passed to 
external binary as a list without intermediate shell command. I know, 
Emacs does not have a convenience function with such calling convention 
similar to `shell-command-to-string'.


I am almost sure that Emacs has a package to send HTTP POST requests 
directly from elisp. Unsure it has convenient enough API (reasonable 
default timeouts, etc.), but it should be safer for working with 
peculiar file names and passwords stuffed with characters having special 
meaning in shell. I admit that the code would be more verbose. It may 
save you time for recovering you system from damage caused by unexpected 
interpretation of a shell command.






Re: [BUG] Re: 98e168b48 Add compatibility wrapper for string-clean-whitespace (Emacs 26 compatibility) [9.6-pre (release_9.5.5-920-g057193 @ /home/yantar92/.emacs.d/straight/build/org/)]

2022-10-08 Thread Ihor Radchenko
Kyle Meyer  writes:

> I've pushed 04d9d4b3d, but please feel free to adjust as needed if some
> other reason to avoid loading subr-x surfaces.

Thanks! I see no reason to avoid subr-x.

Also, leaving the patch link for easy reference in future
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=04d9d4b3db84e0025e21e9248bc2d218cd3c0e9b

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



Re: Bug: org-html-example-block can produce multiple class attributes [9.4 (9.4-dist @/usr/share/emacs/site-lisp/elpa/org-9.4/)]

2022-10-08 Thread Ihor Radchenko
Joshua Honeycutt  writes:

> I added a class attribute to an example block as in:
>
>#+ATTR_HTML :class cmdout
>#+BEGIN_EXAMPLE
>text text text
>#+END_EXAMPLE
>
> I expected this to produce a html tag like:
>
>
>
> but the output was instead:
>
>
>
> In my browser this second class assignment was ignored.
>
> org-html-example-block could instead add the 'example' class to other
> attributes which get placed in the  tag. I modified it to achieve
> this outcome like this (from be2246a550b444560ec1718c11185ac7bfcfa646):

Thanks for reporting!
Would you mind creating a proper patch under your name?
See https://orgmode.org/worg/org-contribute.html#first-patch

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

Confirmed.



Re: [PATCH] Re: Prompt when resolving clocks [9.4.4 (release_9.4.4 @ /usr/share/emacs/27.2/lisp/org/)]

2022-10-08 Thread Ihor Radchenko
Roméo La Spina  writes:

> After some discussion on the subject on another topic (see 
> https://lists.gnu.org/archive/html/emacs-orgmode/2022-03/msg00233.html), I 
> have a small patch that prevents the prompt for disappearing on unwanted 
> events, using `read-char-exclusive'. You will find it enclosed.
> ...
> From 0078523a768f215d8053905f66266cb1d083a7cf Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Rom=C3=A9o=20La=20Spina?= 
> Date: Mon, 21 Mar 2022 20:00:43 +0100
> Subject: [PATCH] lisp/org-clock.el: Fix bug in prompt for resolving clocks

Thanks! And sorry for the late reply.

The patch looks good, especially since we are using
`read-char-exclusive' in most places already.

Applied onto main with minor amendment to the commit message (I added a
link to this thread).
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=de553d1dc7c587d1f3a853543259f8a14464af54

You are also now listed as a contributor at 
https://orgmode.org/worg/contributors.html

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



Re: Break lines in Query replace. Help.

2022-10-08 Thread Max Nikulin

On 08/10/2022 18:19, Ypo wrote:

I want to make a "query replace", where

" - " should be substituted by

"breakline - "


How do I insert in a query replace a breakline?

"\\ - " seems to work only for LaTeX export.


Why do you think so? It is an element of Org syntax, namely 'line-break. 
It should be handled properly by e.g. HTML export.



"^J - " writes down ^J literally, and doesn't work as a break line.


Are you asking how to split lines before certain pattern in Org source 
file (general Emacs question unrelated to Org) or how to achieve hard 
line break in exported file? In the latter case what is the target format?




Solved: Break lines in Query replace. Help.

2022-10-08 Thread Ypo

Working!

Thanks, Tomas ^^

By the way, I can't see ~^J~ in my document. Is there a way to see it? 
Using ~whitespace-mode~ doesn't work for that.


Best regards

El 08/10/2022 a las 15:03, to...@tuxteam.de escribió:

On Sat, Oct 08, 2022 at 01:19:28PM +0200, Ypo wrote:

I want to make a "query replace", where

" - " should be substituted by

"breakline -"


How do I insert in a query replace a breakline?

"\\ - " seems to work only for LaTeX export.

"^J - " writes down ^J literally, and doesn't work as a break line.

It's C-Q C-J (aka ^Q^J). The CTRL-Q "quotes" the next char (handy also
for other control characters -- see also 7.1 "Inserting Text" in the
fine manual).

Cheers

Get the "closest" property value

2022-10-08 Thread George Mauer
If I have a document what looks like the following. What code could I run
for the ??? to get the property value for "workspace-directory" that is
closest in the outline to the location running the code?

* Top Level
  :PROPERTIES:
  :workspace-directory: /tmp
  :END:

   #+begin_src emacs-lisp
 (???) ; /tmp
   #+end_src

** L2 Heading
   :PROPERTIES:
   :workspace-directory: ~/whatever
   :END:

   #+begin_src emacs-lisp
 (???) ; "~/whatever"
   #+end_src

** Another L2 Heading

   #+begin_src emacs-lisp
 (???) ; /tmp
   #+end_src


Re: [HELP] Fwd: Org format as a new standard source format for GNU manuals

2022-10-08 Thread Richard Stallman
[[[ To any NSA and FBI agents reading my email: please consider]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > The latter. We currently need a new syntax element that will allow all
  > the things available in Texinfo markup syntax.

  > We have decided that we do need such new syntax. We are discussing how
  > the new syntax will look like. We will implement the syntax in future.
  > Once implemented, the new syntax will open the road to add Texinfo
  > markup structures into Org export backends.

I'm glad you are working on this.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





Re: Org and Hyperbole

2022-10-08 Thread Juan Manuel Macías
Robert Weiner writes:

> Hi Juan:
>
> I just tried your ':' technique for Hyperbole button activation with
> Avy and it works well.  But what is the advantage over just using Avy
> to jump to the button and then pressing {M-RET}.  With your technique,
> you have to think about activating the button before you are there
> versus when you are on it, as you normally do.

Hi, Robert,

Thanks for your comment. I agree with what you say. I'm afraid this
action, as I proposed it, is impractical. The proof is that I haven't
used it too much :-). Avy also includes some factory keys where the
action is performed on the target without losing focus or cursor
position. For example, to copy a "distant" word and paste at point. This
would be a more reasonable use case. Taking inspiration from Avy's code
for these actions, I've defined this new version:

(add-to-list 'avy-dispatch-alist '(?: . (lambda (pt)
  (goto-char pt)
  (hkey-either)
  (let ((dat (ring-ref avy-ring 0)))
(select-frame-set-input-focus
 (window-frame (cdr dat)))
(select-window (cdr dat))
(goto-char (car dat))

Now hkey-either would run without losing the current focus and cursor
position. An example of use that occurs to me: for my translation of the
Odyssey into Spanish I have defined some implicit buttons that do the
following: if they are activated in a certain positions of the verse
(for example, at the beginning of the verse), it is shown in a temporary
postframe: a) the verse translated by me if the action is performed on
the original Greek verse and b) the original Greek verse if the action
is on the translated verse.

I think that is better seen in this short video:

https://cloud.disroot.org/s/4c7ZFCAPTercgMS

Best regards,

Juan Manuel



Re: Update Org to MathJax 3

2022-10-08 Thread Rudolf Adamkovič
Ihor Radchenko  writes:

> The option (2) will make Org export nicer by default, but more tricky
> to implement.

Say no more.  Rolling with the option (2).  :)

> In (2), all the aspects of (1) should still be retained. But in
> addition, you will also need to detect option values incompatible with
> MathJax 3 during export. If there is mismatch between the option
> format and the MathJax version, (a) try to convert the options, which
> should be possible e.g. for scale and autonumber. (b) if conversion is
> not possible (say, the options contain font setting), throw a warning
> and fallback to compatible MathJax version.

Perfect.  All clear!

I will resurrect the thread when I have something to show.

Rudy
-- 
"'Contrariwise,' continued Tweedledee, 'if it was so, it might be; and
if it were so, it would be; but as it isn't, it ain't.  That's logic.'"
-- Lewis Carroll, Through the Looking Glass, 1871/1872

Rudolf Adamkovič  [he/him]
Studenohorská 25
84103 Bratislava
Slovakia



Re: Org and Hyperbole

2022-10-08 Thread Robert Weiner
We had object-based, multi-media files with Engelbart's NLS/Augment
system.  We had relational databases way before the web.

But here we are in 2022 with enormous personal computing power and for
interactive editing, everyone is using and transferring stream-based files
of characters that are then interpreted at the delivery site.  There are
many reasons for this including limits in many organizations of the file
types that may be transferred through common protocols and the difficulty
of maintaining relational database or structured file type schemas across
time.

Simple tends to win out over more powerful because few people want to bear
the cost of continual training to raise all of the newcomers to a level of
performance that they cannot teach themselves.

I like your model, Jean, and am a fan of such things but I am also
pragmatic and thus focus on building things that I think people will
consume within a given environment.  In Hyperbole's case, it is base Emacs
and nothing more.  If you are familiar with what it takes to standup a
scalable web application today (what everyone wants), you understand why
that is not a great model for systems where the users have to manage and
customize the infrastructure themselves.

-- rsw

On Fri, Oct 7, 2022 at 3:52 PM Jean Louis  wrote:

> On October 4, 2022 6:05:58 PM UTC, David Masterson
> >One major use-case for Org is capturing a task quickly.  This can be
> >done with Org or Mobile-Org (BeOrg, Orgzly).  One feature not easily
> >available is attaching images to the task to better explain the task.
> >
> >Thoughts on this?
>
> There are many ways of capturing elementary objects. Org Capture is one
> way as it's connection between Emacs and outside programs or Emacs and
> Emacs.
>
> With or without Org or Emacs computer users should be able to capture any
> pieces of information and it's references in any type of a system.
>
> For me personally I use PostgreSQL database and have finely grained types
> of objects, so I can relate anything to anything, then export to Org or
> package with any kind of connected objects, not only Org.
>
> The way to go for Org users is to make a function that first takes
> specific files and then captures the rest. Then files are to be used as
> properties or links in subheading.
>
> That is what I don't like as too many properties and markup is really
> disturbing. I keep it invisible.
>
> Design of such system shall be that each elementary object has our get
> it's really unique reference, possibly across networks and world, then that
> it gets it's type of relation, and it's value such as file. The file is
> object too, must have it's references.
>
> Relation could be just RELATED, but it could be, CONTRACT or DISREGARD, as
> one shall know why are some other objects attached.
>
> Relating objects is most important in information management.
>
> https://en.m.wikipedia.org/wiki/Relational_database
>
> What you and many others really want is relational database. I see no
> problem to connect Org to such. You can have just one property like ID or
> embedded not presentable link and all other properties related through one,
> by principles of the relational database.
>
> I often use preprocessing markup tags that interpolate to anything, like
> Org markup or any other. That way I can add just anything to Org or any
> other text. Like bunch of files or links, without using specific mode.
>
> Feature I use mostly to inject single objects into bunch of files, even
> thousands of files. When I edit such single object, other files
> automatically interpolate the contents of such object.
>
> Imagine company address appearing on thousands of related pages and over
> different domains, editing phone number changes it anywhere.
>
> Imagine that link name changes each in na while like those links showing
> specific but dynamic market price, when price is changed all documents get
> the new link name without files being edited or modified.
>
> When you have single object ID then adding files to it can be handled
> outside the single Org file. Imagine an Org ID as universal hyperlink to
> other objects. Let us say, properties in other file like "attachment" and
> list of files in that other file.
>
> It is up to Org designers to better adopt the idea of decentralization of
> properties, tags, etc. One can't put all the messy looking stuff in text
> file, it's not text any more, it looks like garbage on the screen.
>
> Moving more to the extreme then anything can be separated from Org and
> written in plethora of other modes, markups and then presented in the Org
> simple way for clarity and better understanding to final user.
>
>
>
> Jean
>


Re: Org and Hyperbole

2022-10-08 Thread Robert Weiner
Task management is a whole area separate from note taking.  This was
something I was interested in many years ago but have not been able to
publish a system to implement my ideas therein.  Since people generally
seem to be happy with Org's todo and agenda features, we expect to just
interact with those from Hyperbole.

But for notes, yes, one needs to capture them quickly and then get back to
your former context.  Later on you can process them more fully.

Although I see the great utility in having capabilities on mobile devices,
I find most apps way underpowered for constant use.  As Emacs becomes more
usable on mobile devices, we can add more mobile-friendly features to
Hyperbole.

-- rsw

On Tue, Oct 4, 2022 at 2:06 PM David Masterson 
wrote:

> Robert Weiner  writes:
>
> > We welcome brief summaries of features you need for effective note
> > taking in Emacs.  We are not looking to do much with images or on
> > mobile devices, just focused on people who spend a lot of time in
> > Emacs and want an easy-to-use notes system that does not require any
> > external packages like SQLite.
>
> One major use-case for Org is capturing a task quickly.  This can be
> done with Org or Mobile-Org (BeOrg, Orgzly).  One feature not easily
> available is attaching images to the task to better explain the task.
>
> Thoughts on this?
>
> --
> David Masterson
>


Re: Org and Hyperbole

2022-10-08 Thread Robert Weiner
On Tue, Oct 4, 2022 at 3:06 AM Payas Relekar  wrote:

> Robert Weiner  writes:
>
> > Thanks, Jean.  We have started work on a note-taking subsystem for
> > Hyperbole that will store UUIDs per note and will likely support
> backlinks
> > too.  We are seeing if we can make it support Koutlines, Emacs Outlines,
> > Org mode files and Markdown files, searching across all formats at the
> same
> > time.  The default for creating new notes will likely be a personal
> > Koutline file.
>
> Not Jean, but as someone using Org with Hyperbole, this is a great news!
>

Good to hear.  Maybe you can provide early feedback when it hits the
Hyperbole pre-release in the elpa-devel package archive (pre-releases of
Hyperbole packaged up from the git master branch tip).

>
> > We welcome brief summaries of features you need for effective note taking
> > in Emacs.  We are not looking to do much with images or on mobile
> devices,
> > just focused on people who spend a lot of time in Emacs and want an
> > easy-to-use notes system that does not require any external packages like
> > SQLite.
>
> For my 2c:
>
> - Multiple small files vs single large file.
>   I currently have former, with org-roam taking care of finding, linking
>   and backlinking between files, making it a non-issue to easily build a
>   network of connected topics/thoughts
>

Yes.  It will search over many files and even recursive directories of
files.  Org-roam has a good model for rapid searching, so we'll have to
consider something similar.  It might not be in the first release but will
come by the second major release.

>
> - Daily notes
>   Every day gets its own note, only generated if visited. This allows
>   dumping the thoughts at that moment rather than first hunting the
>   correct node. Then they can be easily filtered into actual topic note,
>   or just be referenced via backlinks buffer
>

Each note will have an optional datetime stamp which will be on by
default.  If you care to make one note per day, you can do that.

>
> - sqlite might just be better, considering overhead of opening and
>   parsing hundreds-thousands of small files is non-negligible.
>

Yes, that is the reason for desiring some kind of database-backed indexing.

>
> - Refiling
>   Refile/move the subtree (in Org terms) can be easily moved to another
>   file and the links automatically point to new location. This means I
>   can always know rearranging stuff later is a possibility, and its less
>   cognitive burden to organize.
>

Yes.  The idea is that you initially capture notes into a single default
file and then can quickly refile them as needed.

>
> In short, the framework takes care of organization and makes retrieval
> easy and all I have to worry about is the content.
>

Yes, I think we typically do this throughout Hyperbole, as it is very
important to us.

Thanks for the thoughts.

-- rsw


Re: Propertize some navigational keybindings

2022-10-08 Thread Rudolf Adamkovič
Ihor Radchenko  writes:

> I think that the most thorough way to add this feature is following
> what `help--key-description-fontified' does (we should not call this
> internal function though): [...]

How about the attached patch?

Rudy

>From edc5dde6d3a68e15491a0273d283e38482e6390e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= 
Date: Fri, 7 Oct 2022 17:05:15 +0200
Subject: [PATCH] org-export: Propertize keybindings in Org Export dispatch UI

* lisp/ox.el (org-export--dispatch-ui): Propertize the navigational
keybindings.
---
 lisp/ox.el | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index e059983fb..6089a575b 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -7123,8 +7123,20 @@ back to standard interface."
 	(delete-other-windows)
 	(org-switch-to-buffer-other-window
 	 (get-buffer-create "*Org Export Dispatcher*"))
-	(setq cursor-type nil
-	  header-line-format "Use SPC, DEL, C-n or C-p to navigate.")
+(setq cursor-type nil)
+(setq header-line-format
+  (let ((propertize-help-key
+ (lambda (key)
+   ;; Add `face' *and* `font-lock-face' to "work
+   ;; reliably in any buffer", per a comment in
+   ;; `help--key-description-fontified'.
+   (propertize key
+   'font-lock-face 'help-key-binding
+   'face 'help-key-binding
+(apply 'format
+   (cons "Use %s, %s, %s, or %s to navigate."
+ (mapcar propertize-help-key
+ (list "SPC" "DEL" "C-n" "C-p"))
 	;; Make sure that invisible cursor will not highlight square
 	;; brackets.
 	(set-syntax-table (copy-syntax-table))
-- 
2.38.0

-- 
"One can begin to reason only when a clear picture has been formed in
the imagination."
-- Walter Warwick Sawyer, Mathematician's Delight, 1943

Rudolf Adamkovič  [he/him]
Studenohorská 25
84103 Bratislava
Slovakia


Re: Org and Hyperbole

2022-10-08 Thread Robert Weiner
Hi Juan:

I just tried your ':' technique for Hyperbole button activation with Avy
and it works well.  But what is the advantage over just using Avy to jump
to the button and then pressing {M-RET}.  With your technique, you have to
think about activating the button before you are there versus when you are
on it, as you normally do.

-- rsw


On Sat, Jun 25, 2022 at 10:32 AM Juan Manuel Macías 
wrote:

> Hi, Robert,
>
> Robert Weiner writes:
>
> > We do like avy and as you say, Hyperbole can work with it.  We try to
> > avoid requiring any non-builtin Emacs packages for Hyperbole.  With a
> > few, we support them optionally.  Unless there is a strong use case
> > for utilizing avy in certain ways, we would tend to leave that to
> > others to extend Hyperbole but personally I just add it in and use its
> > character and line navigation sometimes.  Did you have any particular
> > uses in mind?
>
> My use of the mouse within Emacs is practically nonexistent, and outside
> of Emacs I have relegated the mouse to a few graphical applications such
> as Gimp, Krita, Scribus, and little else. That's why I find avy
> extremely handy for quickly navigating through text. By adding an action
> to avy-dispatch-alist you can execute an arbitrary command once the
> cursor has jumped to its target. For example, I have put this for
> hyperbole in my init:
>
> (add-to-list 'avy-dispatch-alist '(?: . (lambda (pt)
>   (goto-char pt)
>   (hkey-either
>
> Thus, the typical action to activate a 'far' hyperbole button would be:
>
> 1. Call avy and insert a letter;
>
> 2. When avy's hints are displayed in the screen, I hit the colon key ":"
> and then the hint letter I want to go to (an implicit button, for
> example). And at the moment the associated action of that button is
> executed.
>
> For those of us who hardly use the mouse, it is really very practical,
> and I think maybe mentioning that tip might be nice in the hyperbole
> documentation.
>
> Best regards,
>
> Juan Manuel
>


Re: Org and Hyperbole

2022-10-08 Thread Robert Weiner
Hi Jonathan:

I and I think others would love to understand what you are trying to
achieve.  I get that you want to use the Koutline format with external
systems like GemText and the TXR parser generator/Lisp language but I would
rather understand the purpose of what you are trying to build (problem(s)
to solve) and what you can't do with the Koutliner as it now stands that
you would like to do.  Try to explain it without referencing any particular
technologies, as I can't follow many of the things you write because of a
lack of context.

Thanks,

-- rsw

On Fri, Jun 24, 2022 at 8:51 AM Robert Weiner  wrote:

> Hi Jonathan:
>
> Yes, the backlink issue is one of the reasons we have not focused on
> moving kcells with permanent hyperlink anchors from one file to another.
> We generally feel that the context of kcells within an outline is important
> and thus should stay as a unit.  You obviously can and do link to any kcell
> from outside the outline by combining the file path with the cell's
> permanent id and thus could have a grep-like search across any number of
> Koutlines.
>
> But I agree a cross-file permanent ID structure could be useful and that
> there are times where you want to move or copy outline structure between
> files (we already support exporting the text of koutlines to other buffers
> or to HTML), so this is a future use case to consider.
>
> -- rsw
>
>
> On Fri, Jun 24, 2022 at 6:55 AM indieterminacy
>  wrote:
>
>> Hi Robert,
>>
>> On 24-06-2022 07:34, Robert Weiner wrote:
>> > Hi Samuel:
>> >
>> >> On Jun 24, 2022, at 12:32 AM, Samuel Wales 
>> >> wrote:
>> >>
>> >> hi robert, welcome to the org list and thanks for your offer.
>> >>
>> >> for starters, does hyperbole have any concept of links that are:
>> >>
>> >> - unbreakable [like org-id]
>> >
>> > This one is not so simple to answer.  Hyperbole only uses
>> > perma-hyperlink anchors in its Koutliner format.  But it would be
>> > straightforward to add a UUID-type id for use elsewhere.
>> >>
>> >> - bidirectional [link a goes to link b; link b goes to link a], or,
>> >> reversible via command to say "what links here?" [by any mechanism.
>> >> if desired, please see "id markers" concept on this list for
>> >> unbreakable bidirectional links and more stuff]
>> >
>> > Hyperbole does not have bi-directional links, only a history function
>> > to move back through followed node paths.  We have started thinking
>> > about this need recently.
>> >
>> > — rsw
>> Improvements to the backend of Koutliner would be useful, especially as
>> (if I recall from the documentation) the API aspects are not so clearly
>> defined.
>>
>> Bi-directionality would be a priority IMHO, especially to facilitate the
>> updating of all links targeting a specific block should it move.
>>
>> At the moment, each link self updates when it identifies a reference
>> which needs to be updated but that comes across as an expediency (which
>> I mitigate with direty look running through links to validate they are
>> functional).
>>
>> It would be great to achieve this with an 'eventual-consistency' type
>> way, given that files could come in and out of a system or network.
>>
>> Similarly, allowing the perma-hyperlink anchors to be transferred would
>> really mature the format.
>>
>> Here are some umble functions I use to facilitate moving blocks into
>> other files:
>>
>> https://git.sr.ht/~indieterminacy/1q20bwb_oq_transferring_emacs/tree/main/item/kqk_kq_blocks_koutliner.el
>>
>> They at least avoid being descructive, as after moving the block becomes
>> a pointer to where the moved block ended up in the other dcoument - but
>> it feels like a fudge which could turn some documents into spaghetti.
>>
>>
>> While Im sure that you are planning on solving these problems within
>> eLisp, I should point out that I shall have a Koutliner parser, written
>> in TXR (soon to be finalised, Ive had some familial and health
>> impedencies recently).
>>
>> Here is a WIP
>> https://git.sr.ht/~indieterminacy/1q20hqh_oqo_parsing_glean
>>
>> And a (rough) example
>> https://git.sr.ht/~indieterminacy/1q20hqh_oqo_parsing_glean#examples
>>
>> I do need to add some facets (I suspect the linking for other blocks is
>> in a seperate script).
>> I shall also be integrating the parser with GemText (Orgmode would be
>> nice one day too).
>> https://git.sr.ht/~indieterminacy/1q20hqh_kq_parsing_gemtext/
>>
>> I do quite like TXR's datalisp format but I havent gotten around to
>> finding a way to slurping it up into eLisp. I feel like it should be
>> easy to resolve but its not a query which is easy given SEO search.
>>
>> The way Ill be approaching this interpreter is that it could search the
>> aggregate or a journey from one document. Being able to have an overview
>> of multiple documents is something I consider to be helpful, given the
>> domain of cross-referencing.
>>
>> and FYI, I will be working on outputting RDF from Koutliner and GemText
>> analyses.
>>
>> --
>> Jonathan McHugh
>> 

Re: Org and Hyperbole

2022-10-08 Thread Robert Weiner
Hi Eric:

Thanks for pointing this out.  Although, I don't think many people use the
gnus-dired.el library, we'll add this to the todo list.  We have handled
this sort of thing with other keys previously, where the Hyperbole binding
is not utilized if the key has already been bound in the mode prior to
Hyperbole's binding.

-- rsw

On Thu, Jul 7, 2022 at 6:46 AM Fraga, Eric  wrote:

> Robert,
>
> one immediate issue that has arisen is the binding of C-c C-m (i.e. C-c
> RET) to hui-select-thing.  This clobbers the whole gnus-dired-mode-map
> in dired mode (for those of us that use gnus...).
>
> Just noting this but should probably take this off-list as it has
> nothing to do with org.
>
> --
> : Eric S Fraga, with org release_9.5.4-609-g713598 in Emacs 29.0.50


Re: Org and Hyperbole

2022-10-08 Thread Robert Weiner
Hi Siva:

(Sorry, I can't read this list too often so I miss some of these great
messages).

That is a very nice explanation of the power of implicit buttons.  Imagine
being able to ignore having to fully parse documents and instead just
describing the patterns of interest and what to do with them using simple
mechanisms (see Hyperbole's defal, defil and defib macros) and then having
live hypertext in such documents with no formatting changes.  Hyperbole
makes this quick and easy.

We hope more people will give it a spin and get an understanding of what
they can do with it as you have, especially in tandem with Org mode.

-- rsw

On Sun, Jun 26, 2022 at 2:37 AM Siva Swaminathan 
wrote:

> Hello,
>
> I only recently became aware of Hyperbole (through Bob's demo video
> available on Youtube), and came across this thread while googling to
> find more information about Hyperbole. I feel that some of the
> questions raised here about Hyperbole sound akin to the story of five
> blind men feeling the elephant, so I humbly offer my perspective on
> what I consider to be the key underlying ideas. Forgive me if I'm
> stating the obvious, and I also don't know whether Hyperbole as
> currently implemented does exactly all this :-)
>
> I'd like to think of the key idea of Hyperbole as converting text in
> buffers into *objects* (aka "buttons") by attaching *behavior* to them.
> The two actions provided by convention could be thought of as akin to
> the left-click and right-click which one is familiar with in
> contemporary GUIs, in this case respectively bound to methods for "do
> (by default)" and "show metadata". Supporting more
> behaviors/methods/messages for user-invocation is an obvious next idea
> (if not already so).
>
> The above system would be of quite limited composability if it required
> objects to be defined explicitly -- because most buffers one operates
> on are generated without awareness of Hyperbole (imagine the pain of
> everything needing to conform to something like a Hyperbole
> framework/protocol!). The cleverness behind implicit buttons is that
> one can opportunistically use common conventions as "schemas" to "parse
> / deserialize" the contents which make up an object from any buffer (in
> this case via regexps) and attach corresponding (expected) behaviors to
> them! Because of the highly structured nature of such data, even if
> embedded in a stream of plain text, it can typically be parsed
> correctly without needing explicit type annotations. The behaviors
> could presumably depend not just the object, but also the active modes,
> environment variables, etc.
>
> Here are a few made-up example use cases (hand-waving over details):
>
> 1. I might embed phrases such as "bug:123" in my code / emails / org
> task management and have behaviors that respectively fetch the bug
> report / open some URL in a browser / or update the TODO status based
> on the bug status, as desired. This would help me interface
> conveniently with a bespoke bug-tracking tool.
>
> 2. On encountering Goodreads links in my reading list org file, I could
> have a behavior to parse the contents of the webpage and extract
> desired metadata to add to the item properties (or an entry to some org
> table).
>
> 3. Linking by immutable block identifiers (and fast lookup) of course
> enables a lot of PKM workflows that have recently become popular (with
> the addition of bidirectional links).
>
> Other aspects such as menus generated from button files seem like
> convenient affordances bolted on to make up the UI of the system. I
> still need to wrap my mind around these, but I wonder whether there
> might be opportunities to compose with other ecosystem tools which have
> pioneered some nice UI ideas eg. transient menus, hydras, interactive
> selection lists, etc. But that's a discussion for the Hyperbole mailing
> list.
>
>
> From a first impression, I'm really impressed, and also surprised that
> Hyperbole is not more popular. Much gratitude to the contributors for a
> nifty tool, and a fascinating design perspective.
>
> Best regards,
> Siva
> http://sivark.me
>
>


Re: Org and Hyperbole

2022-10-08 Thread Robert Weiner
On Sat, Jun 25, 2022 at 5:18 PM David Masterson 
wrote:

> Robert Weiner  writes:
>
> > Great to see you here too.  We could use you on extended Hyperbole
> > documentation if you ever get into it.
>
> Thanks, my hands don't type well anymore or I might've considered it,
>
> > 1.  The OO-Browser was part of InfoDock, my IDE framework atop XEmacs.
> > I have updated it for GNU Emacs but never get the time to finish it
> > enough to put it out there again as Hyperbole fills my spare time.
> > But reach out directly if you want to discuss.
>
> Oh! I forgot about Infodock!  OO-Browser would be good for the
> developers in the crowd.  Perhaps the new interest of Hyperbole v8 will
> spur interest in OO-Browsr.
>

I know it would be good to revive it.  Just need more time than I have now.

>
> > 2. We have not yet integrated org-export with the Koutliner but want
> > to.  You can convert a Koutline to a star outline and call it an Org
> > file, so it wouldn’t be too hard.  It has its own builtin export to
> > HTML from which you could get to pdf as well, I imagine.
>
> I didn't see in the documentation on how to convert a Koutline to a star
> outline.  That would be useful to me (especially if you could go the
> other way as well).  With this capability, it shouldn't be too hard
> write a standard file header in (say) commented Latex that could be
> included in the file (via a post-hook) which could then be run through
> org-export via org-publish.
>

Just use {M-x kimport:star-outline RET} when in an Org or Emacs outline
buffer to create a Koutline from them.

I just checked and there doesn't seem to be an equivalent
kexport:star-outline but you could probably write it without too much
effort using the existing kview:map-siblings function and starting from the
first cell.

-- rsw


> --
> David Masterson
>


Re: Org and Hyperbole

2022-10-08 Thread Robert Weiner
On Tue, Sep 27, 2022 at 11:50 AM Russell Adams 
wrote:

>
> Could you point to some usage of Hyperbole that could help address
> it's use case?
>

Hi Russell:

There are videos.  The 'Overview and Demo' video has section links in the
description so you can jump to just sections that interest you:

  https://www.gnu.org/software/hyperbole/#videos

There is a Why Use Hyperbole document with various use cases:

  https://www.gnu.org/software/hyperbole/HY-WHY.html

There are user quotes that explain why they can't live without Hyperbole:

  https://www.gnu.org/software/hyperbole/#user-quotes

There is a Reddit page where I list a bunch of the things I do with
Hyperbole frequently, many with the single Action Key, M-RETURN:


https://www.reddit.com/r/emacs/comments/jk3cn0/daily_ways_gnu_hyperbole_helps_me_stay_in_flow/

And there is both a FAST-DEMO and older more extensive DEMO included with
Hyperbole, meant to be read and interacted with when you have Hyperbole
available (not just read as a web page as shown here):

  https://www.gnu.org/software/hyperbole/FAST-DEMO.html

  https://www.gnu.org/software/hyperbole/DEMO.html

And now Hyperbole works really well with Org mode so you can enjoy both
together to multiply your productivity.

-- rsw


Re: Org and Hyperbole

2022-10-08 Thread Robert Weiner
Hi Guys:

I know what SQLite, org-roam and multi-user RDBMSes are and I use all of
these things at various levels.  They are useful in many ways as you have
pointed out and across time, we may consider optional integrations but one
of the core design principles of Hyperbole is to work in all fairly current
major versions of Emacs (today this is back to V27) on any display device
and to not require any other external packages or C-compiled modules.  Now
we will add optional package support where useful as we have done for
Treemacs, ace-window and org-rifle but never require such things to use all
of Hyperbole's base functionality.  We then know that all Emacs users can
install Hyperbole and use it effectively without any external dependencies
required, whether on a terminal or an old operating system or what have
you.  This is part of the value of Emacs, common capabilities across a wide
spectrum of computing environments.

If I had my druthers, Hyperbole would ship pre-compiled as well since in
the past the byte-compiled code was forward-compatible across many major
Emacs versions, but this no longer seems to be the case to me and the Emacs
package system requires byte-compilation at installation time anyway, so we
have a bit less of a 'turn-key' system than desired.

Although we build Hyperbole so it can be highly customized and programmed,
we know that many people are just looking for ready to use productivity
improving packages, many more than want to hack on a package.  Therefore,
we focus our energies on delivering more and more value in that direction.

Org-roam is very capable for many people and we are not out to simply
replicate it and slightly improve upon its behavior.  We want to provide a
simpler, more contained solution for people who like and use HyRolo and
want a similar solution for note taking.  Quick and easy-to-use where you
can get in and out quickly, restoring your prior context rapidly, working
with multiple file formats and usable wherever you use Emacs.

-- rsw

On Sat, Oct 8, 2022 at 1:03 AM Jean Louis  wrote:

> * Hendursaga  [2022-10-08 03:46]:
> > Jean Louis  writes:
> >
> > > Of course it is so much better option than keeping stuff in text. All
> properties shall be in the database. SQLite is not a network database, thus
> it disables collaboration. It is better developing with PostgresSQL or
> MariaDB, or other network databases.
> >
> > Vanilla SQLite, that is. There are multiple[1] SQLite[2] addons[3]
> around[4] that add some sort of distributed layer to it, most being
> zero-cost (or at least low-cost) abstractions. Pretty cool, I'd say!
> >
> > ~ Hendursaga
> >
> > [1] https://dqlite.io/
> > [2] https://litestream.io/
> > [3] https://github.com/losfair/mvsqlite
> > [4] https://github.com/rqlite/rqlite
>
> Thanks, insightful, I have reviewed links. But none tells me that it
> is truly network based database. Of course one may replicate files
> through network and send data, that is not what is meant with network
> database. One can make layers on top of it, but that does not make it
> multi user or suitable for collaboration.
>
> From:
> https://www.sqlite.org/whentouse.html
>
> ,
> | Many concurrent writers? → choose client/server
> |
> | If many threads and/or processes need to write the database at the
> | same instant (and they cannot queue up and take turns) then it is best
> | to select a database engine that supports that capability, which
> | always means a client/server database engine.
> |
> | SQLite only supports one writer at a time per database file. But in
> | most cases, a write transaction only takes milliseconds and so
> | multiple writers can simply take turns. SQLite will handle more write
> | concurrency than many people suspect. Nevertheless, client/server
> | database systems, because they have a long-running server process at
> | hand to coordinate access, can usually handle far more write
> | concurrency than SQLite ever will.
> `
>
>
> --
> Jean
>
> Take action in Free Software Foundation campaigns:
> https://www.fsf.org/campaigns
>
> In support of Richard M. Stallman
> https://stallmansupport.org/
>
>


Re: Markdown export is non-deterministic?

2022-10-08 Thread Max Nikulin

On 08/10/2022 05:31, Matias Eyzaguirre wrote:


#+begin_example
1.  [Introduction](#org775f005)
2.  [Roadmap](#orgccee397)
#+end_example

While these identifiers are generally not visible to a reader, they
add noise to the version control diffs. I'm wondering if it's possible
to force the relevantrandom number generator to use a fixed seed or,
more ideally, have the ids be based on the section title (or its
hash)?


You may try to add CUSTOM_ID property to section. Current behavior is 
intentional, see e.g.


Nicolas Goaziou… Re: HTML export uses anchor ids which change on every 
export. Sat, 29 May 2021 21:50:24 +0200. 
https://list.orgmode.org/87bl8tz5dr@nicolasgoaziou.fr


A long discussion:

Samuel Wales. stability of toc links. Tue, 8 Dec 2020 16:28:46 -0700. 
https://list.orgmode.org/cajcao8txvw39h18fuxltwodynkqsfhqcp+ydiywflee29b1...@mail.gmail.com


Some people managed to implement anchors based on heading titles

TEC. [Interest] Determanistic Org IDs. Sun, 19 Jul 2020 22:27:31 +0800. 
https://list.orgmode.org/e1jxajg-0004dk...@lists.gnu.org




Re: prevent underscores to be translates in subscript when exporting to latex

2022-10-08 Thread Mark Barton


> On Oct 8, 2022, at 6:58 AM, Luca Ferrari  wrote:
> 
> Hi all,
> I've a link like
> [[https://foo.com/bar_baz.html][https://foo.com/bar_baz.html] 
> ] that,
> once rendered in LaTeX, is converted to a subscript like
> bar\textsubscript{baz}.
> Is there a way to prevent this?

I settled on adding an OPTION line to my org file to disable this behavior, 
since the documents I'm working on rarely need subscripts and I can use the 
LaTeX form when I do need to specify them.

#+OPTIONS: toc:nil H:3 num:nil ^:nil

The last part forces the export to recognize just the LaTeX form of specifying 
subscripts.

[[info:org#Export Settings][org#Export Settings]]
‘^’
 Toggle TeX-like syntax for sub- and superscripts.  If you write
 ‘^:{}’, ‘a_{b}’ is interpreted, but the simple ‘a_b’ is left as it
 is (‘org-export-with-sub-superscripts’).

Mark

Re: prevent underscores to be translates in subscript when exporting to latex

2022-10-08 Thread Luca Ferrari
On Sat, Oct 8, 2022 at 4:12 PM Ihor Radchenko  wrote:
> [[https://foo.com/bar_baz.html][=https://foo.com/bar_baz.html=]]
>

This has, however, the effect of changing the font type to \textt. The
same happens when using ~ in place of =.

> or you can drop the description part of the link altogether:
>
> [[https://foo.com/bar_baz.html]]

This is the simplest way, according to me, and keeps the same font as
the surrounding text.

Thanks.



[tip] Create and Insert a public Nextcloud/Owncloud link

2022-10-08 Thread Juan Manuel Macías
Hi all,

One of the few things that I miss from a desktop environment like Gnome
Shell or KDE Plasma (currently I use EXWM), is the good integration
these environments had with Nextcloud, as I am a heavy user of
Nextcloud. Many times I need to create and share a public link to a file
in my local folder. In the Nextcloud forum I learned how it can be done
from the command line using curl, so starting from that, it wasn’t very
difficult to write this function in Elisp to insert a public link at
point. It can be inserted in two ways: literally or as an Org bracket
link, with description.

For the function to work we must have: a) a folder within our local
Nextcloud directory dedicated exclusively to public files; b) a line
with our personal data in the ~/.authinfo file. Assuming, for example,
that we use a third-party Nextcloud service like Disroot, the necessary
line in authinfo would be:

machine cloud.disroot.org login  password 

And let’s go with the function. Before I have defined these three
variables:

┌
│ (defvar nextcloud-url "https://cloud.disroot.org;)
│ (defvar nextcloud-public-folder "~/disroot/Public/")
│ (defvar nextcloud-public-folder-name "Public")
└

And the function itself (caveat: the function is not asynchronous):

┌
│ (defun insert-nextcloud-link ()
│   (interactive)
│   (let* ((file-name (read-file-name "File: "
│   nextcloud-public-folder))
│(file (if (directory-name-p
│   file-name)
│  (replace-regexp-in-string
│   (expand-file-name
│nextcloud-public-folder)
│   ""
│   file-name)
│(file-name-nondirectory file-name)))
│(desc
│ (read-from-minibuffer
│  "Link description (enter = no description): "))
│(auth
│ (nth 0
│  (auth-source-search
│   :host "cloud.disroot.org"
│   :requires '(user secret
│(my-username (plist-get auth :user))
│(my-passwd (funcall (plist-get auth :secret)))
│(result-raw (shell-command-to-string
│ (concat "curl -u "
│ "\""
│ my-username
│ ":"
│ my-passwd
│ "\""
│ " -H \"OCS-APIRequest: true\" -X POST "
│ nextcloud-url
│ "/ocs/v1.php/apps/files_sharing/api/v1/shares -d 
path="
│ "\""
│ nextcloud-public-folder-name
│ "/"
│ file
│ "\""
│ " -d shareType=3"
│ " -d permissions=1")))
│(result (with-temp-buffer
│  (insert result-raw)
│  (goto-char (point-min))
│  (re-search-forward "" nil t)
│  (let ((desde (point)))
│(re-search-forward "<" nil t)
│(narrow-to-region desde (- (point) 1))
│(buffer-string)
│ (if (string= desc "")
│   (insert result)
│   (insert (format "[[%s][%s]]" result desc)
└

Best regards,

Juan Manuel 



Re: test-org-table/sort-lines: Failing test on macOS

2022-10-08 Thread Max Nikulin

On 08/10/2022 12:25, Ihor Radchenko wrote:

Max Nikulin writes:


When case is not ignored (4th argument is nil) locale-dependent
collation rules are used, so you get the expected result.

$ printf 'a\nB\n' | LC_COLLATE=C sort
B
a
$ printf 'a\nB\n' | LC_COLLATE=en_US.UTF-8 sort
a
B


Should we then modify the test to set locale explicitly?


Rudolf cited the context of this test and "C" locale is explicitly used 
there.



IDK if it is related, but there was a recent (fixed) bug in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55787


I have not tried to find commits to check if only version sort is affected.


Note that Rudolf is using Emacs 29.


and macOS, so libc and locales version may be different as well.






Re: problem with the on-line manual

2022-10-08 Thread Giuseppe Lipari
Thank you very much, Max.

By further investigating the problem I had, I tried to export the
following snippet:

---
** Example
*** Temperature control  :B_example:
:PROPERTIES:
:BEAMER_env: example
:END:

Let us make a simple example of temperature control.

#+attr_latex: :float t :width .5\textwidth
[[file:room1-crop.pdf]]
---

When exported, this produces the following :

---
\begin{frame}[label={sec:orgb828ded}]{Example}
\begin{example}[Temperature control]
\footnotesize
Let us make a simple example of temperature control.

\begin{t}
\centering
\includegraphics[width=.5\textwidth]{room1-crop.pdf}
\end{t}
---
Which is of course not what I want. Notice the \begin{t} ... \end{t}.

If I remove the ":float t" option :

---
** Example

*** Temperature control   :B_example:
:PROPERTIES:
:BEAMER_env: example
:END:

#+begin_export latex
\footnotesize
#+end_export
Let us make a simple example of temperature control.

#+attr_latex: :width .5\textwidth
[[file:room1-crop.pdf]]
---

The exporter produces

---
\begin{frame}[label={sec:org5a5b3f6}]{Example}
\begin{example}[Temperature control]
\footnotesize
Let us make a simple example of temperature control.

\begin{center}
\includegraphics[width=.5\textwidth]{room1-crop.pdf}
\end{center}
---

Which is certainly more correct.
There is no mention of this behavior in the manual, and in the past
the ":float t" option worked as expected. In facts, I have tens of
org-mode documents for my slides, all containing the ":float t"
option, and now they are all exported incorrectly.

Is this a bug, or has the syntax changed in a way that is not documented yet ?

Best,

Giuseppe Lipari

Le sam. 8 oct. 2022 à 14:42, Max Nikulin  a écrit :
>
> On 08/10/2022 15:58, Giuseppe Lipari wrote:
> >
> > I would like to point out that the following link in the org-mode
> > on-line manual is broken :
> >
> > https://orgmode.org/manual/Images-in-LaTeX-export.html
> >
> > can someone please fix/restore it ?
>
> See the following thread:
> Tim Landscheidt. Some links in online manual do not work. Sun, 02 Oct
> 2022 20:00:54 +.
> https://list.orgmode.org/87r0zqknbd@vagabond.tim-landscheidt.de
> >
> > Also : in recent versions of org-mode (I have the 9.5.3), it seems that
> > exporting figures in latex/beamer does not apply the ":float t" flag,
> > and does not center the figure. Can you please tell me the exporter
> > option that I have to set to enable floating figures ?
>
> To get manual for your version you may try
> M-: (info "(org) Images in LaTeX export")
>
> For a while single-page variant of the manual is not affected by the problem
> https://orgmode.org/org.html#Images-in-LaTeX-export



Re: prevent underscores to be translates in subscript when exporting to latex

2022-10-08 Thread Ihor Radchenko
Luca Ferrari  writes:

> Hi all,
> I've a link like
> [[https://foo.com/bar_baz.html][https://foo.com/bar_baz.html]] that,
> once rendered in LaTeX, is converted to a subscript like
> bar\textsubscript{baz}.
> Is there a way to prevent this?

Description part of the link can contain markup, including underscore.
Just as if you write bar_baz in paragraph, =_= is interpreted as
subscript.
As usual, to prevent Org markup from being interpreted, you can use
verbatim environment:

[[https://foo.com/bar_baz.html][=https://foo.com/bar_baz.html=]]

or entity

[[https://foo.com/bar_baz.html][https://foo.com/bar\under{}baz.html]]

or you can drop the description part of the link altogether:

[[https://foo.com/bar_baz.html]]


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



prevent underscores to be translates in subscript when exporting to latex

2022-10-08 Thread Luca Ferrari
Hi all,
I've a link like
[[https://foo.com/bar_baz.html][https://foo.com/bar_baz.html]] that,
once rendered in LaTeX, is converted to a subscript like
bar\textsubscript{baz}.
Is there a way to prevent this?

Thanks,
Luca



Re: Bug: ODT export of Chinese text inserts spaces for line breaks

2022-10-08 Thread Ihor Radchenko
Maxim Nikulin  writes:

> On 29/06/2021 10:47, James Harkins wrote:
>> * Test
>> 1本人不想亲自拿到学历学位证书、急于离校者,可书面委托他人代领学历学位证
>> 书,29日起即可离校;2本人想亲自领取学历学位证书者,按学校规定的程序及有关
>> 要求办理离校手续,领取相关证书后离校;
>
>> Exporting to ODT produces the following (body text, omitting titles,
>> headers and such).
>> 
>> 1本人不想亲自拿到学历学位证书、急于离校者,可书面委托他人代领学历学位证 书,29日起即可离校;2本人想亲自领取学历学位证书者,按学校规定的程序及有关 
>> 要求办理离校手续,领取相关证书后离校;
>
> Confirmed: newlines are copied to ODT document as is and they appear as 
> spaces in libreoffice. I did not tried HTML since I am unsure if 
> browsers should glue paragraphs with newlines into continuous string 
> without spaces. Maybe it is necessary to add some attributes for proper 
> representation (e.g. "lang"), however "#+LANGUAGE: cn" does not help 
> even though libreoffice considers paragraph as Chinese.

Newlines appearing as spaces is in ODT schema.

> As to splicing lines, I found `fill-delete-newlines' that uses 
> `fill-nospace-between-words-table' besides ?| category to determine 
> whether space should be suppressed while splicing lines. In addition 
> there are some variables to tune behavior.

I am attaching the fix that leverages `fill-region' to handle all the
complexities for us. It is the easiest way and I see no reason to look
deeper.

>From 614944ba1ac5502c7648747363674b8d45bfaaf7 Mon Sep 17 00:00:00 2001
Message-Id: <614944ba1ac5502c7648747363674b8d45bfaaf7.1665234699.git.yanta...@gmail.com>
From: Ihor Radchenko 
Date: Sat, 8 Oct 2022 21:08:47 +0800
Subject: [PATCH] ox-odt: Fix newlines replaced by spaces in Han script

* lisp/ox-odt.el (org-odt-plain-text): Use `fill-region' to unfill the
paragraphs with newlines accounting for scripts without spaces between
words.

Reported-by: James Harkins 
Link: https://orgmode.org/list/sbhnlv$4t1$1...@ciao.gmane.io
---
 lisp/ox-odt.el | 17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 208a39d9d..c989d2014 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -2903,9 +2903,20 @@ (defun org-odt-plain-text (text info)
 	(setq output
 	  (replace-regexp-in-string (car pair) (cdr pair) output t nil
 ;; Handle break preservation if required.
-(when (plist-get info :preserve-breaks)
-  (setq output (replace-regexp-in-string
-		"\\(\\)?[ \t]*\n" "" output t)))
+(if (plist-get info :preserve-breaks)
+(setq output (replace-regexp-in-string
+		  "\\(\\)?[ \t]*\n" "" output t))
+  ;; OpenDocument schema recognizes newlines as spaces, which may
+  ;; not be desired in scripts that do not separate words with
+  ;; spaces (for example, Han script).  `fill-region' is able to
+  ;; handle such situations.
+  (setq output
+(with-temp-buffer
+  (insert output)
+  ;; Unfill.
+  (let ((fill-column (point-max)))
+(fill-region (point-min) (point-max)))
+  (buffer-string
 ;; Return value.
 output))
 
-- 
2.35.1


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


Re: Break lines in Query replace. Help.

2022-10-08 Thread tomas
On Sat, Oct 08, 2022 at 01:19:28PM +0200, Ypo wrote:
> I want to make a "query replace", where
> 
> " - " should be substituted by
> 
> "breakline - "
> 
> 
> How do I insert in a query replace a breakline?
> 
> "\\ - " seems to work only for LaTeX export.
> 
> "^J - " writes down ^J literally, and doesn't work as a break line.

It's C-Q C-J (aka ^Q^J). The CTRL-Q "quotes" the next char (handy also
for other control characters -- see also 7.1 "Inserting Text" in the
fine manual).

Cheers
-- 
t
> 
> 
> Best regards
> 


signature.asc
Description: PGP signature


Re: [PATCH] LSP support in org-src buffers

2022-10-08 Thread Christopher M. Miles

+1

Good patch, will it consider to also support package "lsp-mode"? Or at
least make it easy to extending for other lsp-related packages?

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


signature.asc
Description: PGP signature


[PATCH] Re: org-contacts: Dead link at https://orgmode.org/worg/org-contrib/index.html

2022-10-08 Thread Christopher M. Miles

Ihor Radchenko  writes:

> Hi,
>
> Could you please update the link to the actual version of org-contacts
> documentation in https://orgmode.org/worg/org-contrib/index.html?
>
> You can send a patch against https://git.sr.ht/~bzg/worg to Org ML.

From 1521f4e27360d536197ee0ac524a641aad02822f Mon Sep 17 00:00:00 2001
From: stardiviner 
Date: Sat, 8 Oct 2022 20:40:34 +0800
Subject: [PATCH] Fix dead link of org-contacts

---
 org-contrib/index.org|  9 ++---
 org-contrib/org-contacts.org | 30 ++
 2 files changed, 36 insertions(+), 3 deletions(-)
 create mode 100644 org-contrib/org-contacts.org

diff --git a/org-contrib/index.org b/org-contrib/index.org
index 628d9493..b9f42af4 100644
--- a/org-contrib/index.org
+++ b/org-contrib/index.org
@@ -66,9 +66,6 @@ the package -- it will hopefully have some documentation.
   Written by /Eric Schulte/.
   [[contribfile:lisp/org-collector.el][Link to raw file]].
 
-- [[contribfile:lisp/org-contacts.el][/org-contacts.el/ -- manage contacts (org-plus-contrib)]] ::
-  Written by /Julien Danjou/, now in Org contrib.
-
 - [[file:org-depend.org][/org-depend.el/ -- TODO dependencies for Org-mode]] ::
   Make TODO state changes in one entry trigger changes in another, or
   be blocked by the state of another entry.  Also, easily create
@@ -426,6 +423,12 @@ See [[file:../exporters/index.org][Exporters]].
   images in email.  Written by /Eric Schulte/, maintained by /Chen Bin/.
   [[https://github.com/org-mime/org-mime][Repo]].
 
+- [[file:org-contacts.org][/org-contacts.el/ -- manage contacts]] ::
+  Managing contacts information, recording, searching etc in Org
+  mode. As contacts database backend for mu4e etc.  Written by /Julien
+  Danjou/, now maintained by /stardiviner/. Link to [[https://repo.or.cz/org-contacts.git][project repo
+  page]].
+
 * Obsolete
 
 - [[file:org-annotation-helper.org][/org-annotation-helper.el/ -- managing browser bookmarks]] ::
diff --git a/org-contrib/org-contacts.org b/org-contrib/org-contacts.org
new file mode 100644
index ..caac4eaf
--- /dev/null
+++ b/org-contrib/org-contacts.org
@@ -0,0 +1,30 @@
+* Intro
+
+- Managing contacts information in Org mode.
+- Recording contact info in Org mode.
+- Searching with command ~org-contacts~.
+- Used as contacts database backend for email address completing in mu4e etc.
+- Export contacts to a vCard file.
+- Put birthdays in your Org Agenda.
+
+* Installation
+
+Package will be submitted to NonGNU or MELPA. Wait me have time to do this work.
+
+* Usage
+
+** Search contact in org-contacts databse
+
+Use command =[M-x org-contacts]= to search.
+
+** Complete contact property with some functions support
+
+*** NAME
+
+*** NICK
+
+*** EMAIL
+
+*** BIRTHDAY
+
+
-- 
2.37.2


-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


signature.asc
Description: PGP signature


Re: Add 'backend' header arg to clojure code blocks

2022-10-08 Thread Christopher M. Miles

+1

Chris Clark  writes:

> This is my first attempt to contribute to org-mode; please let me know if I'm 
> doing something wrong.
>
> Attached is a patch to incorporate some of the changes that were originally 
> presented by Ag Ibragimov
> here: https://list.orgmode.org/m2y2oimdjf@gmail.com/. I've been using 
> these changes locally for a long
> time, and I'm hoping others might benefit!
>
> For example:
>
>#+header: :backend babashka
>#+begin_src clojure
>  (range 3)
>#+end_src
>
>#+RESULTS:
>: (0 1 2)
>
> [6. text/x-patch; 
> 0001-ob-clojure.el-Add-a-backend-header-arg-to-clojure-co.patch]...


-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


signature.asc
Description: PGP signature


Re: problem with the on-line manual

2022-10-08 Thread Max Nikulin

On 08/10/2022 15:58, Giuseppe Lipari wrote:


I would like to point out that the following link in the org-mode 
on-line manual is broken :


https://orgmode.org/manual/Images-in-LaTeX-export.html 


can someone please fix/restore it ?


See the following thread:
Tim Landscheidt. Some links in online manual do not work. Sun, 02 Oct 
2022 20:00:54 +. 
https://list.orgmode.org/87r0zqknbd@vagabond.tim-landscheidt.de


Also : in recent versions of org-mode (I have the 9.5.3), it seems that 
exporting figures in latex/beamer does not apply the ":float t" flag, 
and does not center the figure. Can you please tell me the exporter 
option that I have to set to enable floating figures ?


To get manual for your version you may try
M-: (info "(org) Images in LaTeX export")

For a while single-page variant of the manual is not affected by the problem
https://orgmode.org/org.html#Images-in-LaTeX-export



Re: Some links in online manual do not work

2022-10-08 Thread Max Nikulin

On 08/10/2022 02:50, Tim Landscheidt wrote:

Bastien Guerry  wrote:


https://git.sr.ht/~bzg/worg/tree/master/item/nginx.conf


Thanks.  Assuming the relevant line is:

| rewrite HTML-export.html HTML-Export.html permanent;

looking at
http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#rewrite
suggests that this will match any URL that contains the
string "HTML-export.html", i. e. the regular expression is
not anchored anywhere.

So if that regular expression is intended to match on URLs
that end in "/HTML-export.html", an (untested) fix would be
something along the lines of:

| rewrite /HTML-export\.html$ HTML-Export.html permanent;


Bastien, I have not tried full configuration, but after a quick check I 
believe that it is a reasonable suggestion. It prevents 301 redirection 
from valid URLs like

https://orgmode.org/manual/Links-in-HTML-export.html
to
https://orgmode.org/manual/HTML-Export.html

In addition I would consider

location /manual/ {
}

around the rewrite directives to prevent unintentional false positives 
in e.g. worg.


P.S. Workarounds:
M-: (info "(org) Links in HTML Export")
https://orgmode.org/org.html#HTML-Export




Break lines in Query replace. Help.

2022-10-08 Thread Ypo

I want to make a "query replace", where

" - " should be substituted by

"breakline - "


How do I insert in a query replace a breakline?

"\\ - " seems to work only for LaTeX export.

"^J - " writes down ^J literally, and doesn't work as a break line.


Best regards



Markdown export is non-deterministic?

2022-10-08 Thread Matias Eyzaguirre
I’m using org-mode to generate a markdown README for a project that is
under version control. I’ve noticed that the anchor tags used for the
table of contents seem to be annoyingly random and change from export
to export. Is it possible to make the generated ids deterministic?

For example one invocation of ~org-md-export-to-markdown~ will give me
this:

#+begin_example
1.  [Introduction](#org8f0a2e0)
2.  [Roadmap](#orga3f4ca7)
#+end_example

While exporting a second time, even if there are no changes to the
file, will produce something different such as:

#+begin_example
1.  [Introduction](#org775f005)
2.  [Roadmap](#orgccee397)
#+end_example

While these identifiers are generally not visible to a reader, they
add noise to the version control diffs. I'm wondering if it's possible
to force the relevantrandom number generator to use a fixed seed or,
more ideally, have the ids be based on the section title (or its
hash)?

Thanks,
  Matias


[BUG] Erroneous link highlighting in src blocks (9.5.5-geeae6e)

2022-10-08 Thread Tim Loderhose
Hi,

In recent org, org-highlight-links including 'bracket' will hide content
with double brackets inside src blocks.
A vanilla config loading 9.5.5 org (I did this through straight.el) can 
reproduce this with a
minimal org file including just:

#+begin_src python
[[a]]
#+end_src

The brackets will be hidden.

I can only confirm that this does not happen with org 9.5.2 - I did not
check other versions in between, but know this has been the case for a
couple of weeks at least. I don't know much of the internals, but
thought that perhaps the issue was introduced around this commit (as this 
touches link folding and is not included in 9.5.2):
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=67275f4664ce00b5263c75398d78816e7dc2ffa6

Cheers,
Tim

Add 'backend' header arg to clojure code blocks

2022-10-08 Thread Chris Clark
This is my first attempt to contribute to org-mode; please let me know if
I'm doing something wrong.

Attached is a patch to incorporate some of the changes that were originally
presented by Ag Ibragimov here:
https://list.orgmode.org/m2y2oimdjf@gmail.com/. I've been using these
changes locally for a long time, and I'm hoping others might benefit!

For example:

   #+header: :backend babashka
   #+begin_src clojure
 (range 3)
   #+end_src

   #+RESULTS:
   : (0 1 2)


0001-ob-clojure.el-Add-a-backend-header-arg-to-clojure-co.patch
Description: Binary data


Re: Volunteering to maintain ob-asymptote.el within Org

2022-10-08 Thread Jarmo Hurri


Greetings Bastien.

Bastien  writes:

> Did you manage to get feedback from Luc, maintainer of ob-asymptote.el
> on org-contrib to decide who will maintain it, where to host it?  It
> seems like having ob-asymptote.el on GNU ELPA would be very good.

Not yet, but after my recent return from the land of the dead
(a.k.a. work), I just threw another email at Luc. I will let you know.

All the best,

Jarmo




Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'.

2022-10-08 Thread Christopher M. Miles

Ihor Radchenko  writes:

> "Christopher M. Miles"  writes:
>
>>> However, upon testing your patch, tests are still failing on my side.
>>> Can you please investigate?
>>
>> But If I use [M-x ert] to run the test 
>> "test-org-fold/org-fold-display-inline-images" is passed.
>> Here is the steps:
>> 1. [M-x load-file RET /path/to/org-mode/testing/org-test.el RET]
>> 2. [C-M-x] to evaluate the target test
>> 3. [M-x ert RET test-org-fold/org-fold-display-inline-images RET] to run 
>> this test
>>
>> I attached the uploaded screencast video link to prove it passed.
>>
>> https://share.cleanshot.com/tvUUoQ
>>
>> I tried many different other API functions to cycle or fold/unfold, but none
>> of them works under command "make test" or command
>> "make BTEST_RE="test-org-fold/org-fold-display-inline-images" test-dirty".
>>
>> I have nothing brain to think for this test now. Really can't figure out
>> why this image is not displayed as overlay. Can you help me to fix this test?
>
> The problem is with batch mode. `create-image' will return nil in batch
> mode and hence no overlays are ever created even though
> `org-display-inline-images' does get called.

I see, no wonder that failed for command "make test" but success in "[M-x ert]".

> I think that the best we can do in this situation is mocking
> `create-image' in batch mode to return non-nil using `cl-letf'.

I checked the `create-image' in image.el source code, don't know how to
mocking this. I have no experience and idea about this. I also searched
org testing. Have not found similar situations.

If you have idea how to write this test, I suggest pass this word to
you. What do you think?

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


signature.asc
Description: PGP signature


Org contacts documentation

2022-10-08 Thread Ypo

Hi Renato!


I had the same feeling. For suggestions or bugs I suppose a mail to this 
list with a copy to numbchild@gmail*.*com 
 
would do it.


All in all:

The documentation starts by /org-capture/, but forget about it:

The basic function that org-contracts does, is searching and show you 
the results.


Where does it search?

It searches in any headline that has a specific Property like: email or 
address or... You can customize these properties that define what 
headline is a contact (customize-group org-contacts).


And that's it!

Now, you can generate contacts by hand, or faster using org-capture, as 
documentation says.



Here it's org-contacts better explained by Ihor:

https://lists.gnu.org/archive/html/emacs-orgmode/2022-09/msg00162.html


Best regards


Re: Org contacts documentation

2022-10-08 Thread Jean Louis
* Renato Pontefice  [2022-10-08 00:26]:
> I'm unable to find documentation about this package. 

> Could someone tell me where I can find it?

Hyperbole link: {M-x find-library RET org-contacts RET M-x goto-line RET 28 RET}

;;; Commentary:

;; This file contains the code for managing your contacts into Org-mode.

;; To enter new contacts, you can use `org-capture' and a minimal template just 
like
;; this:

;; ("c" "Contacts" entry (file "~/Org/contacts.org")
;;  "* %(org-contacts-template-name)
;; :PROPERTIES:
;; :EMAIL: %(org-contacts-template-email)
;; :END:")))
;;
;; You can also use a complex template, for example:
;;
;; ("c" "Contacts" entry (file "~/Org/contacts.org")
;;  "* %(org-contacts-template-name)
;; :PROPERTIES:
;; :EMAIL: %(org-contacts-template-email)
;; :PHONE:
;; :ALIAS:
;; :NICKNAME:
;; :IGNORE:
;; :ICON:
;; :NOTE:
;; :ADDRESS:
;; :BIRTHDAY:
;; :END:")))

;; How to search?
;; - You can use [M-x org-contacts] command to search.
;;
;; - You can use `org-sparse-tree' [C-c / p] to filter based on a
;;   specific property. Or other matcher on `org-sparse-tree'.

That is about that. One is supposed to record contact in Org
properties so that Org facilities help in searching and "managing"
such contacts. In my opinion it gives headaches to user. You can as
well just write freely your contacts in Org headlines however you wish
and then search for it.

It asks you to add every single property yourself. Sorry, but I don't
like ideas that expand and develop human effort instead of shortening
it.

Inserting new contacts shall helpfully ask user:

- to which main group of people such person belongs?

- phone and e-mail

- address and minimum country

Then the contact information shall be in front of the user to be
edited quickly, such as:

- how was that contact found? By mailing list, personally, somebody
  recommended or introduced the contact, from yellow pages, etc.

 ID   376527
   Date created   "2022-10-08 08:17:27.964896+03"
  Date modified   "2022-10-08 08:19:56.069822+03"
 Prefix   nil
 First name   "Renato"
   Middle names   nil
   Last name (People List Name)   "Pontefice"
 Suffix   nil
   Hyperdocument Set #1   nil
  Profile Image   nil
ID Document   nil
Lead source   "Mailing List"
  Title   nil
 Department   nil
Date of birth or Begin Date   nil
   End date   nil
  Don't contact   nil
Description   nil
   Modified by username   "maddox"
Created by username   "maddox"
  Introduced by   "Jean Louis"
Other names   nil
 Tokens   nil
   Rank   0
Assigned to   nil
People type   "Individual Person"
 Reports to   nil
 Communication Language   nil
   SIC Code   nil
   Industry   nil
 Tag #1   nil
 Tag #2   nil
 Tag #3   nil
 Active   "Active"
  FROM Identity   "GNU.Support"
   Internal information   nil

Contact may have multiple relations:

 284576 Renato Pontefice   member   Org Users (Emacs)   
   
 284577 Renato Pontefice   member   Emacs Users 
   

think of brother, mother, sister, member, accomplice, etc.

In different relations person may have various titles, departments,
start and end of relation, etc.

and contact may have multiple assigned or related tasks, headings, Org
files, passwords, addresses, cash transactions, mailings received,
locations, conditions, reminders, reports, SMS, tags, etc.

Then the variety of views or summaries of such information shall
rather be presented inside of the Org file or any other markup. It
means storage for people management shall be separate from any kind of
markup including the editor, as that way it gets the capacity to help
human in variety of ways.

I can understand how people may tell that database is not needed. 

Some may tend towards RDBMS:

ndwarshuis/org-sql: SQL backend for Emacs Org-Mode:
https://github.com/ndwarshuis/org-sql

Which I find good. It is logical step forward. It also shows that all
the structured and ordered data could be managed by RBDMS:
https://raw.githubusercontent.com/ndwarshuis/org-sql/master/doc/erd/erd-postgres.png

It is yet another Org database wish. It is however good example of
design of ordered information.

Instead of using Org for management of contacts, I use Org for
presentation. That way Org file may remain clean without
properties. But it could also contain all the 

problem with the on-line manual

2022-10-08 Thread Giuseppe Lipari
Dear all,

first, let me thank the community for the hard work that makes org-mode
such a wonderful experience for me and many others !

I would like to point out that the following link in the org-mode on-line
manual is broken :

  https://orgmode.org/manual/Images-in-LaTeX-export.html

can someone please fix/restore it ?

Also : in recent versions of org-mode (I have the 9.5.3), it seems that
exporting figures in latex/beamer does not apply the ":float t" flag, and
does not center the figure. Can you please tell me the exporter option that
I have to set to enable floating figures ?

Best,
Giuseppe Lipari


Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'.

2022-10-08 Thread Ihor Radchenko
"Christopher M. Miles"  writes:

>> However, upon testing your patch, tests are still failing on my side.
>> Can you please investigate?
>
> But If I use [M-x ert] to run the test 
> "test-org-fold/org-fold-display-inline-images" is passed.
> Here is the steps:
> 1. [M-x load-file RET /path/to/org-mode/testing/org-test.el RET]
> 2. [C-M-x] to evaluate the target test
> 3. [M-x ert RET test-org-fold/org-fold-display-inline-images RET] to run this 
> test
>
> I attached the uploaded screencast video link to prove it passed.
>
> https://share.cleanshot.com/tvUUoQ
>
> I tried many different other API functions to cycle or fold/unfold, but none
> of them works under command "make test" or command
> "make BTEST_RE="test-org-fold/org-fold-display-inline-images" test-dirty".
>
> I have nothing brain to think for this test now. Really can't figure out
> why this image is not displayed as overlay. Can you help me to fix this test?

The problem is with batch mode. `create-image' will return nil in batch
mode and hence no overlays are ever created even though
`org-display-inline-images' does get called.

I think that the best we can do in this situation is mocking
`create-image' in batch mode to return non-nil using `cl-letf'.

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



Re: Update Org to MathJax 3

2022-10-08 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

> Hello smart people!
>
> With all the talk about Emacs 29, I figured we should update Org Mode to
> use MathJax 3, to catch up with the rest of the world.
>
> From the documentation (for MathJax 3.0 released in 2019):
>
>> Version 3.0 of MathJax is a complete rewrite of MathJax from the
>> ground up, and its usage and configuration is significantly different
>> from that of MathJax version 2.
>
> In practice, MathJax 3.2 renders mathematics faster and better, plus it
> significantly improves LaTeX support.  For instance, one can typeset
> calculus with the built-in (!) 'physics' package, like in LaTeX.
>
> More information on the recent progress (made in 2019-2021):
>
> https://docs.mathjax.org/en/latest/upgrading/whats-new-3.0.html
> https://docs.mathjax.org/en/latest/upgrading/whats-new-3.1.html
> https://docs.mathjax.org/en/latest/upgrading/whats-new-3.2.html

Thanks a lot for this patch!

> See the attached [working, but WIP] patch.
>
> My question for you:
>
> How do we change the 'org-html-mathjax-options'?
>
> - 'scale' has now the value in [0, 1] and not in [0, 100]
> - 'scale' should exist as a number and not string
> - 'font' did not make it to MathJax 3 [*]
> - 'linebreaks' did not make it to MathJax 3 [*]
> - 'autonumber' has the values in lowercase now
> - 'autonumber' became 'tags' in MathJax terminology
>
> [*] coming in MathJax 4, currently in alpha
>
> How does Org mode approach these kind of breaking changes?

The general rule is "do not break working Org files" or backwards
compatibility in other words. See
https://bzg.fr/en/the-software-maintainers-pledge/

In particular, it means that the existing #+HTML_MATHJAX options should
not be broken when a user uses default value of
org-html-mathjax-options and org-html-mathjax-template.

WRT this patch, we can employ two different approaches:
1. Keep old Mathjax as default, but add MathJax 3 to customization
   options and parse the other options depending on the MathJax version
   in the :path.
2. Change the defaults to MathJax 3. Then, we will also need to make
   sure that incompatible option syntax in historic Org files does not
   break the export.

The option (1) is easy. We just need to choose two different sets of
options in custom interface for org-html-mathjax-options and
org-html-mathjax-template. The in-buffer options will then be parsed
depending on the :path.

The option (2) will make Org export nicer by default, but more tricky to
implement.

In (2), all the aspects of (1) should still be retained. But in
addition, you will also need to detect option values incompatible with
MathJax 3 during export. If there is mismatch between the option format
and the MathJax version, (a) try to convert the options, which should be
possible e.g. for scale and autonumber. (b) if conversion is not
possible (say, the options contain font setting), throw a warning and
fallback to compatible MathJax version.

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



Re: Propertize some navigational keybindings

2022-10-08 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

> Howdy, howdy!
>
> Please review the attached patch that propertizes (i.e. adds style to)
> the navigational keybindings displayed in the header of the Org Export
> dispatch UI.

Thanks!

> + (setq cursor-type nil)
> +(setq header-line-format
> +  (apply 'format
> + (cons "Use %s, %s, %s, or %s to navigate."
> +   (mapcar (lambda (key)
> + (propertize key 'face 
> 'help-key-binding))
> +   (list "SPC" "DEL" "C-n" "C-p")

I think that the most thorough way to add this feature is following what
`help--key-description-fontified' does (we should not call this internal
function though):

(defun help--key-description-fontified (keys  prefix)
  "Like `key-description' but add face for \"*Help*\" buffers.
KEYS is the return value of `(where-is-internal \\='foo-cmd nil t)'.
Return nil if KEYS is nil."
  (when keys
;; We add both the `font-lock-face' and `face' properties here, as this
;; seems to be the only way to get this to work reliably in any
;; buffer.
(propertize (key-description keys prefix)
'font-lock-face 'help-key-binding
'face 'help-key-binding)))

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



Re: [HELP] Fwd: Org format as a new standard source format for GNU manuals

2022-10-08 Thread Ihor Radchenko
Richard Stallman  writes:

>   > For some context, in order to support specialized syntax for manuals, we
>   > may first need to implement the discussed special blocks export and
>   > inline special blocks:
>   > 1. https://list.orgmode.org/orgmode/87y1yr9gbl@gmail.com/
>   > 2. https://list.orgmode.org/orgmode/87edzqv4ha.fsf@localhost/
>
>   > The above links aim to introduce export functionality that we now have
>   > for links to special blocks and new custom markup elements. I am
>   > referring to
>   > 1. Ability to create new custom element types programmatically 
>   > 2. Ability to define how to :export the custom element types
>
> I'm not sure of the meaning of some of those words.  Does this mean
> that people are implementing those distinctions in Org mode?  Or does
> it mean someone has proposed to implement them in Org mode but not yet
> started actually writing it?

The latter. We currently need a new syntax element that will allow all
the things available in Texinfo markup syntax.

We have decided that we do need such new syntax. We are discussing how
the new syntax will look like. We will implement the syntax in future.
Once implemented, the new syntax will open the road to add Texinfo
markup structures into Org export backends.

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



Re: Org contacts documentation

2022-10-08 Thread Ihor Radchenko
Renato Pontefice  writes:

> I'm unable to find documentation about this package. 
> Could someone tell me where I can find it?
> I think this package is enough ok for me (I don’t need a DB to store just few 
> people), but I’m unable to start using it, because of lack of documentation. 
> Is there someone that could show me where I can find it? Or tell me the basic 
> function to use this package.

AFAIR, the package has limited documentation. All at the top of its
source code.

Do note that org-contacts is now maintained at a separate repository:
https://repo.or.cz/org-contacts.git/blob/HEAD:/org-contacts.el

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



Re: Some links in online manual do not work

2022-10-08 Thread Ihor Radchenko
Tim Landscheidt  writes:

> However I do not understand the need for these rewrites and
> fixing the underlying issue is probably worthwhile.

See the discussion in https://list.orgmode.org/orgmode/m2sfni5xcb@me.com/

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



Re: [BUG] org-beamer :BEAMER_ACT: ignored on columns

2022-10-08 Thread Ihor Radchenko
"Fraga, Eric"  writes:

> On Thursday,  6 Oct 2022 at 08:01, Fraga, Eric wrote:
>> On Thursday,  6 Oct 2022 at 11:06, Ihor Radchenko wrote:
>>> Is there any reason why you only allow actions for "column" environment
>>> specifically? What about other environments?
>
> I've removed the check (not only for the new actions aspect but also for
> the options bit) and beamer export seems to work just fine.  But with
> minimal testing so testing by others would be welcome.
>
> Updated patch attached.

I am reading the whole patched function now, and I feel that something is
not right.

Note the complex processing of actions below the following comment

  ;; If BEAMER_act property has its value enclosed in square
  ;; brackets, it is a default overlay specification and
  ;; overlay specification is empty.  Otherwise, it is an
  ;; overlay specification and the default one is nil.

This patch certainly adds code duplication and might also miss some
scenarios considered in the environments from
org-beamer-environments-default.

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



Re: [PATCH] lisp/org-agenda.el: Fix filter preset problem for sticky agenda

2022-10-08 Thread Liu Hui


Ihor Radchenko  writes:

> Applied onto main with minor amendments (mostly added double space " "
> between sentences in docstrings and the commit message).
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=edf5afc1d833a814cf97e814194b83b82f26a294

Thanks!

> Also, while we are at it, may you take a look at
> https://list.orgmode.org/paxpr06mb7760f3a02d140e7de2baaec6c6...@paxpr06mb7760.eurprd06.prod.outlook.com/?
> AFAIR, it is caused by a similar symbol property approach employed in
> different place in org-agenda.el.

The issue seems related to other problem about the agenda restriction
rather than the use of symbol property. I will reply in other threads.