Asking whether to "save file /var/folders/xxxxxxxxx/orgicssxPjY1" everytime I kill Emacs

2023-02-22 Thread Alexei Gilev
Basically that: from yesterday, every time I kill Emacs, i get this message.
I never got this message before and I am not sure whether I should be
saving or not.

Anybody experiencing this issue?

Best,
A.


Re: How to export org-agenda to ICS to show in iCal

2023-02-22 Thread Alexei Gilev
Thanks for your time.

When I try, however, to use functions like
org-icalendar-combine-agenda-files or org-icalendar-export-to-ics, I get
this error:

Debugger entered--Lisp error: (error "Lisp nesting exceeds
> ‘max-lisp-eval-depth’")


When I use the function: org-agenda-write to agenda.ics, it throws the
error "condition-case: Unable to resolve link:".

I would rather be able to use the org-icalendar-combine-agenda-files, so I
export all agenda file tasks to an ICS ICalendar file.

Any help welcome, thanks!

Best,

A.

El dom, 19 feb 2023 a las 13:31, Ihor Radchenko ()
escribió:

> Max Nikulin  writes:
>
> >> In agenda buffer, M-x write-file  file-name.ics 
> >
> > Shouldn't it be `org-agenda-write', not `write-file'?
>
> Yes, indeed.
>
>


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

2023-02-22 Thread Samuel Wales
huh i had put org-next-link there.  i wish define-key could have a
button in a help page like functions and vars do so you could go to
where you define it.  [there are probably 300 competing packages that
do exactly that.]

On 2/22/23, Max Nikulin  wrote:
> On 23/02/2023 00:01, Karl Fogel wrote:
>>
>>   (when (not (keymap-lookup nil "C-"))
>>     (keymap-local-set "C-" 'org-fold-hide-subtree))
>>
>> So FWIW C- is not bound in Org Mode buffers for me, in Emacs 30.x
>> (i.e., recent development builds).
>
> lisp/tab-bar.el:130:  (unless (global-key-binding [(control tab)])
> lisp/tab-bar.el:131:(global-set-key [(control tab)] #'tab-next))
>
> Minibuffer file cache completion should not be relevant to Org buffers.
>
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



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

2023-02-22 Thread Max Nikulin

On 23/02/2023 00:01, Karl Fogel wrote:


  (when (not (keymap-lookup nil "C-"))
    (keymap-local-set "C-" 'org-fold-hide-subtree))

So FWIW C- is not bound in Org Mode buffers for me, in Emacs 30.x 
(i.e., recent development builds).


lisp/tab-bar.el:130:  (unless (global-key-binding [(control tab)])
lisp/tab-bar.el:131:(global-set-key [(control tab)] #'tab-next))

Minibuffer file cache completion should not be relevant to Org buffers.




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

2023-02-22 Thread Jean Louis
* Cletip Cletip  [2023-02-21 19:20]:
> 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.

Solely the above paragraph is not giving me enough information. It is
general statement. In every Emacs buffer anything is automatically
capable to be queried. One can search by using regular expressions and
there is plethora of other ways to find information. Similarly one can
tell that for many other systems. I find almost anything in any text
by using `ed' the standard text editor.

I am trying to understand what you mean with it, and it that is
something that I have not described above.

> 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.

Okay, I understand. Meta data is normally not visible or can be made
visible, but is not part of the text, but could be part of Org
heading, like Org properties or tags. Including that all words and
sentence can also be considered part of it.

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

I cannot see practical example, so I cannot understand.

I cannot even know if your description of what I think fits to what I
think that I think... hmm, let me see. Do I really think about "What
describes this information"? 

When I enter document in the Dynamic Knowledge Repository, then I name
it. In that sense I think of "what describes this information", as I
have to describe it, sort it, under some set, which is another way of
describing it, maybe relate to people, and so on.

However, when you write any text, you are "describing this
information". I am trying to understand what you mean and how do you
mean of doing things "without describing 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.

Yes, database system like GeDaFe is designed for user to create new
table. Though that is not happening too often. 

If you only work with text, you need not special database, as your
file system is enough. 

Org is prime example how text may be structured and mimic database
features.

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

It is true that by thinking in advance, one can get better results.

For example, one starts creating separate table columns for:

- first name
- middle names
- last name

then I realized, people have nick names, what else, so I added another
column like:

- other names, as array that can hold any number of names

then people have their titles, so you add "title" column.

But then I realize people have different relationships, may have
different roles in different organizations and thus different titles,
so I added "people relationship" table, in which "titles" are
described individually. 

And then how to search for that information? PostgreSQL full text
search does that. 

Mastering PostgreSQL Tools: Full-Text Search and Phrase Search - Compose 
Articles:
https://compose.com/articles/mastering-postgresql-tools-full-text-search-and-phrase-search/

So then anything may be queried with simple search, as long as all
those fields are updated for full text search:

Possible queries could be:

- baker in Monaco
- Joe, baker
- Joe director Monaco

and so on, and they could lead to same person.

> 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.

I will understand when you show me example.

> 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.

That is not time consuming:

- adding new table is maybe 1 minute

- I never check if other table do the same thing, but I could start
  making new table to improve previous work

Adding tables is rapid on my side. 

> So you need excellent documentation, hoping that the system itself
> doesn't become too "cluttered" for the user.

I need documentation, I have little of it. It is just as Org, it needs
a lot of documentation for people to use it.

> For your purpose, yes. For mine, no. I think that every thing that
> has to have a 

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

2023-02-22 Thread Karl Fogel

On 22 Feb 2023, Max Nikulin wrote:

On 22/02/2023 14:29, Karl Fogel wrote:
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.


Perhaps C- is not the best choice:

9092c289b6bea38bb519e6c59a60237ae5af8f08
author Bastien Mon Jun 1 14:39:28 2020 +0200

Bind `org-force-cycle-archived' to C-c C-TAB

* lisp/org-keys.el (org-mode-map): Bind 
`org-force-cycle-archived'

to C-c C-TAB instead of C-TAB to avoid conflict with native Emacs
keybinding.


Ah, clearly it is not a good choice -- thank you for noticing 
that.


I think there are two separate questions here:

1) Would it be useful to bind `org-fold-hide-subtree' by default?

2) If yes to (1), then is there a good key to bind it to?  (C-c 
C-something, I guess.)


If we agree on (1), then let's figure out the answer to (2).  I 
don't know if anyone else agrees about (1) yet, though.


By the way, the binding in my Org Mode hook looks like this:

 (when (not (keymap-lookup nil "C-"))
   (keymap-local-set "C-" 'org-fold-hide-subtree))

So FWIW C- is not bound in Org Mode buffers for me, in Emacs 
30.x (i.e., recent development builds).  However, I agree with 
Bastien's logic: C- is not in the reserved keymap space, so 
Emacs might bind it (and perhaps does bind it in other modes).


I don't know how widely-used `org-cycle-force-archived' is (that's 
the new name of that function).  I don't use it, personally, so if 
we decide against (1)+(2) above, then perhaps I'll just override 
that binding for myself instead.


Best regards,
-Karl



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

2023-02-22 Thread Bhavin Gandhi
On Wed, 22 Feb 2023 at 16:17, Ihor Radchenko  wrote:
>
> Bhavin Gandhi  writes:
>
> > 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).
>
> May I know what is the contents of
> /usr/share/emacs/site-lisp/site-start.d ?

These are init files specific to other packages installed via OS package
manager. But those are not loaded, it seems in the above steps. I tried to
run (featurep 'clang-format) and it returned nil, while this returns t
in my normal Emacs instance.

$ ls -1 /usr/share/emacs/site-lisp/site-start.d/
autoconf-init.el
  https://src.fedoraproject.org/rpms/autoconf/blob/rawhide/f/autoconf-init.el
clang-format.el
clang-include-fixer.el
clang-rename.el
cmake-init.el
  https://src.fedoraproject.org/rpms/cmake/blob/rawhide/f/cmake-init.el
desktop-entry-mode-init.el
  
https://src.fedoraproject.org/rpms/desktop-file-utils/blob/rawhide/f/desktop-entry-mode-init.el
gtypist-init.el
  https://src.fedoraproject.org/rpms/gtypist/blob/rawhide/f/gtypist.spec#_43-46
mercurial-site-start.el
  
https://src.fedoraproject.org/rpms/mercurial/blob/rawhide/f/mercurial-site-start.el

None of these load org-mode.

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



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

2023-02-22 Thread Max Nikulin

On 22/02/2023 14:29, Karl Fogel wrote:
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.


Perhaps C- is not the best choice:

9092c289b6bea38bb519e6c59a60237ae5af8f08
author Bastien Mon Jun 1 14:39:28 2020 +0200

Bind `org-force-cycle-archived' to C-c C-TAB

* lisp/org-keys.el (org-mode-map): Bind `org-force-cycle-archived'
to C-c C-TAB instead of C-TAB to avoid conflict with native Emacs
keybinding.

...

-(org-defkey org-mode-map (kbd "C-") #'org-force-cycle-archived)
+(org-defkey org-mode-map (kbd "C-c C-") #'org-force-cycle-archived)





how to omit section numbers from theindex.html when publishing a project

2023-02-22 Thread Christopher W. Ryan
Well, my IT department did some major damage to my computer system, and
now the output of publishing a project (my only one) to html is
different. Specifically, the numbers next to each alphabetical letter in
theindex.html are shown, whereas before they were not. I can't recall if
this is some sort of setting that I changed once and now need to change
back. How can I prevent thos numbers from appearing in theindex.html,
but still have them appear in the main document for which theindex.html
is the index?

Emacs 26.2 on Windows 10 professional.

Relevant portion of .emacs:

;; Projects and publishing
;;
(setq org-publish-project-alist
  '(("CaseInvestigationTrainingAndReferenceManual"
 :base-directory
"E:/DATA/BCHD/CD/ChinaCoronavirus2019/CommCare/TrainRef/"
 :publishing-directory
"E:/DATA/BCHD/CD/ChinaCoronavirus2019/CommCare/TrainRef/StagingArea"
 :publishing-function org-html-publish-to-html
 :base-extension org
 :makeindex t)))

Thanks.

--Chris Ryan



Re: BUG: org-sbe not working anymore: Format specifier doesn’t match argument type

2023-02-22 Thread 赵一宇
Here is an example, in org file


#+name: test
#+begin_src emacs-lisp :var a :results silent
a
#+end_src


Now, if I execute 
(org-sbe "test" (a "123°34'23.34\"otherthing"))
it would say: Reference 123°34'23.34"otherthing not found
and
(org-sbe "test" (a $"123°34'23.34\"otherthing"))
would result 123°34'23.34
|
|


|
|
zhy...@163.com
|
 Replied Message 
| From | Ihor Radchenko |
| Date | 2/22/2023 21:57 |
| To | 赵一宇 |
| Cc | mick.da...@gmail.com ,
orgm...@tec.tecosaur.net ,
emacs-orgmode@gnu.org |
| Subject | Re: BUG: org-sbe not working anymore: Format specifier doesn’t 
match argument type |
赵一宇  writes:

However, I wanna figure out if another change would somehow fix another 
problem, when in the (var value) pair, the value contains quotation marks, for 
example 123°34'23.34", the assignment would fail.

Could you please provide a reproducer?

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


Re: BUG: org-sbe not working anymore: Format specifier doesn’t match argument type

2023-02-22 Thread 赵一宇
Oh thanks, that was clear.
However, I wanna figure out if another change would somehow fix another 
problem, when in the (var value) pair, the value contains quotation marks, for 
example 123°34'23.34", the assignment would fail.


In macro she-org,
change
(quote (format "\"%s\"" el))
to
(quote (format "%S" el))


Now I can use the $ prefix to assign the string value.


|
zhy...@163.com
|
 Replied Message 
| From | Ihor Radchenko |
| Date | 2/22/2023 19:18 |
| To | zhaoyiyu |
| Cc | Michael Dauer ,
Timothy ,
 |
| Subject | Re: BUG: org-sbe not working anymore: Format specifier doesn’t 
match argument type |

zhaoyiyu  writes:
Maybe change the org-sbe macro? Below is a workaround.

Sorry, I was not clear.
This bug has been fixed.
I can no longer reproduce it.

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


Re: BUG: org-sbe not working anymore: Format specifier doesn’t match argument type

2023-02-22 Thread Ihor Radchenko
赵一宇  writes:

> However, I wanna figure out if another change would somehow fix another 
> problem, when in the (var value) pair, the value contains quotation marks, 
> for example 123°34'23.34", the assignment would fail.

Could you please provide a reproducer?

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



Re: BUG: org-sbe not working anymore: Format specifier doesn’t match argument type

2023-02-22 Thread zhaoyiyu

Maybe change the org-sbe macro? Below is a workaround.

(defmacro org-sbe (source-block  variables)

  (declare (debug (form form)))
  (let* ((header-args (if (stringp (car variables)) (car variables) ""))
     (variables (if (stringp (car variables)) (cdr variables) variables)))
    (let* (quote
       (variables
    (mapcar
     (lambda (var)
       ;; ensure that all cells prefixed with $'s are strings
       (cons (car var)
     (delq nil (mapcar
            (lambda (el)
              (if (eq '$ el)
              (prog1 nil (setq quote t))
                (prog1
                (cond
 ;; FIXME: replace "\"%s\"" for 
quotation marks inside value

-->                     (quote (format "%S" el))
                 ((stringp el) (org-no-properties el))
                 (t el))
              (setq quote nil
            (cdr var)
     variables)))
  (unless (stringp source-block)
    (setq source-block (symbol-name source-block)))
  (let ((result
 (if (and source-block (> (length source-block) 0))
 (let ((params
    ;; FIXME: Why `eval'?!?!?
    (eval `(org-babel-parse-header-arguments
    (concat
 ":var results="
 ,source-block
 "[" ,header-args "]"
 "("
 (mapconcat
  (lambda (var-spec)
    (if (> (length (cdr var-spec)) 1)
    (format "%S='%S"
    (car var-spec)
    (mapcar #'read (cdr 
var-spec)))

  (format "%S=%s"
  (car var-spec) (cadr 
var-spec

  ',variables ", ")
 ")")
   (org-babel-execute-src-block
    ;; FIXME: manual add names in list
-->    nil (list "emacs-lisp" "results" params "" "results")
    '((:results . "silent"
   "")))
    (org-trim (if (stringp result) result (format "%S" result)))

On 2022/11/4 15:23, Ihor Radchenko wrote:

Michael Dauer  writes:


It's this fixed? How can I track myself?

I think it is, as a side effect of
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=9987451252fa64af65d0a0a014f41812f4402c02

I was mainly waiting for Timothy to chime in, but there was a second bug 
report...






Re: [POLL] Naming of "export features"

2023-02-22 Thread Ihor Radchenko
Timothy  writes:

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

I am looking at the concept again, and I feel that we may be missing
some flexibility here. I do not like the fact that each feature can only
have a simple implementation within specific backend.

Imagine that we would like add a top _and also_ bottom comment when the
Org buffer contains emoji. With the proposed patch, it will be
impossible.

I am thinking about something conceptually similar, but more general.

Instead of detecting "features" in the whole document, let's consider
that for every exported Org element (including org-data, representing
the whole document) we may emit different export output depending on
certain condition being satisfied for either original Org raw source of
the exported element, the element AST, or the exported element contents.
Let's call it "transcoder conditions".

What I have in mind is an ability to parametrize the transcoders like
the following:

(org-export-define-backend 'html
 '((paragraph . ((paragraph-is-a-link? figure-transcoder :name figure)
 (:unless 'figure paragraph-transcoder
 :transcoder-conditions
 '((paragraph . ((paragraph-is-a-link? (lambda (paragraph contents 
info)...))

Several ideas in the above:
1. Name features as "transcoder conditions"
2. The transcoder conditions are now linked to specific Org AST element.
   They may not only be matched against the whole parse tree + whole raw
   Org text, but also against the specific branch of AST + chunk of raw
   Org text corresponding to the branch + the actual exported contents
   of the AST children.
3. "feature implementations" are no longer needed. Instead, export
   transcoders can contain the implementation lists inline. Each
   implementation is selected not only depending on the presence of the
   "feature"/transcoder condition, but also depending on multiple
   features or arbitrary lisp expression results.
4. :when/:prevents apply to specific (possibly named) implementations.
   This makes more sense than matching against feature.
   For example, presence of svg images in latex export may or may not
   mean that \usepackage{svg} is being used, depending on svg
   implementation. We want to match against \usepackage{svg}
   specifically rather than only against the presence of svg images.

WDYT?

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



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

2023-02-22 Thread Pedro Andres Aranda Gutierrez
To: emacs-orgmode@gnu.org
Re: Re: [BUG] #+cite_export: ... bibstyle citestyle cannot be
universally used as global defaults (was: Patch for \usepackage[ ...
natbib = true ...]{...biblatex} with org-cite)

On Sun, 5 Feb 2023 00:14:59 +0100 (CET) Edgar wrote:
> Dear Ihor,
> On Feb 4, 2023 at 12:31 PM, Ihor Radchenko  wrote:Edgar 
> Lux  writes:
>> For example, ... the proposed idea is
>> a bit awkward:
>>
>> ...
>> #+cite_export: processor[opt1=val1,opt2=val2,...] bibliography-style[...]
>> citation-style[...]
>>
>> I assumed that there is one "major" bibliography-style/citation-style.
>> However, it is not really the case in practice. The styles are combined.
> First of all, I quickly glanced at the other citation processors, and they 
> seem to have been implemented with a different design in Org. This *may* have 
> to do with biblatex being more advanced (disclaimer: I'm not saying that it 
> actually is, it's a possibility only).
> If the idea is that all processors are going to get the same syntax, I think 
> that the implementation may not suit one of them. At that point, it may be 
> that the filters will have to be adapted to specific processors in contrived 
> ways. This of course will be much dependent on the choice of processors 
> chosen to be supported by Org. Some other groups may decide to implement, for 
> example, the JabRef #+cite_export (this does not imply that JabRef is a 
> citation processor, it's just a colourful example).
>> For example, adding links to bibliography to citations is applied
>> regardless of the particular citation command being used.
>>
>> So, I am not leaning closer to only allowing options being passed to
>> "processor", but not to styles. This will at least come closer to
>> certain settings being citation package global config applied to
>> everything. If we have options applied to specific citation commands,
>> they will rather fit into citation-style/sub-style.
>>
>> #+cite_export: processor[opt1=val1,opt2=val2,...] bibliography-style
>> citation-style

> If it were me, I would consider just having the options as =#+cite_export: 
> processor :options "anything"=. If the bibliography-style is important for 
> the user and processor, may be default values can be provided; and let the 
> user read some documentation option which are needed to run her particular 
> processor (provided by them, not necessarily Org). Again, being completely 
> honest, I don't think that you should put a dummy (like me) making these very 
> relevant decisions.

Joining the discussion I seem to have missed before (because I was
using a less org-ish solution).
My scenario: BEAMER and LATEX are my main targets, both with BIBLATEX
and biber as backend. Works nicely, and I can include a bibliography
at the end of my presentations, which is nice for lectures.
I'm more interested in the 'processor' part, because the default
bibliography and citation style fit me. However, I think that
something like:

#+cite_export: processor bibliography-style citation-style :options
opt1=val1,opt2=val2,...

as a generalised form (for the shortened version with default styles):

#+cite_export: processor :options opt1=val1,opt2=val2,...

would be expressive enough.

Best, /PA

On Wed, 22 Feb 2023 at 12:33, Ihor Radchenko  wrote:
>
> Pedro Andres Aranda Gutierrez  writes:
>
> > \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
>
> Feel free to join the discussion at 
> https://orgmode.org/list/87ilghfyzs.fsf@localhost
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 



-- 
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: org-roam: how to have links un-opened

2023-02-22 Thread Fraga, Eric
And, for the record, this does the job for me:

#+begin_src emacs-lisp
  (add-hook 'org-roam-mode-hook #'magit-section-show-level-2)
#+end_src 

Thanks again,
eric

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


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

2023-02-22 Thread Fraga, Eric
On Wednesday, 22 Feb 2023 at 11:31, Ihor Radchenko wrote:
> org-roam buffer is in org-roam-mode major mode, which is derived from
> magit-section-mode. So, you should be able to use magit-section-show-*
> commands in org-roam-mode-hook.

Thank you.  I will explore the magit show commands.

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


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

2023-02-22 Thread Ihor Radchenko
Pedro Andres Aranda Gutierrez  writes:

> \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

Feel free to join the discussion at 
https://orgmode.org/list/87ilghfyzs.fsf@localhost

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



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

2023-02-22 Thread Ihor Radchenko
Ruijie Yu via "General discussions about Org-mode."
 writes:

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

Org mailing list is not restricted to vanilla Org.
Asking about org-roam is perfectly on-topic.

Of course, asking about Org roam on Org forums may have a better change
to get a more specific answer.

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

org-roam buffer is in org-roam-mode major mode, which is derived from
magit-section-mode. So, you should be able to use magit-section-show-*
commands in org-roam-mode-hook.

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



Re: [PATCH] org-element-timestamp-interpreter: Return daterange anyway, if DATERANGE is non-nil

2023-02-22 Thread Ihor Radchenko
Ilya Chernyshov  writes:

> You suggest to split timestamp types active/inactive-range to 
> active/inactive-timerange, active/inactive-daterange?

I suggest introducing a new timestamp property :range-type. It can be
nil, timerange, or daterange.

Changing :type values will not be backwards-compatible.

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



Re: BUG: org-sbe not working anymore: Format specifier doesn’t match argument type

2023-02-22 Thread Ihor Radchenko


zhaoyiyu  writes:
> Maybe change the org-sbe macro? Below is a workaround.

Sorry, I was not clear.
This bug has been fixed.
I can no longer reproduce it.

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



Re: [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-22 Thread Ihor Radchenko
Daniel Ortmann  writes:

> 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.

When point is at existing timestamp, C-c ! tries to take the time of
that timestamp as default. To force today's date and time, you can use
C-u C-u C-c ! 

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

2023-02-22 Thread Ihor Radchenko
Bhavin Gandhi  writes:

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

May I know what is the contents of
/usr/share/emacs/site-lisp/site-start.d ?

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



Re: [PATCH] Async evaluation in ob-shell

2023-02-22 Thread Ihor Radchenko
Matt  writes:

> I've rewritten the test and updated the patch. 

Thanks!

> +(defun ob-shell-async-chunk-callback (string)
> +  "Filter applied to results before insertion.
> +See `org-babel-comint-async-chunk-callback'."
> +  (replace-regexp-in-string (concat org-babel-sh-prompt "*") "" string))

Why not using `comint-prompt-regexp'?

> +(ert-deftest test-ob-shell/session-async-valid-header-arg-values ()
> +  "Test that session runs asynchronously for certain :async values."
> +  (let ((session-name "test-ob-shell/session-async-valid-header-arg-values")
> +(kill-buffer-query-functions nil))
> +(cl-loop

A simple `dolist' would do here. There is no reason to use `cl-loop'.

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



Re: [BUG] C-S-up/down on first timestamp in clock malfunctioning [9.6.1 (release_N/A-N/A-747e60 @ /Users/[]/.emacs.d/elpa/org-9.6.1.0.20230218.123114/)]

2023-02-22 Thread Ihor Radchenko
sting.startup...@icloud.com writes:

> Consider:
>
> * Test
> :LOGBOOK:
> CLOCK: [2023-02-19 Sun 22:30]--[2023-02-20 Mon 00:35] =>  2:05
> :END:
>
> Hitting C-S-up/down in the first time stamp does not preserver duration, and 
> can lead to negative durations, which "break" the clock.  The same keystrokes 
> work as intended in the second timestamp.

Thanks for reporting.
Fixed, on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=7a90f596d

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



Re: Links to external targets with (or despite) org-ref

2023-02-22 Thread Sven Bretfeld
Hi John

That's working well. Thank you very much. And thousand thanks for
org-ref in general.

Sven

Am Mon, Feb 20, 2023 at 01:07:49PM -0500 schrieb John Kitchin:
> The quickest thing might be to remove the store properties on the ref links.
> This should do it.
> 
> #+BEGIN_SRC emacs-lisp
> (cl-loop for reflink in '("ref" "pageref" "nameref" "eqref" "autoref" "cref"
> "Cref" "crefrange" "Crefrange")
> do
> (setf (cdr (assoc reflink org-link-parameters))
>   (org-plist-delete (cdr (assoc reflink org-link-parameters)) :store)))
> #+END_SRC
> 
> I guess I don't have that setup quite right in org-ref, it seems like it 
> should
> not clobber other ways to store links.
> 
> On Sun, Feb 19, 2023 at 10:39 AM Sven Bretfeld <[1]sven.bretf...@ntnu.no>
> wrote:
> 
> Hi everybody
> 
> I'm looking to create labels/links to specific text positions in org
> files (not line number, not header).
> 
> I know that [[file:~/path_to_file::target]] can be used to jump to
> <>. That would be fine and works for me -- IF I write the link
> manually.
> 
> However, org-ref which I use for citations seems to overwrite the
> default behaviour of org-store-link and org-insert-link. So when the
> point is on <> and org-store-link is called (C-c l), I get a
> prompt "Store link with (default org-ref-store-ref)". No alternatives
> are offered when TAB is hit. Hiting RET saves the link as
> "Crefrange:target". A corresponding org-insert-link (C-c C-l) produces
> a link of the form [[Crefrange:target]] which, when in another file,
> of course leads nowhere ("search failed"). How to get the file name
> into these links without manually rewriting the link?
> 
> I couldn't find anything on this issue in the org-ref manual or on the
> internet.
> 
> Thanks for help,
> 
> Sven
> 
> 
> 
> References:
> 
> [1] mailto:sven.bretf...@ntnu.no



Re: [PATCH] Avoid crash in `org-file-contents' in case of network failure

2023-02-22 Thread Ihor Radchenko
Damien Cassou  writes:

> * lisp/org.el (org-file-contents): Wrap the
> `url-retrieve-synchronously' call into a `condition-case' block to
> avoid throwing an error when NOERROR is non-nil.

Thanks for the patch!
Few comments.

> Subject: [PATCH] Avoid crash in `org-file-contents' in case of network failure
>
> * lisp/org.el (org-file-contents): Wrap the
> `url-retrieve-synchronously' call into a `condition-case' block to
> avoid throwing an error when NOERROR is non-nil.

According to our records in https://orgmode.org/worg/contributors.html,
you haven't signed FSF copyright agreement. May you add a TINYCHANGE
cookie to the commit message as required by
https://orgmode.org/worg/org-contribute.html#first-patch

> +(error (if noerror
> +   (message "%s %S" (car error) (cdr error))
> + (signal (car error) (cdr error)

I think that it will be a good idea to indicate in the `message' where
the error is coming from. The error intercepted by this `condition-case'
form will likely be a network error, and it may be unclear to the user
which function is failing to make the connection.

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