PROPOSAL: Bind `org-fold-hide-subtree' by default in Org Mode.

2023-02-21 Thread Karl Fogel
Hey everyone, is there a reason we don't bind 
`org-fold-hide-subtree' by default in Org Mode?


I bind it to C- and now find this to be one of the most 
useful keybindings in Org Mode.  I suspect my workflow is pretty 
typical.


The use case is simple:

When reading material within a certain heading level, one often 
decides that one is done with that section (and therefore done 
with everything inside it -- including anything at deeper levels 
of nesting).  So one just folds the entire subtree around point 
and moves on, without changing the visibility of any of the 
sibling-or-higher subtrees around it (because often the next place 
one is going is one of them).


This is one of my most frequent actions in Org Mode.  In fact, I 
think it might be the most common Org Mode command I run.


It seems like an obvious thing have bound to a key, and yet Org 
Mode doesn't bind it by default.  Should we?


(I put it on "C-" because that's normally unbound in Org 
Mode, and because so many of the Org Mode cycling commands involve 
modified tab already.  But I don't feel strongly about the 
particular key, as long as it's fast to type; maybe there's a 
better key available.)


I looked for prior discussion about this in the archives and 
didn't find anything: 
https://list.orgmode.org/?q=org-fold-hide-subtree


Best regards,
-Karl



Re: Re: Is there a way of putting the biblatex options in the org file?

2023-02-21 Thread Pedro Andres Aranda Gutierrez
Hi,

>> This does a lot of 'magic'
>> #+bibliography: python3.bib
>> #+cite_export: biblatex

> just add e.g.:

> #+LATEX_HEADER:
>
\usepackage[isbn=false,url=false,doi=false,eprint=false,related=false]{biblatex}

> Cheers,
> Reza

That's what I'm trying to avoid... and do right now
You have the `pure org` header lines above and then you need
to write LaTeX. I would rather have something like

#+cite_export_options: blah blah

I'll give it a try to see what I come up with when I have a couple of
cycles.

Best, /PA
-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet


Re: [POLL] Naming of "export features"

2023-02-21 Thread Timothy
Hi Arne,

Thanks for your comments.

> From the four, “contexts” sounds the most intimidating to me.
>
> Snippets would conflict in meaning with yasnippet.
>
> It also looks to me as if features may be too generic.
>
> If I understand it correctly, this is conditional enrichment.
>
> Maybe something like export adaption?

I hadn’t thought of applying the term “enrichment”. That or adaptation could be
 a good fit. I think I like the sound of “enriching the export”, and I could
 probably also be sold on “export adaptation” / “adaptive export”.

All the best,
Timothy

-- 
Timothy (‘tecosaur’/‘TEC’), Org mode contributor.
Learn more about Org mode at .
Support Org development at ,
or support my work at .


Re: [POLL] Naming of "export features"

2023-02-21 Thread Dr. Arne Babenhauserheide

Timothy  writes:

> Both components are crucial to the overall system, however if anything I view
> the latter as more important and so am not a fan of describing this system as
> “export contexts”. That said, I am open to considering alternatives.
>
> Here is a list of terms which I’d feel comfortable applying to the system:
> ⁃ export features
> ⁃ export capabilities
> ⁃ export snippets

From the four, "contexts" sounds the most intimidating to me.

Snippets would conflict in meaning with yasnippet.

It also looks to me as if features may be too generic.

If I understand it correctly, this is conditional enrichment.

Maybe something like export adaption?

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


signature.asc
Description: PGP signature


[BUG] updating existing org date with time always sets time to 0:00 [9.6.1 (release_9.6.1-262-gd94f40 @ /home/dortmann/src/git-org-mode/lisp/)]

2023-02-21 Thread Daniel Ortmann



Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See

https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


file org-plain-date-to-date-time.org has:

