Bug: Function org-heading-components is not resilient [9.4.3 (9.4.3-elpa @ /home/data1/protected/.emacs.d/elpa/org-20201216/)]

2022-12-16 Thread Jean Louis


In my opinion the function: (org-heading-components) shall not error,
no matter if it is called outside of the heading, it could still
return nil values if it is outside of the header.

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  looking-at(nil)
  org-heading-components()
  eval((org-heading-components) nil)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)



Emacs  : GNU Emacs 30.0.50 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo 
version 1.17.6, Xaw3d scroll bars)
 of 2022-12-16
Package: Org mode version 9.4.3 (9.4.3-elpa @ 
/home/data1/protected/.emacs.d/elpa/org-20201216/)

--
Jean

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

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




Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language)

2022-12-16 Thread Tom Gillespie
Hi Ihor,
   Chiming in here with a slight variant on what
others have said. Best!
Tom

I don't think this should be handled at the syntactic
layer at all. The empty string block language should
be syntactically valid with any special behavior
needed being handled later.

Linters could treat it as a warning/error though,
but the parsing is made significantly easier if
the empty string is present allowing the grammar
to be fully closed and regular.

Thus, I don't think we need to make this a syntactic
error or pun a src block without a lang to another type.

I think we can add an implementation for when the
block language is the empty string. This keeps
the grammar regular by removing a special case.

I assume that internally the empty string block lang
would mostly call the example block codepaths,
except that it should probably issue a warning or fail
if someone tries to org-src-edit the block so that we
can alert them that they are missing the lang.

Treating src blocks missing a lang as paragraphs is
incorrect because according to the syntax spec they
are syntactically still blocks (greater or lesser depending
on your inclinations).

I think the general principle we want to follow here is
that a block (or any entity in general) should not lose
its type because some part of its syntax is malformed
(I have made similar arguments about property drawers).

That is, if something starts with #+begin_NAME stuff
and there is a corresponding #+end_NAME, then it
is a block.

The choice of how a src block without a lang should
behave is a bit more complex as there are multiple
consumers of src blocks that make different assumptions.

As mentioned above. I think that if a block is missing the lang
we could think of it instead as the null language. If we have the
:var language because someone has other contents on the line
they have a well formed src block, but will get a different error
because there is currently no known language ":var".


Re: [BUG] exporting links with underscores

2022-12-16 Thread Mike Gauland

On 17/12/22 11:32, Leo Butler wrote:

Org version is 9.5.2; emacs version is 27.1.

The manual does not indicate that underscores need to be escaped in
links (and they can't be, as far as I can tell). The latex and html
exporters interpret them as the start of a subscript.

Leo

By default underscore is treated that way--see the "Subscripts and 
Superscripts" section of the manual 
(https://orgmode.org/manual/Subscripts-and-Superscripts.html).


Set the '^' option to 'nil' to get the behaviour you're after:

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

If you want a subscript anywhere, you can get that by using curly braces 
(e.g., ex_{ample}).





Re: [OT] org and diff

2022-12-16 Thread Samuel Wales
marcin> One question I'd ask is: how important a legible diff is to
you?  I keep my Org files in Git, too, but if /I/ know what was
changed, I just don't care about diff going nuts and I treat it as
(more or less) Git's internal implementation detail.

for org, i mostly use git for reviewing changes.  it is only one step
more sophisticated than saving old and diffing.

i have lots of tools for improving diff, but this intermingling
problem is a showstopper in some cases, like right now where i have
spent months trying to make sense of months of changes to org files
that have not been entered into git.  i.e. i did not enter every few
days as normal.  i find reviewing changes to be valuable.  every once
in a while i discover data corruption or something that i forgot etc.

i wonder if diff, or difftastic, could be taught or postprocessed to
do merely one thing: try to preserve stuff between "^\\*+ ".  that is
probably too optimistic, but imagine a --preserve-between option.


On 11/21/22, Samuel Wales  wrote:
> incidentally, if you want empty hunk headers, you can do this at least
> in my version of git:
>
>   xfuncname = " "
>
> but idk why it works and i had had it commented out.
>
>
> On 11/21/22, Samuel Wales  wrote:
>> p.s.  hunk header munging does not unmingle [i.e. group changes by org
>> header in magit status buffer diffs] :(.  but it is true that what i
>> want is some kind of preference given by magit to org entries as
>> demarcated by org headings.
>>
>> idk if what i want is in principle possible or not in standard diff or
>> git diff.  that is, idk if they could be patched to accept an arg that
>> would allow you to specify that org entries should be preserved if
>> possible or something like that.
>>
>> great to know difftastic can in principle be coded to do what i want,
>> however.  so maybe soetime you could tell git to use.
>>
>> org hunk headers are rather nice looking.  on the other hand, it gets
>> the previous header, even if not the parent header.  i think this is
>> why i had the impression that git was in principle incapable of org
>> hunk header text of the type i wanted.  but hunk header text is not
>> something i use a lot.  it's rather nice looking, but in some cases i
>> prefer empty hunk headers.
>>
>> On 11/12/22, Samuel Wales  wrote:
>>> i have a very old version of Magit, for reasons I won't get into.
>>> Fancier diff settings might be differnet or not available.
>>>
>>> But something drives me crazy.  Probably not too Org-related, but it
>>> might be.  I just want to know why, is all.
>>>
>>> I have a 24k line org file, and it's not that complex wrt levels.  2
>>> or 3 levels with odd stars only.  various types of content.
>>>
>>> someplace in it, is an entry with a  234-item plain list.  if i try to
>>> move this entry, and make no other changes, diff goes insane.  if i
>>> try to refile this entry to a different org file, diff similarly goes
>>> insane, with the - part.  only that change.
>>>
>>> ok, what it does is, intersperse or mingle entries.  so suppose i want
>>> to stage this one tiny little change, namely moving one entry [the one
>>> with the large plain list] to a different location in the same file.
>>> even if i move it really distantly.
>>>
>>> i.e. i want to put the - and the + of the move to the staging area in
>>> magit.  unstaged changes should then not have this file in it at all
>>> after the staging operations.
>>>
>>> then, basically, staged changes will have this move.
>>>
>>> as a user, i want diff to make this two hunks, a big - and a big +.
>>> but diff mingles parts of another entry or entries with this list, so
>>> that it is scattered all over the diff.  to get the result i want
>>> requires tons of intra-hunk stage operations.  at best.
>>>
>>> so, what aspect of diff or org is triggering this kind of behavior?
>>> what is it that diff needs to understand about org, or what minimality
>>> etc. settings does it want to create a better diff?
>>>
>>> i know org has lots of similar lines [e.g. planning headers with
>>> scheduled dates that are identical].  but still, this is a nontrivial
>>> size org file, with no other changes that i made. diff's insanity
>>> still occurs even if i move the entry distantly.
>>>
>>> i am of course aware of histogram, patience, etc. and that git diff
>>> has a few experimental choices of options.  also long ago i read diff
>>> manual with its discussion of end of file beg of file and minimality
>>> with --minimal and all that stuff.
>>>
>>> however, here, though, i am mostly interested in specifically what
>>> diff's, or git diff's, or magit's, /deal/ is.  in /this/ case.
>>>
>>> where does it get off doing that?  everything else is the same, so why
>>> is it keying on the wrong thing?
>>>
>>> does it think i made the changes as it presents them, or does it go
>>> for some other goal like minimality or speed and not really care what
>>> i did?  is it because it e.g. ignores end or beg of file or so?  or is

[BUG] exporting links with underscores

2022-12-16 Thread Leo Butler
Org version is 9.5.2; emacs version is 27.1.

The manual does not indicate that underscores need to be escaped in
links (and they can't be, as far as I can tell). The latex and html
exporters interpret them as the start of a subscript.

Leo

#+AUTHOR: Leo Butler
#+TITLE: Bug in processing underscores in links
#+OPTIONS: toc:nil num:nil

* Description

The link =[[mailto:ex_am...@ex.com][ex_ample]]= is expected to export
to =\href{mailto:ex_am...@ex.com}{ex_ample}= but instead, we get
[[mailto:ex_am...@ex.com][ex_ample]] exports to (in latex): =\href{mailto:ex\_am...@ex.com}{ex\textsubscript{ample}}=

Note that a similar issue is seen with the HTML export.

* Reproduction

Export this file: =C-c C-e l p=.


Re: orgmode 9.6

2022-12-16 Thread Paul Schlesinger
Just to remind you the encoding warning does not occur with the same files
using the emacs 28.1 with orgmode 9.52 included.  The characters that
trigger the warning are ones that are not found in UTF-8 and since I do a
lot of editing of web documents and do not correct them until final
output.  orgmode has ignored them in the past (BEFORE 9.6) and  I am happy
with that as long as the files do not become corrupted.  Can one set the
encoding in orgmode as not having to configure file in real time would be
helpful.
tx Paul
Paul H. Schlesinger MD, PhD
Washington University School of Medicine
Don't let your models of reality become confused with reality itself.


On Fri, Dec 16, 2022 at 12:48 AM Jean Louis  wrote:

> * Paul Schlesinger  [2022-12-16 02:04]:
> > started getting an encoding warning when i would tell emacs I wanted to
> > quit. The warning indicated the offending characters but they were in an
> > unformatted buffer on the screen and I became fatigued trying to correct
> > them.
>
> That will happen not only in the Org mode.
>
> What do you see on screen, which are the problematic characters?
>
>
>
> --
> Jean
>
> Take action in Free Software Foundation campaigns:
> https://www.fsf.org/campaigns
>
> In support of Richard M. Stallman
> https://stallmansupport.org/
>


Re: Bash results broken?

2022-12-16 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

> Reproduction steps:
>
> #+BEGIN_SRC bash :results list
> echo 1
> echo 2
> echo 3
> #+END_SRC
> ...

Confirmed.

It appears to be present at least since Org shipped with Emacs 27.
Wondering how nobody noticed...
We really need more tests.

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



Bash results broken?

2022-12-16 Thread Rudolf Adamkovič
Reproduction steps:

#+BEGIN_SRC bash :results list
echo 1
echo 2
echo 3
#+END_SRC

Actual:

#+RESULTS:
- (1)
- (2)
- (3)

Expected:

#+RESULTS:
- 1
- 2
- 3

Rudy
-- 
"Logic is a science of the necessary laws of thought, without which no
employment of the understanding and the reason takes place."
-- Immanuel Kant, 1785

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



Re: Completely hide properties drawer in 9.6

2022-12-16 Thread Ihor Radchenko
Jean Louis  writes:

> Message was on topic as it provided design directions on how to avoid
> properties, without technical actual program.
>
> Numerous people will express numerous directions on how specific
> problem may be solved. 
>
> Take the life as it is.

I agree that your message is on topic. Just, as I pointed, I feel like
it is a bit too broad to be useful. I may be wrong, of course.

> I don't appreciate this kind of slap and wining about nothing!

It is not "nothing" for me. I'd prefer to have helpful discussion
happening in Org ML. Your message might be helpful, but I feel like it
might not.

I understand that my message might be frustrating, but I wanted to see
if others feel similar. If nobody else support my concern, I will
correct myself and accept that my definition of "too broad" diverges
from most other Org ML subscribers.

-- 
Ihor Radchenko // yantar92,
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

2022-12-16 Thread Ihor Radchenko
Max Nikulin  writes:

> I have impression that there is no recipe how to reproduce this bug yet, 
> just reports that people have faced it. So aspects of autoload may be 
> considered as a part of brainstorm.
>
> Other ideas when built-in Org version may be loaded too early:
> - restoring previous session.
> - user configured Org agenda as startup buffer.
>
> Can it happen that already loaded version affects compilation of a new 
> version by package-install.

Yes. It is what appears to be happening:

https://irreal.org/blog/?p=10996
https://irreal.org/blog/?p=10999

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



Re: Completely hide properties drawer in 9.6

2022-12-16 Thread Jean Louis
Message was on topic as it provided design directions on how to avoid
properties, without technical actual program.

Numerous people will express numerous directions on how specific
problem may be solved. 

Take the life as it is.

I don't appreciate this kind of slap and wining about nothing!

* Ihor Radchenko  [2022-12-16 14:46]:
> Jean Louis  writes:
> 
> > * Sterling Hooten  [2022-12-14 08:39]:
> >> I'm trying to clone Lotus notes in Org mode.
> >
> > What features do you try to implement?
> >
> > Or are you trying to import your own notes into the Org?
> >
> > Org does not have functions of sharing, while it could have,
> > it doesn't, it is not considered important. 
> > 
> 
> Jean, while I understand that Org does not completely fit your usage
> patterns, please do not assume that every other user who appears to be
> needing somewhat similar functionality also needs all other things you
> are using.
> 
> This message is first asking if a user needs something and then goes
> ahead as if the answer was "yes".
> 
> Honestly, it sounds more like advertisement for Hyperscope rather than an
> attempt to help a particular user in particular question discussed in
> particular thread. Especially for long term Org mailing list subscribers
> who did see your other similar messages.
> 
> Please consider staying closer to the actual topic in the thread.

-- 
Jean

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

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



Re: 9.6 version has 9.4 Info manual?

2022-12-16 Thread Esteban Ordóñez
El 2022-12-01 04:12, alain.coch...@unistra.fr escribió:
> With the 9.5.5 version
> 
> Org mode version 9.5.5 (9.5.5-g8ef620 @
> /home/cochard/.emacs.d/elpa/org-9.5.5/)
> 
> What I have in Info is
> 
> The Org Manual
> **
> 
> This manual is for Org version 9.5.
> 
>Copyright © 2004–2022 Free Software Foundation, Inc.
> 
> But if
> 
> Org mode version 9.6 (release_9.6-6-gd500b4 @
> /home/cochard/Org/Coch-git/org-mode/lisp/)
> 
> then
> 
> The Org Manual
> **
> 
> This manual is for Org version 9.4.
> 
>Copyright © 2004–2021 Free Software Foundation, Inc.

Was it fixed?  Mi manual is for 9.6 on Orgmode version 9.6.  They match. 



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

2022-12-16 Thread Max Nikulin

On 15/12/2022 11:17, Stefan Monnier wrote:

Max Nikulin [2022-12-14 23:02:53] wrote:

Completion failure for "org-to" happened because result of
`register-definition-prefixes' calls is not considered as options. I am
aware that it may give false positives, but I still believe they should
be added.


I'm sorry, but I don't understand what you're saying.


My bad. "org-go" is completed to "org--goto" while "org-goto-" is not 
offered. The latter might be a variant because "org-goto" is registered 
as an autoload prefix. Ihor kindly created https://debbugs.gnu.org/60085 
"`help-enable-autoload' is not fully obeyed", so it is better to discuss 
it there.



Though I believe that org mixed version issue happens due to transitional
dependency of some third party package on org or something like (require
'org-protocol) that can not be loaded on demand.


Hmm... indeed the "Subject:" talks about mixed versions, yet I was
discussing something not directly related.  Looks like I got off-topic
somewhere along the way without noticing, sorry.


I have impression that there is no recipe how to reproduce this bug yet, 
just reports that people have faced it. So aspects of autoload may be 
considered as a part of brainstorm.


Other ideas when built-in Org version may be loaded too early:
- restoring previous session.
- user configured Org agenda as startup buffer.

Can it happen that already loaded version affects compilation of a new 
version by package-install.




Babel (scheme): Evaluation errors are not shown

2022-12-16 Thread Marc Nieper-Wißkirchen
When I evaluate erroneous code of an Elisp code block like

#+BEGIN_SRC elisp
(x)
#+END_SRC

I see the error message ("Symbol's function definition is void: x") in
the minibuffer (and in the *Messages* buffer).

This is not the case with Scheme code blocks; evaluating the code block

#+BEGIN_SRC scheme
(x)
#+END_SRC

just gives "Code block evaluation complete (took 0.2s)." in the
minibuffer (and in the *Messages* buffer).

Is this a known error? Or is there a way to enable error messages?

I am using org 9.6 with geiser 20221205.1417 and geiser-chez
20221027.137 on Emacs 27.1.

Thanks,

Marc



Re: Completely hide properties drawer in 9.6

2022-12-16 Thread Ihor Radchenko
Jean Louis  writes:

> * Sterling Hooten  [2022-12-14 08:39]:
>> I'm trying to clone Lotus notes in Org mode.
>
> What features do you try to implement?
>
> Or are you trying to import your own notes into the Org?
>
> Org does not have functions of sharing, while it could have,
> it doesn't, it is not considered important. 
> 

Jean, while I understand that Org does not completely fit your usage
patterns, please do not assume that every other user who appears to be
needing somewhat similar functionality also needs all other things you
are using.

This message is first asking if a user needs something and then goes
ahead as if the answer was "yes".

Honestly, it sounds more like advertisement for Hyperscope rather than an
attempt to help a particular user in particular question discussed in
particular thread. Especially for long term Org mailing list subscribers
who did see your other similar messages.

Please consider staying closer to the actual topic in the thread.

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



Re: Completely hide properties drawer in 9.6

2022-12-16 Thread Jean Louis
Hello Sterling,

* Sterling Hooten  [2022-12-14 08:39]:
> I'm trying to clone Lotus notes in Org mode.

What features do you try to implement?

Or are you trying to import your own notes into the Org?

Org does not have functions of sharing, while it could have,
it doesn't, it is not considered important. 

Org is designed for personal notes, not really for
organizational. 

Org is not meant to be related to many people as Lotus Notes is.

Rather, Org mode is centric, and meant to be related to mainly
to the person using it. Other people are not recognized as
objects in Org, despite the attempts by single individuals to
integrate such.

Complexity of Org and Emacs prevents new users adapting
themselves to the system. 

User of Lotes Notes would expect to see the integrated
interface of the application, while Org has mainly menu
interface for editing, not for activities. Two activities such
as Agenda and Export are there.

Org users constantly tend to have organized structured
collection of data, but because of it being text in the first
place it becomes (only apparently) impossible to convert
itself into the database. 

There is no such thing as problem solving and product creation
in Org. Lotus Notes is for that. Track calls related to
people, identify problems, resolve the problems, assign the
next step to next person solving it. All those system
processes can of course be done by hand, on the paper, and I
was doing it. And of course it can be done by using Org mode,
including by using any text editor. 

Though Org does not have fundamental organized structured
collection of data that can easily be accessed, manipulated or
updated -- in other word the database.

Building Lotus Notes inside of Org is thus impossible task.
Fighting windmills may be more feasible.

In my workflow, I have many headings as in Org and "headings"
similar to Org. Each heading may be sent to other people by
using SMS, XMPP, E-mail, or letter, or communicated directly
face to face, or by phone, conference. There is record that
heading ABC has been communicated to person ID 123. What if
heading ABC has been communicated to 4000 people? It is not
feasible to keep such information in Org properties, it slows
down the user to review most important information. But in
organizational management we do need to track which person
received which document, what day, why, for what reason.

We have to be able to see which person is related to which
headings. 

Org in its form how it is not, as it is based on text, is not
yet scalable to become similar to application such as Lotus
Notes.

Reference to review what Lotus Notes does:
https://archive.org/details/notedemo_SoftwareLibrary

In Org mode that would imply that there is some list of people
which is separate list and that any other Org heading or Org
file or external documents are shared to people and that
record of such sharing shall be stored in some file related to
people only. While in same time Org has not been taught to
know about "people", "sharing", and "relations". 

Sharing expertise with each other by using Org is currently
not supported. It could be. There are techniques and methods
by connecting Org to online databases, not really hard. But it
is not yet integrated. 

I wish to see org-sharing.el coming up for various types of
communication channels.

Org as Lotus Notes works on Emacs and Emacs being compatible
with various systems makes it equally well compatible. 

Though for application like Lotus Notes, the Emacs Menu should
be partially amended with the application specific menu that
relates to functions similar to Lotus Notes.

And then if we speak of "groupware", Org is far from that.

One way to add unlimited properties to any Org heading, but
then also to any other text file in Emacs is to first figure
out how to reference headings and any other types. 

Org heading may be duplicated in single file and in multiple files:

* Business
** List of items
* Family
** List of items

Where "List of items" could be duplicate in same file.
Reference cannot be "List of items" as that could be easily
renamed "List of stuff" to cause havoc in organization of
data. And it cannot be reference to tree node, as nodes may
also move from place to place in single file and to other
files.

The way to go is to have a separate and external list of UUIDs
to make sure that UUIDs are unique.  Then in every Org file
one may generate UUIDs as references to headings and other objects.

External list of UUIDs is necessary Org's UUID does not have
UNIQUE check like in relational databases such as PostgreSQL.
Any UUID generated in the Org file could
   
Default  Nullable Collation Type Column 
  be 
compared to
external UUID only to check if UUID already exists. External
list of UUIDs represents the pointer to Org heading.

That all may use simple text. It could use the Emacs 29
built-in SQLite database or