Re: your latest paper will not allow eww

2021-11-05 Thread Quiliro Ordóñez
El 2021-11-04 03:09, Eric S Fraga escribió:
> On Wednesday,  3 Nov 2021 at 21:38, quil...@riseup.net wrote:
>> I get the following error when trying to access your latest paper with
>> Emacs eww:
> 
> Thank you for the heads up on this.  How annoying.
> 
> However, it works for me using eww.  What version of Emacs etc. are you
> using?  

I can see it well with:

GNU Emacs 27.1 (build 1, i686-pc-linux-gnu, GTK+ Version 3.24.24, cairo
version 1.16.0)
 of 2021-03-27, modified by Debian

> I don't customise anything in eww other than a couple of key
> bindings and display width.

Perhaps the problem on the other machine is because of Emacs'
configuration.  I will test it with emacs -q and report. 

> Reading the full email you sent, it does mention problems with proxy
> servers.  Does this apply to you?
 
I will test and report too.  Thank you for your patience.



Re: Introducing Org-transclusion

2021-11-05 Thread Timothy
Hi Tim,

> WRT making this part of org-mode core, I’m not in favour. This is no
> reflection on the package, which I think is a great addition to the org
> ecosystem. My preference would be for this package to be an add-on
> package in either ELPA or non-GNU ELPA.
>
> My main reason for this is because I think we should be striving to make
> the core org packages as small and easily maintained as possible,
> containing the core functionality used by everyone. While this package
> has some very useful functionality, I feel it is functionality which
> will be used by a subset of users or by others only occasionally.
>
> If, at a later date, it turns out a majority of users use this package,
> we can review and if necessary/appropriate, bring the package into org core
> (assuming copyright is handed over to FSF).

Reading your thoughts on this package, I find myself of a similar mind. I think
org-transclusion is great, but it may be a bit hasty to add it as a “core” Org
feature at this stage. If it looks like a good idea later and/or we end up
developing an Org spec with a small core and tiers of features, I could see this
being included alongside less-essential features like `#+plot'.

All the best,
Timothy


Re: Introducing Org-transclusion

2021-11-05 Thread Noboru Ota


Sorry that this email is duplicate for Uwe but I didn't include the
mailing list as the To/Cc list. Still getting used to how this mailing
list works.

Uwe Brauer  writes:

> Ok I tried that out, both files are indeed org file (I thought that is
> the most natural way anyhow)

Thank you.

> I finished the editing with C-c C-c
> but received a error message that confused me
> ,
> | 
> | Warning (emacs): org-element--cache: Unregistered buffer modifications 
> detected. Resetting.

I cannot reproduce the problem (I have never seen this warming myself)
and I have a feeling that it is the same issue as being discussed in
this recent thread in this mailing list (?)

https://list.orgmode.org/m2bl36sfrw@gmail.com/

I cannot follow the exchange there but you might be able to and give me
advice.  Isn't it realted to a development branch or some working commit
of Org?

I use the 9.5 release from ELPA, which I believe is what people call a
stable version?

Thank you.
Noboru



Re: [BUG] Org V 9.5 error when ~/.cache doesn't exist

2021-11-05 Thread Tim Cross


Ihor Radchenko  writes:

> Kaushal Modi  writes:
>
>> Figured out the problem.. looks like Org main branch doesn't support emacs
>> 25.
>>
>> My build script was building Org for all emacs versions starting from
>> version 25. It builds fine if remove the build  for emacs 25. I think I
>> missed it somewhere that Org main branch is dropping emacs 25 support.
>
> I am not sure if we are dropping Emacs 25 just yet. However, there is
> currently more than one place in Org that does not work on Emacs 25.
> See https://list.orgmode.org/87zgqu6081.fsf@localhost/T/#t
>
> If compilation is critical for you, I can make a patch to make things
> compile in Emacs 25. Though compatibility layer for xdg is more tricky.
> I do not want to do it unless necessary.
>

If we assume this version will not be released until Emacs 28 is
released, then I don't think emacs 25.x compatibility is required.
However, if these changes are to be incorporated into a release prior to
the release of Emacs 28, support for version 25.x would be required.

While release candidates for Emacs 28 have been released, I'm not sure
version 28 will be out this year. I would expect it will be released in
the next 6 - 12 months.

I would assume emacs 28 to include the released
9.5 (plus bug fixes) version and these changes to be in the 9.6 version?



Re: Introducing Org-transclusion

2021-11-05 Thread Tim Cross


Noboru Ota  writes:

> Timothy  writes:
>
>> It’s worth noting that currently Org’s minimum supported Emacs version is 
>> 25. Do
>> you use much from Emacs 26/27? There was mention of compat.el earlier though,
>> and if that goes somewhere this may not be an issue.
>
> Thank you, Timothy.  I take it that support for version 25 to be a
> prerequsite for Org-transclusion to be included in Org.
>
> It never occured to me; thanks for pointing it out.  I will need to
> check -- it was just my development was done mainly on 27.
>
> Does this mean Org contributors have different versions of Emacs (25,
> 26, 27...) and test their patches in every version?  Do you know?
>

The org 'policy' is to support the current released Emacs version and
the two previous versions. Current released version is 27.2, so need to
support 26.* and 25.*. We recently dropped the requirement to support
24.x. Once Emacs 28 is released, support for 25.x can be dropped.

WRT making this part of org-mode core, I'm not in favour. This is no
reflection on the package, which I think is a great addition to the org
ecosystem. My preference would be for this package to be an add-on
package in either ELPA or non-GNU ELPA.

My main reason for this is because I think we should be striving to make
the core org packages as small and easily maintained as possible,
containing the core functionality used by everyone. While this package
has some very useful functionality, I feel it is functionality which
will be used by a subset of users or by others only occasionally.

If, at a later date, it turns out a majority of users use this package,
we can review and if necessary/appropriate, bring the package into org core
(assuming copyright is handed over to FSF).



Re: [BUG] Org V 9.5 error when ~/.cache doesn't exist

2021-11-05 Thread Kaushal Modi
On Fri, Nov 5, 2021, 9:48 AM Ihor Radchenko  wrote:

>
> I am not sure if we are dropping Emacs 25 just yet. However, there is
> currently more than one place in Org that does not work on Emacs 25.
> See https://list.orgmode.org/87zgqu6081.fsf@localhost/T/#t
>
> If compilation is critical for you, I can make a patch to make things
> compile in Emacs 25. Though compatibility layer for xdg is more tricky.
> I do not want to do it unless necessary.
>

I haven't switched back to emacs 25 in a while. It's just that the script I
had for building Org started failing. All's good after removing the build
step for emacs 25.

I am anyways on emacs/master and then emacs-28 for a while now. So I
personally don't need emacs 25 compatibility. But in any case, this
breakage on emacs 25 should be fixed or the min req bumped to emacs 26.

>


Re: Introducing Org-transclusion

2021-11-05 Thread Uwe Brauer
>>> "NO" == Noboru Ota  writes:

> Uwe Brauer  writes:
>> If I include the content of another org file (say Russell) into my
>> main.org file
>> 
>> 1. I can export main.org to say latex and that latex file includes
>> the corresponding content of Russell.
>> 2. It is a one way bridge, I cannot modify the content of Russell in
>> main.org, right?

> You can.  Put your point on the read-only copied text content in
> main.org (transcluded text) and press "e" to call the
> "org-transclusion-live-sync-start" command.  The transcluded text and
> source will get an overlay, which lets you edit and sync the changed
> content real-time. This works both ways.


Ok I tried that out, both files are indeed org file (I thought that is
the most natural way anyhow)

I finished the editing with C-c C-c
but received a error message that confused me
,
| 
| Warning (emacs): org-element--cache: Unregistered buffer modifications 
detected. Resetting.
| If this warning appears regularly, please report it to Org mode mailing list 
(M-x org-submit-bug-report).
| The buffer is: mytransclusion.org
|  Current command: org-transclusion-mode
|  Backtrace:
| "  backtrace-to-string(nil)
|   org-element--cache-sync(# 14)
|   org-element-at-point()
|   org-transclusion-keyword-string-to-plist()
|   org-transclusion-add-all()
|   org-transclusion-mode(toggle)
|   funcall-interactively(org-transclusion-mode toggle)
|   call-interactively(org-transclusion-mode nil nil)
|   command-execute(org-transclusion-mode)
| " Disable showing Disable logging
| Warning (emacs): org-element--cache: Unregistered buffer modifications 
detected. Resetting.
| If this warning appears regularly, please report it to Org mode mailing list 
(M-x org-submit-bug-report).
| The buffer is: mytransclusion.org
|  Current command: org-transclusion-add
|  Backtrace:
| "  backtrace-to-string(nil)
|   org-element--cache-sync(# 32)
|   org-element-at-point()
|   org-transclusion-check-add()
|   org-transclusion-add()
|   funcall-interactively(org-transclusion-add)
|   call-interactively(org-transclusion-add nil nil)
|   command-execute(org-transclusion-add)
| " Disable showing Disable logging
| Warning (emacs): org-element--cache: Unregistered buffer modifications 
detected. Resetting.
| If this warning appears regularly, please report it to Org mode mailing list 
(M-x org-submit-bug-report).
| The buffer is: mytransclusion.org
|  Current command: kill-this-buffer
|  Backtrace:
| "  backtrace-to-string(nil)\12  org-element--cache-sync(# 91)\12  org-element-at-point(91)\12  
org-element--cache-persist-before-write(org-element--cache #)\12  
run-hook-with-args-until-success(org-element--cache-persist-before-write 
org-element--cache #)\12  #f(compiled-function (v) 
#)(org-element--cache)\12  #f(compiled-function 
(elt) #)(org-element--cache)\12  
mapc(#f(compiled-function (elt) #) 
(org-element--headline-cache org-element--cache))\12  
seq-do(#f(compiled-function (elt) #) 
(org-element--headline-cache org-element--cache))\12  
seq-find(#f(compiled-function (v) #) 
(org-element--headline-cache org-element--cache))\12  
org-persist-write((org-element--headline-cache org-element--cache) #)\12  org-persist-write-all(#)\12 
 org-persist-write-all-buffer()\12  kill-buffer(#)\12  kill-scratch-buffer()\12  kill-buffer(#)\12  kill-this-buffer()\12  
funcall-interactively(kill-this-buffer)\12  call-interactively(kill-this-buffer 
nil nil)\12  command-execute(kill-this-buffer)\12" Disable showing Disable 
logging
| Warning (emacs): org-element--cache: Unregistered buffer modifications 
detected. Resetting.
| If this warning appears regularly, please report it to Org mode mailing list 
(M-x org-submit-bug-report).
| The buffer is: mytransclusion.org
|  Current command: org-transclusion-add
|  Backtrace:
| "  backtrace-to-string(nil)
|   org-element--cache-sync(# 14)
|   org-element-at-point()
|   org-transclusion-check-add()
|   org-transclusion-add()
|   funcall-interactively(org-transclusion-add)
|   call-interactively(org-transclusion-add nil nil)
|   command-execute(org-transclusion-add)
| " Disable showing Disable logging
| Warning (emacs): org-element--cache: Unregistered buffer modifications 
detected. Resetting.
| If this warning appears regularly, please report it to Org mode mailing list 
(M-x org-submit-bug-report).
| The buffer is: mytransclusion.org
|  Current command: org-transclusion-mode
|  Backtrace:
| "  backtrace-to-string(nil)
|   org-element--cache-sync(# 14)
|   org-element-at-point()
|   org-transclusion-keyword-string-to-plist()
|   org-transclusion-add-all()
|   org-transclusion-mode(toggle)
|   funcall-interactively(org-transclusion-mode toggle)
|   call-interactively(org-transclusion-mode nil nil)
|   command-execute(org-transclusion-mode)
| " Disable showing Disable logging
| Warning (emacs): org-element--cache: Unregistered buffer modifications 
detected. Resetting.
| If this warning appears regularly, please report it to Org mode mailing list 
(M-x org-su

Re: Introducing Org-transclusion

2021-11-05 Thread Uwe Brauer
>>> "NO" == Noboru Ota  writes:

> Uwe Brauer  writes:
>> 1. I can export main.org to say latex and that latex file includes
>> the corresponding content of Russell.

> Sorry, Uwe, I didn't say anything about the first qustion in my previous 
> reply.

> Yes, that's the idea.  The copied text exists in the buffer visiting
> main.org as a read-only copy, so it will be part of export.


Thanks I tried that out works as expected!


smime.p7s
Description: S/MIME cryptographic signature


Re: Introducing Org-transclusion

2021-11-05 Thread Noboru Ota
Uwe Brauer  writes:

> 1. I can export main.org to say latex and that latex file includes
>the corresponding content of Russell.

Sorry, Uwe, I didn't say anything about the first qustion in my previous reply.

Yes, that's the idea.  The copied text exists in the buffer visiting
main.org as a read-only copy, so it will be part of export.

What Org-transclusion does is to remove all the translusions temporarily
on save-buffer (using before- and after-save hooks) to keep the file in
the filesystem clear of the transcluded copies -- only the #+transclude
keywords remain in the file.

Noboru



Re: Introducing Org-transclusion

2021-11-05 Thread Noboru Ota
Timothy  writes:

> It’s worth noting that currently Org’s minimum supported Emacs version is 25. 
> Do
> you use much from Emacs 26/27? There was mention of compat.el earlier though,
> and if that goes somewhere this may not be an issue.

Thank you, Timothy.  I take it that support for version 25 to be a
prerequsite for Org-transclusion to be included in Org.

It never occured to me; thanks for pointing it out.  I will need to
check -- it was just my development was done mainly on 27.

Does this mean Org contributors have different versions of Emacs (25,
26, 27...) and test their patches in every version?  Do you know?

Noboru



Re: Introducing Org-transclusion

2021-11-05 Thread Noboru Ota
Uwe Brauer  writes:

> If I include the content of another org file (say Russell) into my
> main.org file
>
> 1. I can export main.org to say latex and that latex file includes
>the corresponding content of Russell.
> 2. It is a one way bridge, I cannot modify the content of Russell in
>main.org, right?

You can.  Put your point on the read-only copied text content in
main.org (transcluded text) and press "e" to call the
"org-transclusion-live-sync-start" command.  The transcluded text and
source will get an overlay, which lets you edit and sync the changed
content real-time. This works both ways.

There are some restrictions if the source file is Org file; you will get
a message telling you that you cannot activate live-sync for these
cases.  This is due to the way I use Org elements.  I might be able to
find a way later with this helpful community.  The restriction is
documented in the docstring of the "live-sync-start" command.  Here is
an excerpt:

For transclusions of Org elements or a buffer, live-sync works
only on the following elements: center-block, drawer,
dynamic-block, latex-environment, paragraph, plain-list,
quote-block, special-block table, and verse-block.

Let me know if you have more questions. Thank you for taking interest :)

Noboru



Re: [PATCH] c-csl : accept relative CSL filenames

2021-11-05 Thread Emmanuel Charpentier
Quintus' example illustrates why I think my proposed patch is useful
(or, rather, will be when corrected :-)), and why the order of research
should be from most-specific to less-specific.

If a finename is not absolute, search :
1. relatively to the buffer's default directory
2. if 1. unsuccessfull, relatively to`org-cite-csl-styles-dir'
3. if 2. unsuccessfull, relatively to emacs' default directory
   (BTW : what is this ? How to retrieve it ?)
4. if 3. unsuccessfull, fail.

BTW : my current code does *not* work, and I do not understand why my
test used to succeed... A better patch will follow ( but not
tonight...).

HTH,

--
Emmanuel Charpentier




Re: Introducing Org-transclusion

2021-11-05 Thread Uwe Brauer
>>> "NO" == Noboru Ota  writes:

Hi Noboru


> Hi everyone,
> This is my first post to Org mailing list.

> I would like to introduce an add-on package I have been developing for
> about one year and ask for discussion / advice.

> The package is named "Org-transclusion", and is available on GitHub at
> https://github.com/nobiot/org-transclusion.  Simply put, it lets you
> insert a copy of text content via a file link or ID link within an Org
> file.  The GitHub repository contains links short video presentations
> and documentation in detail.

> Judging from feedback from users, it is used for academic writing such
> as PhD dissertation, technical writing with source code embedded as
> transclusions, and note taking.  

I just learned about this interesting package. 

I played a bit with it, one question to be sure.

If I include the content of another org file (say Russell) into my
main.org file

1. I can export main.org to say latex and that latex file includes
   the corresponding content of Russell.

2. It is a one way bridge, I cannot modify the content of Russell in
   main.org, right?

Regards

Uwe Brauer 


smime.p7s
Description: S/MIME cryptographic signature


Re: wrong-type-argument avl-tree- (org-persist-write-all-buffers) [org main + emacs emacs-28]

2021-11-05 Thread Kaushal Modi
On Fri, Nov 5, 2021 at 10:25 AM Ihor Radchenko  wrote:

> Fixed on main. Thanks for reporting!
>

Thanks! I confirm the fix.


Re: Project name change: bibtex-actions -> citar

2021-11-05 Thread Eric S Fraga
On Friday,  5 Nov 2021 at 10:30, Bruce D'Arcus wrote:
> Seems that file is included in auctex. Do you not have it installed?

I do not have auctex installed.  If it's necessary, maybe the melpa
recipe should have it as a dependency?  Or maybe avoid depending on that
package?  Since I moved wholesale to org for writing articles etc. a
very long time ago, I stopped using auctex.

> I had removed the default to bibtex-completion-bibliography, in
> preparation for removing the bibtex-completion dependency.
>
> But no good reason; I'll add that.

Thank you.

One final point (for today): if I M-x customize-group RET citar RET, I
get all kinds of settings that say I shouldn't be seeing...  screenshot
attached.

Thanks again,
eric

-- 
: Eric S Fraga via Emacs 28.0.60, Org release_9.5-192-gd4e192
: Latest paper written in org: https://arxiv.org/abs/2106.05096


[SOLVED] Re: [QUESTION] How to generate org-agenda view for clocked tasks and logs etc which are sorted by timestamps?

2021-11-05 Thread Christopher M. Miles

Ihor Radchenko  writes:

> "Christopher M. Miles"  writes:
>
>> In the source code comment "FIXME" org-agenda always in frontend and popup 
>> buffer. I can't generate
>> org-agenda in background then get the buffer content.
>>
>> Does anybody knows some tricky method for my code?
>
> Maybe wrap agenda call into save-window-excursion?

Thanks for your helpful hint. I finally got a solution:

#+begin_src emacs-lisp
(add-to-list
 'org-agenda-custom-commands
 '("c" "Tody [c]locked tasks."
   ((agenda ""
((org-agenda-ndays 1)
 (org-agenda-span-1)
 (org-agenda-use-time-grid t)
 (org-agenda-include-diary nil)
 (org-agenda-show-log (quote clockcheck))
 (org-agenda-clockreport t))

(let* ((org-agenda-sticky t)
   ;; Run it in background instead of switch to agenda buffer with 
`save-window-excursion'.
   (_ (save-window-excursion (org-agenda nil "c")))
   (origin-buffer (current-buffer))
   (origin-buffer-point (point))
   (agenda-buffer (with-current-buffer "*Org Agenda(c)*"
(buffer-substring (point-min) (point-max)
  (print agenda-buffer))
#+end_src

#+RESULTS[(2021-11-05 21:27:30) 96280334f709aece114a7bf308c1ff4762eff1bf]:
#+begin_example
Day-agenda (W44):
Friday  5 November 2021
  8:00am..  
 10:00am..  
 12:00pm..  
   Feature1:00pm- 1:04pm  Clocked:   (0:04) FEATURE [#A] create an 
org-agenda like view mode for clocking,note logs sorted by timestamps
   Feature1:06pm- 1:38pm  Clocked:   (0:32) FEATURE [#A] create an 
org-agenda like view mode for clocking,note logs sorted by timestamps
  2:00pm..  
  4:00pm..  
  6:00pm..  
  6:28pm..  now - - - - - - - - - - - - - - - - - - - - - - 
- - -
  8:00pm..  
#+end_example

So that I can record those into into Diary.


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

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


signature.asc
Description: PGP signature


Re: Project name change: bibtex-actions -> citar

2021-11-05 Thread Bruce D'Arcus
On Fri, Nov 5, 2021 at 10:23 AM Eric S Fraga  wrote:
>
> On Sunday, 31 Oct 2021 at 18:49, Bruce D'Arcus wrote:
> > For those of you who have been using oc-bibtex-actions with org-cite,
> > two relevant name changes:
> >
> > First, packages are now "citar" and "citar-org", and the melpa recipe 
> > simply "citar".
>
> Hi Bruce,
>
> I decided to try this out.  Installing citar from melpa gives this error:
>
> ,
> | Compiling file 
> /home/ucecesf/.emacs.d/elpa,v28/citar-20211105.1136/citar-latex.el at Fri Nov 
>  5 14:21:17 2021
> | citar-latex.el:39:1: Error: Cannot open load file: No such file or 
> directory, tex
> `

Seems that file is included in auctex. Do you not have it installed?

> Why does citar not use org-cite-global-bibliography by default or if
citar-bibliography is nil?

I had removed the default to bibtex-completion-bibliography, in
preparation for removing the bibtex-completion dependency.

But no good reason; I'll add that.

Bruce



Re: Project name change: bibtex-actions -> citar

2021-11-05 Thread Eric S Fraga
In any case, trying to use citar, the first use tells me:

citar--get-candidates: Make sure to set citar-bibliography and related paths

Why does citar not use org-cite-global-bibliography by default or if
citar-bibliography is nil?

oc-bibtex-actions did not require any settings?

thank you,
eric

-- 
: Eric S Fraga via Emacs 28.0.60, Org release_9.5-192-gd4e192
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: wrong-type-argument avl-tree- (org-persist-write-all-buffers) [org main + emacs emacs-28]

2021-11-05 Thread Ihor Radchenko
Kaushal Modi  writes:

> Hello all,
>
> For few days now, I have been seeing the "wrong-type-argument avl-tree-"
> error when I try to kill a buffer where org-persist has run.
>
> I am seeing this with the latest build of emacs-28 branch plus org main
> branch as of today.
>
> Here's the backtrace:
>
> Debugger entered--Lisp error: (wrong-type-argument avl-tree- nil)
>   avl-tree-mapc(# F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_80> nil)
>   org-element--cache-persist-before-write(org-element--cache #)

Fixed on main. Thanks for reporting!

Best,
Ihor



Re: Project name change: bibtex-actions -> citar

2021-11-05 Thread Eric S Fraga
On Sunday, 31 Oct 2021 at 18:49, Bruce D'Arcus wrote:
> For those of you who have been using oc-bibtex-actions with org-cite,
> two relevant name changes:
>
> First, packages are now "citar" and "citar-org", and the melpa recipe simply 
> "citar".

Hi Bruce,

I decided to try this out.  Installing citar from melpa gives this error:

,
| Compiling file 
/home/ucecesf/.emacs.d/elpa,v28/citar-20211105.1136/citar-latex.el at Fri Nov  
5 14:21:17 2021
| citar-latex.el:39:1: Error: Cannot open load file: No such file or directory, 
tex
`

thank you,
eric

-- 
: Eric S Fraga via Emacs 28.0.60, Org release_9.5-192-gd4e192
: Latest paper written in org: https://arxiv.org/abs/2106.05096



wrong-type-argument avl-tree- (org-persist-write-all-buffers) [org main + emacs emacs-28]

2021-11-05 Thread Kaushal Modi
Hello all,

For few days now, I have been seeing the "wrong-type-argument avl-tree-"
error when I try to kill a buffer where org-persist has run.

I am seeing this with the latest build of emacs-28 branch plus org main
branch as of today.

Here's the backtrace:

Debugger entered--Lisp error: (wrong-type-argument avl-tree- nil)
  avl-tree-mapc(# nil)
  org-element--cache-persist-before-write(org-element--cache #)
  run-hook-with-args-until-success(org-element--cache-persist-before-write
org-element--cache #)
  #f(compiled-function (v) #)(org-element--cache)
  #f(compiled-function (elt) #)(org-element--cache)
  mapc(#f(compiled-function (elt) #)
(org-element--headline-cache org-element--cache))
  seq-do(#f(compiled-function (elt) #)
(org-element--headline-cache org-element--cache))
  seq-find(#f(compiled-function (v) #)
(org-element--headline-cache org-element--cache))
  org-persist-write((org-element--headline-cache org-element--cache)
#)
  org-persist-write-all(#)
  org-persist-write-all-buffer()
  kill-buffer("NEWS")

Are there any pointers on how to fix this?

Thanks!

--
Kaushal Modi


Re: [BUG] Org V 9.5 error when ~/.cache doesn't exist

2021-11-05 Thread Ihor Radchenko
Kaushal Modi  writes:

> Figured out the problem.. looks like Org main branch doesn't support emacs
> 25.
>
> My build script was building Org for all emacs versions starting from
> version 25. It builds fine if remove the build  for emacs 25. I think I
> missed it somewhere that Org main branch is dropping emacs 25 support.

I am not sure if we are dropping Emacs 25 just yet. However, there is
currently more than one place in Org that does not work on Emacs 25.
See https://list.orgmode.org/87zgqu6081.fsf@localhost/T/#t

If compilation is critical for you, I can make a patch to make things
compile in Emacs 25. Though compatibility layer for xdg is more tricky.
I do not want to do it unless necessary.

Best,
Ihor



Re: [BUG] Org V 9.5 error when ~/.cache doesn't exist

2021-11-05 Thread Kaushal Modi
On Fri, Nov 5, 2021 at 9:27 AM Kaushal Modi  wrote:

> Hello,
>
> On the topic of xdg, I pulled Org from main branch today and tried to
> build it but it's failing with:
>
> org-persist.el:32:1:Error: Cannot open load file: No such file or
> directory, xdg
>
> Anybody else seeing this?
>

Figured out the problem.. looks like Org main branch doesn't support emacs
25.

My build script was building Org for all emacs versions starting from
version 25. It builds fine if remove the build  for emacs 25. I think I
missed it somewhere that Org main branch is dropping emacs 25 support.


Re: [BUG] Org V 9.5 error when ~/.cache doesn't exist

2021-11-05 Thread Kaushal Modi
On Fri, Nov 5, 2021 at 9:27 AM Kaushal Modi  wrote:

> Hello,
>
> On the topic of xdg, I pulled Org from main branch today and tried to
> build it but it's failing with:
>
> org-persist.el:32:1:Error: Cannot open load file: No such file or
> directory, xdg
>
> Anybody else seeing this?
>

To add more context, I am on emacs-28 branch right now.


Re: [BUG] Org V 9.5 error when ~/.cache doesn't exist

2021-11-05 Thread Kaushal Modi
Hello,

On the topic of xdg, I pulled Org from main branch today and tried to build
it but it's failing with:

org-persist.el:32:1:Error: Cannot open load file: No such file or
directory, xdg

Anybody else seeing this?


Re: org-diary

2021-11-05 Thread Eric S Fraga
On Friday,  5 Nov 2021 at 12:56, Colin Baxter 😺 wrote:
> Indeed, that was the purpose. I am the op and I apologise if my attempt
> to highlight my post caused confusion. Perhaps I stick to

Many do this as well (including myself ;-)) although I alternate with
other means of offsetting the code just for the variety... :-)

-- 
: Eric S Fraga via Emacs 28.0.60, Org release_9.5-192-gd4e192
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: org-diary

2021-11-05 Thread Colin Baxter 😺
> Eric S Fraga  writes:

> On Thursday,  4 Nov 2021 at 18:21, Michael Maurer wrote:
>> Oh. I assumed
>> 
>> #+begin_src elisp &%%(org-diary :deadline* :timestamp
>> :scheduled*) #+end_src
>> 
>> is an org-babel code block.

> Yes but I think that was just for the purposes of highlighting the
> sexp in the email/post.

Indeed, that was the purpose. I am the op and I apologise if my attempt
to highlight my post caused confusion. Perhaps I stick to

--8<---cut here---start->8---

M-x message-mark-inserted-region

--8<---cut here---end--->8---


for highlighting.

Best wishes.



Re: [PATCH] c-csl : accept relative CSL filenames

2021-11-05 Thread Eric S Fraga
On Thursday,  4 Nov 2021 at 18:36, Bruce D'Arcus wrote:
> I'm strongly opposed to 2.
>
> 1 seems fine.

I'm with Bruce on this.  I would like to specify a directory for csl
style search that differs from the default directory for Emacs as a
whole.  The latter is already getting rather cluttered these days.

-- 
: Eric S Fraga via Emacs 28.0.60, Org release_9.5-192-gd4e192
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: org-diary

2021-11-05 Thread Eric S Fraga
On Thursday,  4 Nov 2021 at 18:21, Michael Maurer wrote:
> Oh. I assumed
>
> #+begin_src elisp
> &%%(org-diary :deadline* :timestamp :scheduled*)
> #+end_src
>
> is an org-babel code block. 

Yes but I think that was just for the purposes of highlighting the sexp
in the email/post.

-- 
: Eric S Fraga via Emacs 28.0.60, Org release_9.5-192-gd4e192
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: [QUESTION] How to generate org-agenda view for clocked tasks and logs etc which are sorted by timestamps?

2021-11-05 Thread Ihor Radchenko
"Christopher M. Miles"  writes:

> In the source code comment "FIXME" org-agenda always in frontend and popup 
> buffer. I can't generate
> org-agenda in background then get the buffer content.
>
> Does anybody knows some tricky method for my code?

Maybe wrap agenda call into save-window-excursion?



Re: [QUESTION] How to generate org-agenda view for clocked tasks and logs etc which are sorted by timestamps?

2021-11-05 Thread Christopher M. Miles


Russell Adams  writes:

> On Thu, Nov 04, 2021 at 12:16:19PM +0800, stardiviner wrote:
>> How to use elisp code to generate an org-agenda view for clocked tasks and
>> logs etc which are sorted by timestamps? I want to view my daily done tasks
>> and attach them as part of diary (maybe use org source block elisp code to
>> generate output?)
>>
>> So how to setup `org-agenda-custom-commands` to archive this purpose?
>
> I routinely export my agenda to HTML with logbook mode enabled and
> inactive timestamps. This shows a complete timeline of my actions.  I
> save timestamps on changing TODO to DONE, use active timestamps for
> appointments, and I constantly add inactive timestamps while taking
> notes. I use this to justify billing to clients.
>
> I open the agenda, v m to make a monthly view, L for logbook, ] to
> enable inactive timestamps, and then C-x C-w to save. You may be able
> to just use elisp to trigger these actions.
>
> I don't do it often enough to automate it. I love being able to
> flatten my tree of notes into a timeline this way.
>
> --
> Russell Adamsrlad...@adamsinfoserv.com
>
> PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/
>
> Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

Russell, Thanks for your hint.

I have a prototype code now, but still have problem.

#+begin_src emacs-lisp
(add-to-list
 'org-agenda-custom-commands
 '("c" "Tody [c]locked tasks."
   ((agenda ""
((org-agenda-ndays 1)
 (org-agenda-span-1)
 (org-agenda-use-time-grid t)
 (org-agenda-include-diary nil)
 (org-agenda-show-log (quote clockcheck))
 (org-agenda-clockreport t))
#+end_src

#+begin_src emacs-lisp
(let* ((org-agenda-sticky t)
   ;; FIXME how to run it in background instead of switch to agenda buffer.
   (_ (org-agenda nil "c"))
   (origin-buffer (current-buffer))
   (origin-buffer-point (point))
   (agenda-buffer (with-current-buffer "*Org Agenda(c)*"
(buffer-substring (point-min) (point-max)
  (switch-to-buffer origin-buffer)
  (with-current-buffer origin-buffer
(goto-char origin-buffer-point)
(insert agenda-buffer)))
#+end_src

In the source code comment "FIXME" org-agenda always in frontend and popup 
buffer. I can't generate
org-agenda in background then get the buffer content.

Does anybody knows some tricky method for my code?



<#secure method=pgpmime mode=sign>
-- 
[ stardiviner ]
   I try to make every word tell the meaning that I want to express.

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


Re: [PATCH] c-csl : accept relative CSL filenames

2021-11-05 Thread M . ‘quintus’ Gülker
Am Donnerstag, dem 04. November 2021 schrieb Nicolas Goaziou:
> I think there are two ways forward when a relative file name is used:
>
> 1. First check `org-cite-csl-styles-dir' and, if it is nil, expand
>against `default-directory';
>
> 2. Drop `org-cite-csl-styles-dir' and always expand against
>`default-directory'.
>
>  What do oc-csl users think about it?

On the risk that I do not entirely understand the dispute: I would like
to specify relative CSL files. Currently I work on a commentary which
has its own, specific citation guide lines, that is, I need a custom
specific CSL style just for this project. Naturally I store this CSL
file along the .org file in the same directory. I can specify its file
name as an absolute file name (which is what I do currently), but it
would be easier and immune to moving the folder around on my PC if it
could be a relative name. It would also help in creating minimal working
examples for bug reports, which currently require org maintainers to
adapt the path to the CSL file specified.

That would probably mean option 1. Option 2 seems extreme; while I have
not yet accumulated a reasonable collection of CSL files for the German
law journals, I suppose it will happen at some point, in which case it
will come in handy. Still, for the sake of archiving the .org files in a
working state, I may still want to be able to store the CSL file along
with the .org file. After all, the CSL file may be modified later on and
then it may not be possible to re-export the .org file. Having both the
CSL file and the .org file together (in one repository, for instance)
may seem preferable to me. It however is all too new to me to make a
final judgment on this question.

What about a third option: If `org-cite-csl-styles-dir' is not nil,
check if it resolves to an existing file; if no such file exists, expand
against `default-directory'. If `org-cite-csl-styles-dir' is nil, expand
against `default-directory'.

  -quintus

-- 
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kont...@guelker.eu| O<



Re: [PATCH] Re: New source block results option for attaching file to node

2021-11-05 Thread Ryan Scott
Here's my latest patch.
Uses special :dir value 'attach to use attachment directory as working dir.
Now prompts to create IDs for nodes that are missing.
Solved a handful of issues with my previous versions of this and I've been
using it regularly for a bit now.

I've added documentation and completed the copyright assignment to the FSF.

On Mon, Oct 4, 2021 at 6:05 PM Ryan Scott  wrote:

> I've been working through a few different approaches. What's shaping up is
> something more general, having a special value for directory parameters
> (i.e. 'attach) and auto-detection of link paths that are in the attachment
> directory.
> The latest iterations don't move any files around, so can't actually
> enforce the output directory. That makes it safer overall as with my
> initial patch if you were to return a path to something you *didn't* want
> moved to your attachment directory you might get very surprising results.
>
> I'll post a new patch with a different approach in a little bit.
>
> On Mon, Oct 4, 2021 at 5:06 PM Christopher M. Miles 
> wrote:
>
>> Ihor Radchenko  writes:
>>
>> Greg Minshall  writes:
>>>
>>> i can imagine wanting to have input files and output files in separate
 directories. (for ease in "make clean", if for no other conceptual reason.)
 (but, probably i don't understand.)

>>> I agree with this thought. We should separate two directories.
>>
>> Makes sense. Currently, there is :dir header arg to set working directory
>>> (aka input files directory). Maybe we can introduce something like
>>> :results-dir header arg to set the output directory? It's value can be a
>>> directory path or symbol 'attach.
>>>
>>> `:results file :results-dir 'attach` will be equivalent of `:results
>>> file attach` in the patch proposed by Ryan Scott.
>>>
>>> WDYT?
>>>
>> I agree with this idea. Use :results-dir 'attach is better.
>>
>> Will the patch be updated?
>>
>> Best, Ihor
>>>
>>
>> <#secure method=pgpmime mode=sign>
>> --
>> [ stardiviner ]
>>I try to make every word tell the meaning that I want to express.
>>
>>Blog: https://stardiviner.github.io/
>>IRC(freenode): stardiviner, Matrix: stardiviner
>>GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
>>
>


org-src-block-results-attach-dir.patch
Description: Binary data