* plain date
C-c ! gives:
[2023-02-21 Tue]
* updating plain date
C-c ! followed by C-u C-! gives:
[2023-02-21 Tue 00:00]
* date-time
C-u C-c ! gives:
[2023-02-21 Tue 14:13]

I expected that updating an existing date with C-u C-c ! would produce
the same result as creating a new date-time.

Emacs : GNU Emacs 30.0.50 (build 10, x86_64-pc-linux-gnu, GTK+ Version 
3.22.30, cairo version 1.15.12)

of 2023-02-21
Package: Org mode version 9.6.1 (release_9.6.1-262-gd94f40 @ 
/home/dortmann/src/git-org-mode/lisp/)





Re: bug#59882: Multiple versions of Org in load-path problem

2023-02-21 Thread Bhavin Gandhi
On Fri, 3 Feb 2023 at 16:35, Ihor Radchenko  wrote:
>
> Max Nikulin  writes:
>
> > On 27/12/2022 16:47, Ihor Radchenko wrote:
> >> Can you then try to test using Emacs 28?
> >> The main question if whether this has been fixed in newer Emacs releases
> >> or it is also something to do with OS environment.
> >
> > I see quite the same issue with Emacs-28.2 in Debian testing. Compile
> > buffer displays a bit more warnings and usual `org-assert-version'
> > warnings and errors are present as well. It might have another level of
> > complexity due to .eln files. I am unsure what happens with calls to
> > undefined macros.
>
> I asked people around to test using Debian, and we do have a
> confirmation that Debian + Emacs 27 and Debian + Emacs 28 do trigger the
> error.
>
> I also installed Debian 11.6.0 on virtual machine, and I was also able to
> trigger the error, following the provided steps, using the Emacs 27
> installed via apt-get.
>
> The problem seems to be real and appears to be some combination of
> Debian/Ubuntu + Emacs.

I'm able to reproduce this on Fedora 37, Emacs 28.2.

In Fedora we have:
- /usr/share/emacs/site-lisp/site-start.el (has code to load .el and .elc
from /usr/share/emacs/site-lisp/site-start.d).
- /usr/share/emacs/site-lisp/default.el (sets smime-CA-directory).

There are other patches but most of them are backports and seem to be
unrelated to package.el:
https://src.fedoraproject.org/rpms/emacs/tree/rawhide

Steps using with-emacs.sh (https://github.com/alphapapa/with-emacs.sh):

1. mkdir /tmp/emacs-59882
2. with-emacs.sh -d /tmp/emacs-59882 -- -l org
3. M-x package-list-packages
4. Install Org 9.6.1 from ELPA
5. When the package is compiled you get this error at the end (it is
there multiple times)
   ox.el:82:1: Error: Symbol’s function definition is void: org-assert-version
6. Close Emacs and start it again with
   with-emacs.sh -d /tmp/emacs-59882 -- -l org
7. I get byte-code: Invalid function: org-assert-version

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



Re: Link type in org-mode, but with org-roam ?

2023-02-21 Thread Cletip Cletip
>
> But I am very willing to help you install it and try it all out and
> make it workable on your computer, in one on one chat or by e-mail,
> that will work well.


Yes, I'd be very happy to try it. Contact me by email when you have time. I
am available on weekends. I would definitely prefer a call to be able to
exchange easily, via the application you want.

> The problem and the great weakness of such a system is that I have
> > to define the queryable information in advance.


> No, you need not think of that. Do you use database?

I am not thinking in advance about "queryable" information. I am
> thinking of structure, or types, and do not worry of future. All
> types, columns, anything is automatically capable to be queried.


I was talking about my system which was made with org-roam, so the
information stored in the notes is in plain text. But, to make them
queryable, I have to add "metadata" as said before with key-value.
So I'm using a database, but I don't want to bother thinking about how I
can add new information to my system. You, you need to think about "what
describes this information?" If it's someone, you create a new table (not
sure if this is this term to use) to hold that knowledge.
I don't want to think about that, I just want to put the information in and
find it without thinking about tables.

Because of the design of tables, and conditional correct entries into
> the database, it becomes very easy to find for example "POST BOX"
> address of all people in Mwanza city.


Here, everything is queryable, because you have already thought of all the
possible cases that could happen. In my system, I decided to do the
opposite: why think of a particular case if I'm not even sure I'm doing it?

But our goals are not the same, you have to have a solid system for several
people, I do something much more personal. So, it's ok.

> Whereas you may have the opposite problem: every piece of
> > information is queryable, but a new piece of information takes a
> > long time to put away.


> I do not understand "put away", is it to "remove it"? I do not
> understand the problem.


Sorry bad translation.
I wanted to say that adding a new type of information can be time
consuming: you have to add the table, and above all check that another
table does not already exist to do the same thing.
So you need excellent documentation, hoping that the system itself doesn't
become too "cluttered" for the user.

> You can't just put information down like that (maybe I am wrong,
> > maybe you can. But from what I understand, no). And that's the
> > dilemma: either you make something extremely rigid, but "queryable",
> > i.e. you can query the system itself with requests.

Making database based structure of objects is to many degrees way more
> beneficial than having it without structure.


For your purpose, yes. For mine, no. I think that every thing that has to
have a special presentation / type in the database is an exception: the
user has to think / look that, if he wants to add a contact, he has to look
for the type "contact".
I would like my system to detect by itself that when I give a node/heading
org-mode as title "A-name A-forname", it understands by itself that it is a
contact. And if I put a phone number underneath, I can just ask him "give
me the phone number of X", and he gives it to me correctly.

I repeat because I don't want to offend you: we don't have the same goals,
so it is normal that our methods are different.
On the other hand, I would very much like to test your method, it intrigues
and interests me a lot.


> > Or we do something extremely flexible, exactly like a big org-mode
> > file where we just put the information, and the user can use his
> > method (grep for example).

For single user that may be fine. For collaborative work, multi-user
> access is not, or sharing of information, it is not. That is why Org
> development strive to provide more and more structure, something I
> said, they try to make it like a database, but because there is no
> structure, it becomes the never ending story of milions of bugs.


I agree with you, although I don't know if the goal of the org-mode
developers is to do this.



> In my work I use meta level. First I am liberated from Org mode, or
> any kind of mode. And I like flexibility to mix various markups. I can
> use universal hyperlinks that convert themselves into necessary
> markup. I don't like being dependent on some "mode".


> If markup is Org, hyperlink will become Org hyperlink, if markup is
> Markdown, hyperlink will become Markdown link, if it is text, it will
> be shown in text. Why do I need to record 3 versions of same document,
> better one, which can be just represented in different way.


After that, it's the same for org-mode, it can export in a lot of formats,
so in the end you're just adding an extra layer of abstraction to export to
org-mode.

But I see the idea of not depending on org-mode anymore

Maybe you wish to say how 

[POLL] Naming of "export features"

2023-02-21 Thread Timothy
Hi All,

In  progfolio/no-wayman
suggested renaming “export features” to “export contexts”. The difficultly
mainly lies with the fact that we are trying to name two very distinct
components that together provide the functionality I have called “export
features” (see the attached diagram).

To give a recap on the main points raised to/by me so far:
⁃ Doing things based on the state of a document can be described as acting based
  on the “context” of the export, and in this way “export contexts” is a
  reasonable description.
⁃ Providing capabilities via snippets can be framed as akin to dynamically
  gaining a feature.

Both components are crucial to the overall system, however if anything I view
the latter as more important and so am not a fan of describing this system as
“export contexts”. That said, I am open to considering alternatives.

Here is a list of terms which I’d feel comfortable applying to the system:
⁃ export features
⁃ export capabilities
⁃ export snippets

All are imperfect in different ways, and so any choice is a compromise. Let me
know if you have any thoughts.

All the best,
Timothy

-- 
Timothy (‘tecosaur’/‘TEC’), Org mode contributor.
Learn more about Org mode at .
Support Org development at ,
or support my work at .


Re: bug#59882: Multiple versions of Org in load-path problem

2023-02-21 Thread Eli Zaretskii
> Cc: emacs-orgmode@gnu.org, 59...@debbugs.gnu.org
> From: Richard Stallman 
> Date: Tue, 21 Feb 2023 00:22:04 -0500
> 
>   > >> I don't run Debian or Ubuntu anymore. However, I do recall that debian
>   > >> does use a modified Emacs startup which is not part of the standard
>   > >> Emacs distribution. They do this to enable the ability to have multiple
>   > >> versions of Emacs installed at the same time.
> 
> Would we like to add a feature like that to Emacs?
> I don't know how much work it would be, but I think
> it would be a desirable change if it is easy.

I'm not sure I understand: feature like what?  If you are talking
about having several Emacs versions installed on the same system, then
I think we already support that: I use that all the time.  That's why
we install various files in version-specific directories.

If you mean something else, please elaborate.  (The bug discussion is
very long, and the above quote is from a tangent, so I'm not sure it's
worth my while reading all the discussion from the beginning trying to
understand what is being alluded to here.)



Re: feature request: easy embedding of images

2023-02-21 Thread Daniel Fleischer
Jude DaShiell [2023-02-20 Mon 16:24] wrote:

> To help accessibility it would be useful when an image was dragged into
> org-mode if the user got prompted for an image description that gets
> associated with the image in org-mode.  Some images are art work and those
> should get alt="" tags if a user fails to provide a description but only
> after asking if this image is art work or something that needs a
> description.  If a description is provided that should go between the
> quotes in the alt="" tag.

In org-download you can specify html attributes for the attached image,
see link

https://github.com/abo-abo/org-download/blob/master/org-download.el#L178-L184

It's not a prompt, it's a template and you can fill the alt description.

-- 
Daniel Fleischer



Re: org-roam: how to have links un-opened

2023-02-21 Thread General discussions about Org-mode.


"Fraga, Eric"  writes:

> Hello all,
>
> I'm using org-roam for notes and it's working very nicely.  There is
> just one thing I would like to adjust.  The org-roam buffer has all
> backlink entries "open" and I would like the default view to be with the
> individual links listed but not opened.  I assume I can set something in
> the org-roam-mode-hook but I am not sure what to set.  I also assume
> that this might be magit related (as it uses the same framework).
>
> Any suggestions?
>
> Thank you,
> eric

Not sure if you realized, but org-roam [1] is a separate project from
org.  Maybe you would have better luck posting in their bugtracker
instead?

[1] https://github.com/org-roam/org-roam

--
Best,


RY



org-roam: how to have links un-opened

2023-02-21 Thread Fraga, Eric
Hello all,

I'm using org-roam for notes and it's working very nicely.  There is
just one thing I would like to adjust.  The org-roam buffer has all
backlink entries "open" and I would like the default view to be with the
individual links listed but not opened.  I assume I can set something in
the org-roam-mode-hook but I am not sure what to set.  I also assume
that this might be magit related (as it uses the same framework).

Any suggestions?

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6-204-g2f7052 in Emacs 30.0.50


Re: Use custom preamble from tex file for latex export

2023-02-21 Thread Fraga, Eric
I'm travelling so will keep this short.

A few things potentially wrong with your setup:

1. the elisp src block won't be executed automatically.

2. I do not know if the BIND statements are interpreted when included
   but I imagine they are.
   
Sometimes it's better to use the base Emacs features (e.g. file local
variables) than try to shoehorn everything into org.

-- 
: Eric S Fraga, with org release_9.6.1-224-g8ae8a8 in Emacs 30.0.50


Re: Use custom preamble from tex file for latex export

2023-02-21 Thread reza
> Yes, should be possible.  Check out info manual: (emacs) File Variables

I did manage to patch together a working example, but when I tried to 
move into an setupfile it doesn't work anymore. Is this intended or did 
I do something wrong?

template.org

# -*- org-export-allow-bind-keywords: t; -*-
#+BIND: org-latex-classes (my-latex-classes)
#+BIND: org-latex-hyperref-template nil
#+LATEX_CLASS: from-file
#+BEGIN_SRC emacs-lisp :exports results :results none
   (defun my-latex-classes
 '(("from-file"
"\\RequirePackage{preamble}\n[NO-DEFAULT-PACKAGES]"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"
#+END_SRC

report.org

# -*- org-export-allow-bind-keywords: t; -*-
#+title: A dummy report
#+subtitle: This is a dummy report
#+setupfile: ../template.org

* Title

asdasd

This gives me an error, unknown latex class "from-file" and checking the 
variable "org-latex-classes" with C-h v looks like it was not set.

Thanks for any help.

Cheers,
Reza


OpenPGP_0xC375C6AF05125C52.asc
Description: application/pgp-keys


OpenPGP_signature
Description: PGP signature


Re: Unicode problem with export of literal contents

2023-02-21 Thread Jens Lechtenboerger
On 2023-02-20, Bruno Barbier wrote:

> Jens Lechtenboerger  writes:
>
>> On 2023-02-20, Bruno Barbier wrote:
>>
>> However, if I use insert-file-contents-literally with a unicode
>> file, I do *not* have to set the coding-system-for-write.  This just
>> works:
>>
>>(with-temp-buffer
>>   (insert-file-contents-literally "~/unicode.org")
>>   (secure-hash 'md5 (current-buffer)))
>
> Humm. Emacs is amazing: it managed to guess the right encoding, from the
> buffer context, probably...
>
> But, what you are giving to 'org-export-string-as' is not the buffer,
> it's a string. So, let's try the same without using an org function:
>
>  (with-temp-buffer
>(insert (with-temp-buffer
>  (insert-file-contents-literally "~/unicode.org")
>  (buffer-string)))
>(secure-hash 'md5 (current-buffer)))
>
> And, that fails, requesting an encoding.

Thank you for this example.

>> In the context of Org export, secure-hash seems to require a coding
>> system.  Why?
>
> I'm not an expert, so, you'll need to confirm with other sources.  But
> secure-hash requires an encoding in all cases, to compute the hash of
> some text, because it needs the array of bytes that represents that text
> to compute its hash.
>
> I don't see any bug in org, and, I don't see any bug in secure-hash either.
>
> You literally shoud stop using "literally" ;-)

Indeed.  

> And, you might want to read:
>(info "(elisp) Non-ASCII Characters")

The first section was already helpful, thanks!  (I still need to
read more of this...)

Best wishes
Jens


smime.p7s
Description: S/MIME cryptographic signature


Re: Is there a way of putting the biblatex options in the org file?

2023-02-21 Thread reza
> This does a lot of 'magic'
> #+bibliography: python3.bib
> #+cite_export: biblatex

just add e.g.:

#+LATEX_HEADER: 
\usepackage[isbn=false,url=false,doi=false,eprint=false,related=false]{biblatex}

Cheers,
Reza



OpenPGP_0xC375C6AF05125C52.asc
Description: application/pgp-keys


OpenPGP_signature
Description: PGP signature


Is there a way of putting the biblatex options in the org file?

2023-02-21 Thread Pedro Andres Aranda Gutierrez
Hi,
I've been reading through the code and the docs and I don't find any way to
add the biblatex options in my org file.

This does a lot of 'magic'
#+bibliography: python3.bib
#+cite_export: biblatex

But I still depend on some settings coming from .emacs.d/init.el to set the
options for \usepackage{biblatex}

My guess is that including them in the org-file would make it more
"shareable", and that would make using org even more attractive.

Thx,/PA
-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet