Re: Links to javascript-based websites from orgmode.org: Paypal and Github

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

  > GNU Taler requires an intermediary to clear the coins.

I am not sure what that means.  Could you state in different words
what job that "intermediary" would do?

In fact, the Taler developers are hoping that banks will play two
roles: issuing Taler tokens to spend, and redeeming those that people
receive as payment.

   This would again
  > be where a platform like liberapay would come in.

I don't know whether that is possible -- I suggest you talk with the Taler
developers about it.

  > To take up criticism before it becomes a discussion: While Github is
  > annoying, you can read it without running proprietary Javascript (I just
  > checked that by opening it in eww), and you can interact with it using
  > email.

See https://www.gnu.org/software/repo-criteria-evaluation.html for what's
wrong with Github.  Some actions, such as creating an account, appear
to require running nonfree JS code.

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





Re: Links to javascript-based websites from orgmode.org: Paypal and Github

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

  > > As it happens though, Stripe seem to have open sourced all of their 
frontend
  > > code — all of these repos  seem to be 
MIT-licensed

Wow!  If that is what it might be, it would be great news.  But we had
better verify it carefully, because it sounds too good to be true.
Would someone like to check the details thoroughly?

Here are some questions to check:

1. Does "front-end code" mean the JavasCript code for their payment
pages?  Or else, what is it?  Is it code to use in apps?  The case that
we're concerned with is payment to web sites.

2. Did their release include _all_ of the client code that a user
must run in order to make a payment to a web site that uses Stripe?

3. Do their payment pages actually send that source code, as released?
Or do they send use minified or a compiled version?
Either way. does it exactly correspond to the released source code?

4. Did they label the code they send, for LibreJS to recognize?

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





Re: We have asynchronous sessions, why have anything else?

2022-07-05 Thread Ivar Fredholm
Hi Ihor, I have a prototype of what I mentioned earlier, at least for python. 
This supports asynchronous, synchronous, session, and session-less blocks. It's 
pretty messy but it helps to illustrate what I had in mind. Let me know what 
you think.




Sent with Proton Mail secure email.

--- Original Message ---
On Monday, June 27th, 2022 at 4:56 AM, Ihor Radchenko  
wrote:


> Ivar Fredholm freddyho...@protonmail.com writes:
>
> > I believe the two could be unified if we expand the functionality of
> > the async filter to look for 'exception' tags. Then each language
> > implementation must only put the org-babel src block in a try-except
> > type construction and put the error message into the except block.
>
>
> I am not even sure if all the babel backends support try-except.
> Think about ob-gnuplot or, say, ob-latex.
>
> Best,
> Ihor(defun eval-file (file)
  (with-temp-buffer
(insert-file-contents file)
(eval-buffer)))
(eval-file "~/new_org/org-mode/lisp/ob-core.el")
(eval-file "~/new_org/org-mode/lisp/ob-comint.el")
(eval-file "~/new_org/org-mode/lisp/ob-python.el")
(eval-file "~/new_org/org-mode/lisp/org-attach.el")

(require 'subr-x)
(require 'eieio)
(require 'cl-lib)


(defvar org-babel-session-list nil
  "List of all sessions")

(defvar org-babel-shell-buffers nil
  "List of interpreter buffers. This gets garbage collected every
  time a source block is run. Any process-less buffer gets deleted.")


(defclass latch ()
  ((process :initform (start-process "latch" nil nil))
   (value :initform nil))
  :documentation "A blocking latch that can be used any number of times.")

(cl-defmethod wait ((latch latch)  timeout)
  "Blocking wait on LATCH for a corresponding `notify', returning
the value passed by the notification. Wait at most TIMEOUT
seconds (float allowed), returning nil if the timeout was reached
with no input. The Emacs display will not update during this
period but I/O and timers will continue to run."
  (accept-process-output (slot-value latch 'process) timeout)
  (slot-value latch 'value))

(cl-defmethod notify ((latch latch)  value)
  "Release all execution contexts waiting on LATCH, passing them VALUE."
  (setf (slot-value latch 'value) value)
  (process-send-string (slot-value latch 'process) "\n"))

(cl-defmethod destroy ((latch latch))
  "Destroy a latch, since they can't be fully memory managed."
  (ignore-errors
(delete-process (slot-value latch 'process

(defun make-latch ()
  "Make a latch which can be used any number of times. It must be
`destroy'ed when no longer used, because the underlying process
will not be garbage collected."
  (make-instance 'latch))

(defun destroy-all-latches ()
  "Destroy all known latches."
  (cl-loop for process in (process-list)
   when (string-match-p "latch\\(<[0-9]+>\\)?" (process-name process))
   do (delete-process process)))

;; Code for the administration of sessions and their processes.

(defclass org-babel-session ()
  ((name :initarg :name
	 :documentation "Name of the session, should be unique on
	 a per-language basis or 'none' if the associated source
	 block is session-less.")
   (language :initarg :language
	 :documentation "The language for the source block
	 associated to this session.")
   (is-none :initform nil
	:documentation "Indicates whether we should delete
   the session once it has finished executing its source block.")
   (unique-id :initform ""
	  :documentation "This is the unique process
   identifier for the session.")
   (process :initform nil
	:documentation "The interpreter or shell for the
   session.")
   (buffer :initform nil
	   :documentation "The buffer associated with process")
   (ready-for-input :initform nil
		:documentation "A variable indicating whether
   the interpreter is ready to accept more input.")
   (input-latch :initform nil
		:documentation "A latch that blocks execution
   until the interpreter has finished processing the current
   input. This is used to emulate synchronous blocks using the
   asynchronous process filter.")
   (indicator-regexp :initform nil
		 :documentation "Holds the indicator regexp
		 that the async filter will look for in the
		 comint output. The user must define this on
		 a per-language basis by defining a
		 `org-babel-async-indicator:LANG' constant.")
   (org-buffers :initform nil
		:documentation "A list of buffers to look through
		when searching for a place to insert the results
		of a source block.")
   (async :initform nil
	  :documentation "Tell the process whether to notify its
	  latch when ready for input or not")
   (current-dangling :initform ""
		 :documentation "Holds the most recent text
		 provided by the interpreter in case of
		 output buffering."))
  "To implement concrete classes of this class, one must first
  define: a session initializer which launches an interpreter,
  and a method to asynchronously send input to said
  interpreter. Language 

[SOMEDAY] Re: [BUG] inline src_lang code is not fontified on headline

2022-07-05 Thread Christopher M. Miles

Ihor Radchenko  writes:

> "Christopher M. Miles"  writes:
>
>> The src_lang code fontification is normal in content, but not correctly
>> fontified on headline.
>>
>> There is a screenshot in attachment.
>
> Thanks for reporting!
> Note that a major rewrite of Org fontification is WIP.
> See https://orgmode.org/list/87ee7c9quk.fsf@localhost
>
> AFAIU, your example should work correctly with the new fontification.
> You can check yourself using the WIP feature/org-font-lock-element
> branch from https://github.com/yantar92/org
>
> Best,
> Ihor

Thanks for answer, I checked out the feature/org-font-lock-element
branch on GitHub repo, and wait for it be fixed.

-- 
[ 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: [BUG] [PATCH] Ensure org-babel-temporary-stable-directory bound-and-true [9.6 (9.6-g713598 @ /home/n/.emacs.d/elpaca/builds/org/)]

2022-07-05 Thread No Wayman


Sorry, that symbol should not be quoted in the patch. 
Amended attached.


>From 87c400fa8cb3ffa9b4fcf1f958feab4506194a81 Mon Sep 17 00:00:00 2001
From: Nicholas Vollmer 
Date: Tue, 5 Jul 2022 19:03:44 -0400
Subject: [PATCH] lisp/ob-core.el: fix file-exists-p error

* ob-core.el (org-babel-remove-temporary-stable-directory):
Ensure org-babel-temporary-stable-directory is non-nil before checking
if it is on disk. Otherwise an error is thrown during kill-emacs-hook.
---
 lisp/ob-core.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 6c379c12..a97c0eba 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -3264,7 +3264,7 @@ constructed like the following: PREFIXDATAhashSUFFIX."
 
 (defun org-babel-remove-temporary-stable-directory ()
   "Remove `org-babel-temporary-stable-directory' and on Emacs shutdown."
-  (when (and (boundp 'org-babel-temporary-stable-directory)
+  (when (and (bound-and-true-p org-babel-temporary-stable-directory)
 	 (file-exists-p org-babel-temporary-stable-directory))
 (let ((org-babel-temporary-directory
org-babel-temporary-stable-directory))
-- 
2.37.0



[BUG] [PATCH] Ensure org-babel-temporary-stable-directory bound-and-true [9.6 (9.6-g713598 @ /home/n/.emacs.d/elpaca/builds/org/)]

2022-07-05 Thread No Wayman


Updated today and noticed an error when killing Emacs.
See attached.

>From fa822d45559267de6af31f9d34be4266af602d03 Mon Sep 17 00:00:00 2001
From: Nicholas Vollmer 
Date: Tue, 5 Jul 2022 19:03:44 -0400
Subject: [PATCH] lisp/ob-core.el: fix file-exists-p error

* ob-core.el (org-babel-remove-temporary-stable-directory):
Ensure org-babel-temporary-stable-directory is non-nil before checking
if it is on disk. Otherwise an error is thrown during kill-emacs-hook.
---
 lisp/ob-core.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 6c379c121..22175a911 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -3264,7 +3264,7 @@ constructed like the following: PREFIXDATAhashSUFFIX."
 
 (defun org-babel-remove-temporary-stable-directory ()
   "Remove `org-babel-temporary-stable-directory' and on Emacs shutdown."
-  (when (and (boundp 'org-babel-temporary-stable-directory)
+  (when (and (bound-and-true-p 'org-babel-temporary-stable-directory)
 	 (file-exists-p org-babel-temporary-stable-directory))
 (let ((org-babel-temporary-directory
org-babel-temporary-stable-directory))
-- 
2.37.0



Re: [PATCH] oc-csl: Add support for nocite citations

2022-07-05 Thread Bruce D'Arcus
On Tue, Jul 5, 2022 at 3:28 PM Bruce D'Arcus  wrote:

> > Except, and I'm not sure if I'm misunderstanding some org detail, but
> > this doesn't suppress the global bibliography. Should it?
>
> Yes, and it does in oc-biblatex.

Sorry for the noise; disregard.

It was something with my testing setup.

Bruce



Re: [PATCH] oc-csl: Add support for nocite citations

2022-07-05 Thread Bruce D'Arcus
On Tue, Jul 5, 2022 at 3:17 PM Bruce D'Arcus  wrote:
>
> On Mon, Jul 4, 2022 at 7:54 AM Ihor Radchenko  wrote:
>
> > Since the fontification part appears to be unrelated to this particular
> > patch, I'd like to ask people who use CSL to test the patch.
>
> I just tested it, and it works as expected.
>
> Except, and I'm not sure if I'm misunderstanding some org detail, but
> this doesn't suppress the global bibliography. Should it?

Yes, and it does in oc-biblatex.

Bruce



Re: [PATCH] oc-csl: Add support for nocite citations

2022-07-05 Thread Bruce D'Arcus
On Mon, Jul 4, 2022 at 7:54 AM Ihor Radchenko  wrote:

> Since the fontification part appears to be unrelated to this particular
> patch, I'd like to ask people who use CSL to test the patch.

I just tested it, and it works as expected.

Except, and I'm not sure if I'm misunderstanding some org detail, but
this doesn't suppress the global bibliography. Should it?

#+bibliography: test.bib
#+cite_export: csl
[cite/nocite:@*]
#+print_bibliography:

# Local Variables:
# org-cite-global-bibliography: nil
# End:

Bruce



Re: wrong type argument with latest org and latest emacs

2022-07-05 Thread Colin Baxter
> Colin Baxter  writes:

> Ihor Radchenko  writes:
>> Colin Baxter  writes:
>>> I'm sending this to emacs.orgmode and emacs.devel lists.
>>> 
>>> With the latest emacs:
>>> 
>>> 
>>> Debugger entered--Lisp error: (wrong-type-argument stringp
>>> (wrong-type-argument stringp nil))
>>> format-message((wrong-type-argument stringp nil))
>>> apply(format-message (wrong-type-argument stringp nil))
>>> error((wrong-type-argument stringp nil)) #f(compiled-function
>>> (fun) # )(org-babel-remove-temporary-stable-directory)
>>> run-hook-wrapped(#f(compiled-function (fun) # ) org-babel-remove-temporary-stable-directory)

>> Thanks for reporting!  This likely caused by recent commit of
>> mine on systems with no write access to remote directory (at
>> least, I am unable to reproduce the steps on my system).

>> Can you please try the attached patch?

>> Best, Ihor

>> From ddf6278e8fcbaa4939539277b111061b7c00f550 Mon Sep 17 00:00:00
>> 2001 Message-Id:
>> 

>> From: Ihor Radchenko  Date: Tue, 5 Jul 2022
>> 21:00:24 +0800 Subject: [PATCH] ob-core: Fix nil value of
>> `org-babel-temporary-stable-directory'

>> * lisp/ob-core.el: Fallback the value of
>> `org-babel-temporary-stable-directory' to
>> `org-babel-temporary-directory' if there are issues with
>> directory creation.

>> Fixes https://yhetil.org/emacs-devel/87sfnfhm6v@yandex.com
>> --- lisp/ob-core.el | 3 ++- 1 file changed, 2 insertions(+), 1
>> deletion(-)

>> diff --git a/lisp/ob-core.el b/lisp/ob-core.el index
>> 6c379c121..aaf895d74 100644 --- a/lisp/ob-core.el +++
>> b/lisp/ob-core.el @@ -3167,7 +3167,8 @@ (defvar
>> org-babel-temporary-stable-directory (expand-file-name
>> "babel-stable" (temporary-file-directory))) - (t nil))) + ;;
>> Fallback if things do not work.  + (t
>> org-babel-temporary-directory))) "Directory to hold temporary
>> files created to execute code blocks.  Used by
>> `org-babel-temp-file'.  This directory will be removed on Emacs
>> shutdown."))  -- 2.35.1

> Ok, that patch seems to solve the issue. I have applied the patch
> and I now get now error message when I close down emacs-29.0.50.

Typo! That's no error, not now error.

Best wishes,





Re: wrong type argument with latest org and latest emacs

2022-07-05 Thread Colin Baxter
> Ihor Radchenko  writes:

> Colin Baxter  writes:
>> I'm sending this to emacs.orgmode and emacs.devel lists.
>> 
>> With the latest emacs:
>> 
>> 
>> Debugger entered--Lisp error: (wrong-type-argument stringp
>> (wrong-type-argument stringp nil))
>> format-message((wrong-type-argument stringp nil))
>> apply(format-message (wrong-type-argument stringp nil))
>> error((wrong-type-argument stringp nil)) #f(compiled-function
>> (fun) # )(org-babel-remove-temporary-stable-directory)
>> run-hook-wrapped(#f(compiled-function (fun) # ) org-babel-remove-temporary-stable-directory)

> Thanks for reporting!  This likely caused by recent commit of mine
> on systems with no write access to remote directory (at least, I
> am unable to reproduce the steps on my system).

> Can you please try the attached patch?

> Best, Ihor

> From ddf6278e8fcbaa4939539277b111061b7c00f550 Mon Sep 17 00:00:00
> 2001 Message-Id:
> 

> From: Ihor Radchenko  Date: Tue, 5 Jul 2022
> 21:00:24 +0800 Subject: [PATCH] ob-core: Fix nil value of
> `org-babel-temporary-stable-directory'

> * lisp/ob-core.el: Fallback the value of
> `org-babel-temporary-stable-directory' to
> `org-babel-temporary-directory' if there are issues with directory
> creation.

> Fixes https://yhetil.org/emacs-devel/87sfnfhm6v@yandex.com ---
> lisp/ob-core.el | 3 ++- 1 file changed, 2 insertions(+), 1
> deletion(-)

> diff --git a/lisp/ob-core.el b/lisp/ob-core.el index
> 6c379c121..aaf895d74 100644 --- a/lisp/ob-core.el +++
> b/lisp/ob-core.el @@ -3167,7 +3167,8 @@ (defvar
> org-babel-temporary-stable-directory (expand-file-name
> "babel-stable" (temporary-file-directory))) - (t nil))) + ;;
> Fallback if things do not work.  + (t
> org-babel-temporary-directory))) "Directory to hold temporary
> files created to execute code blocks.  Used by
> `org-babel-temp-file'.  This directory will be removed on Emacs
> shutdown."))  -- 2.35.1

Ok, that patch seems to solve the issue. I have applied the patch and I
now get now error message when I close down emacs-29.0.50.

Thank you.

Best wishes,



Re: Fw: org-mime-htmlize

2022-07-05 Thread Joseph Vidal-Rosset
Many thanks John. It  works perfectly now, as you can see it in my first
reply. I cc. this second reply to the list, it can be useful for others.

All the best, and again thanks for your generous help !

Jo.

Le 05/07/2022 à 18:39, John Kitchin a écrit :
> you probably have to do this via CSL now:
>
> (setq  org-export-before-parsing-hook '(org-ref-csl-preprocess-buffer))
>
>
> John

> --- Original Message ---
> Le lundi 4 juillet 2022 à 09:55, Joseph Vidal-Rosset
> mailto:jos...@vidal-rosset.net>> a écrit :
>
>> Hello,
>>
>> I noticed that org-mime-htmlize that I use sometimes with Gnus to
>> send email with formulas in .png format and bibliographical
>> references does no longer work for bibliographical references as
>> it did before.
>>
>> Example of citation :  
>>
>> I do not know why it does not work, and I try to get and export
>> with bibliographical references inside an email. I’m using org-ref 3.
>>
>> Your help is welcome,
>>
>> All the best,
>>
>> Jo.
>>
>> /home/joseph/Dropbox/myblog/blog.bib
>> 
>>
>




Re: Org links and Flatpak firefox

2022-07-05 Thread Max Nikulin

On 03/07/2022 20:25, Ken Mankoff wrote:

Emacs opens URLs in the last-active (from the UI perspective) firefox,
even if there is a firefox on the current virtual desktop.


Is it Emacs of Firefox behavior? However it is not trivial to choose 
which window should be used to open a new URL if a couple of monitors, 
virtual desktops, and contextual identities are involved.



I had "browse-url-generic-program" set to a script that used xdotool to
find if there was a firefox on this desktop, and then sent the URL
there. xdotool doesn't play nice withe flatpak, and that was the problem.


I am not an X11 expert but it sounds strange. The protocol is designed 
to work across network, so it should not matter whether some application 
is running from flatpak. May it happen that after upgrade Wayland 
session is used instead of X11? Though in such case I would expect that 
xdotool should be rather broken due to stricter security model.


Out of curiosity, what is the reason why you are avoiding firefox as a 
snap package? It should be tested better on Ubuntu. I do not like it 
because instead of decentralized apt mirrors it forces to use fixed 
source of packages, upgrade policy is not clear to me as well. My 
impression is that priorities related to application isolation is not 
consistent with my expectations. I understand reasons behind decision of 
Canonical to drop .deb package, but I still do not like them: browser 
packages are too expensive to build, not to mention long time support 
promise conflict with desire of developers to use modern tools.





[feature] Consistent fixed indentation of headline data

2022-07-05 Thread Valentin Lab

Hi everybody,

I'm using org-mode for a long time, and I never understood quite well 
how headline data were supposed to be indented, however I was happy with 
what emerged to me as the default of 2 spaces (with my emacs and 
org-mode version at the time). I recently updated my old emacs to 
=9.5.3=, and what I thought was a default indentation was removed.


Suddenly, I had no indentation at all for these headline-data and this 
bugged me.


I went through documentation, and code, and (re-)discovered 
`org-adapt-indentation' that was nil in my case and is intended to stay 
this way as far as I am concerned : I'm looking for a fixed indentation 
whatever the depth of my outlines.


I'm far from sure it was a default one day, but sure it was at least 
suggested/enforced in my workflow with my emacs at some time. And even 
if it didn't feel like it was clad in iron, it seems I'm not the only 
one who was using that as I can find some examples remaining in the 
current 'testing/examples' org files.


This indentation concerns only what is called "headline data" in the 
documentation of `org-adapt-indentation'. To be precise: schedules 
("SCHEDULE:", "DEADLINE:"...), clock drawer (":LOGBOOK:..."), property 
drawer (":PROPERTY:..."). These are "data" appearing after the headline 
as I understand them.


If I'm a user of org-mode, I'm fairly new in the emacs lisp and hacking 
community and I need to know:

- if my proposal is useful and has any chance to be accepted,
- if there are any pitfalls I delved into in matter of coding, 
conventions, ...

- if it make sense for others to include this,

Many thanks !
From 54ee0ce45c4a0c31a8a701047d4d56c1592fb5bb Mon Sep 17 00:00:00 2001
From: Valentin Lab 
Date: Fri, 1 Jul 2022 14:03:41 +0200
Subject: [PATCH] org-el: Add fixed indentation of headline data

* lisp/org.el (org-headline-data-fixed-indent-level): Definition of
new customizable variable and doc.
(org-add-planning-info): When creating planning line, force a
`org-indent-line' to indent it correctly.
(org--get-expected-indentation): If variable
`org-headline-data-fixed-indent-level' is set and line is header,
inform `org-indent-line' to indent from specified amount.
(org-adapt-indentation): Update documentation to mention new
`org-headline-data-fixed-indent-level'.

TINYCHANGE

Signed-off-by: Valentin Lab 
---
 lisp/org.el  |  22 ++-
 testing/lisp/test-org.el | 139 +++
 2 files changed, 159 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 38a50d231..377a54edd 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -1428,7 +1428,8 @@ The following issues are influenced by this variable:
   indentation is not changed at all.
 
 - Property drawers and planning information is inserted indented
-  when this variable is set.  When nil, they will not be indented.
+  when this variable is set.  When nil, they will be indented
+  following `org-headline-data-fixed-indent-level'.
 
 - TAB indents a line relative to current level.  The lines below
   a headline will be indented when this variable is set to t.
@@ -1445,6 +1446,19 @@ time in Emacs."
 	  (const :tag "Do not adapt indentation at all" nil))
   :safe (lambda (x) (memq x '(t nil headline-data
 
+(defcustom org-headline-data-fixed-indent-level nil
+  "Indentation level for org property drawer.
+
+`org-adapt-indentation' need to be set to nil for this value
+to be considered.
+
+Note that this is all about true indentation, by adding and
+removing space characters.  See also \"org-indent.el\" which does
+level-dependent indentation in a virtual way, i.e. at display
+time in Emacs."
+  :group 'org-edit-structure
+  :type 'integer)
+
 (defvaralias 'org-special-ctrl-a 'org-special-ctrl-a/e)
 
 (defcustom org-special-ctrl-a/e nil
@@ -10060,7 +10074,8 @@ WHAT entry will also be removed."
 		(eq what 'closed)
 		nil nil (list org-end-time-was-given
 	   (unless (eolp) (insert " "))
-	   ts))
+	   ts))
+(org-indent-line)
 
 (defvar org-log-note-marker (make-marker)
   "Marker pointing at the entry where the note is to be inserted.")
@@ -18371,6 +18386,9 @@ ELEMENT."
 			;; a footnote definition.
 			(org--get-expected-indentation
 			 (org-element-property :parent previous) t))
+  ((and (not (eq org-headline-data-fixed-indent-level nil))
+ (memq type '(drawer property-drawer planning node-property clock)))
+ org-headline-data-fixed-indent-level)
   ;; Otherwise, move to the first non-blank line above.
   (t
(beginning-of-line)
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index fcf2d0b5f..600d647e4 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -1069,6 +1069,49 @@
 	 " #+BEGIN_CENTER\n  Contents\n#+END_CENTER"
 	 (org-indent-line)
 	 (org-get-indentation)
+  (let ((org-adapt-indentation nil)
+ (org-headline-data-fixed-indent-level 3))
+(should
+ ;; 

Re: [BUG] archiving subtrees archives adjacent / on the same level below subtrees instead of just the subtree itself + any below [9.6 (9.6-??-971eb6885 @ /home/riccardo/.emacs.d/.local/straight/build-

2022-07-05 Thread Ihor Radchenko
Riccardo Varenna  writes:

> When trying to archive a subtree it regularly happens that instead of
> just the intended subtree, other subtrees get archived as well. As an
> example:

Thanks for reporting!
The backtrace like yours did happen in the earlier Org commits and has
been fixed.

Please try to update Org mode to the latest version and let us know if
the problem remains. Your current version is 3 months old.

Best,
Ihor



[BUG] org-agenda passes current-prefix-arg to commands instead of arg [9.5.3 (9.5.3-g69c588 @ /Users/stas/.emacs.d/straight/build/org/)]

2022-07-05 Thread stasvlasov


`org-agenda' function passes `current-prefix-arg' to its commands (e.g., 
`org-agenda-tags') instead of `arg'

This might create unexpected behaviour if one uses `org-agenda' function inside 
another interactive function that accepts on universal prefix. For example if I 
define `my/agenda-done-todos' it wont show any DONE todos if I call it with 
prefix to restrict it to current buffer because `org-agenda-tags' will be 
limited only to active todos by `current-prefix-arg' and this will always 
produce empty set:

(add-to-list 'org-agenda-custom-commands
 '("d" "DONE todos"
   tags "TODO=\"DONE\""))

(defun my/agenda-done-todos (arg)
  "Show agenda for keyword 'd' (DONE todos). With ARG prefix restrict to 
current buffer."
  (interactive "P")
  (if arg
  (org-agenda nil "d" 'buffer)
(org-agenda nil "d")))

Emacs  : GNU Emacs 28.1 (build 1, x86_64-apple-darwin19.6.0, NS appkit-1894.60 
Version 10.15.7 (Build 19H1519))
 of 2022-05-07
Package: Org mode version 9.5.3 (9.5.3-g69c588 @ 
/Users/stas/.emacs.d/straight/build/org/)



[BUG] archiving subtrees archives adjacent / on the same level below subtrees instead of just the subtree itself + any below [9.6 (9.6-??-971eb6885 @ /home/riccardo/.emacs.d/.local/straight/build-27.2

2022-07-05 Thread Riccardo Varenna

--text follows this line--

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

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

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


When trying to archive a subtree it regularly happens that instead of
just the intended subtree, other subtrees get archived as well. As an
example:

* A
** B
** C

when trying to archive B using org-archive-subtree instead of just B
getting archived, C often gets archived as well.

Occasionally I get a warning when this happens, I will attach the logs
for that below, but more often it doesn't even give a warning when this
happens.

Most likely this is somehow related to the org-element-cache. I see it
happen more often when I fold / unfold subsections or when the tree I
want to archive is unfolded. Most of my subheadings have properties like 
this:

:PROPERTIES:
:CREATED:  [2022-07-01 Fr 01:00]
:END:

which are automatically added when I create a new heading.

Thank you very much for looking into this problem, as I haven't found a
solution myself.

=== attached logs

Warning (org-element-cache): org-element--cache: (org-archive-subtree) 
Cached element is incorrect in todo.org. (Cache tic up to date: "yes") 
Resetting.
If this warning appears regularly, please report the warning text to Org 
mode mailing list (M-x org-submit-bug-report).
The element is: "(headline (:raw-value \"get back to Xan\" :begin 52350 
:end 52624 :pre-blank 0 :contents-begin 52379 :contents-end 52624 
:robust-begin 52430 :robust-end 52622 :level 2 :priority 66 :tags nil 
:todo-keyword #(\"DONE\" 0 4 (line-prefix #(\"*\" 0 1 ...) wrap-prefix 
#(\"*** \" 0 1 ... 1 4 ...) ws-butler-chg chg fontified nil face 
(org-done org-done org-level-2) org-todo-head #(\"TODO\" 0 4 ...))) 
:todo-type done :post-blank 0 :footnote-section-p nil :archivedp nil 
:commentedp nil :post-affiliated 52350 :CREATED \"[2022-06-30 Do 
22:31]\" :title (#(\"get back to Xan\" 0 15 (:parent ...))) :mode nil 
:granularity nil :parent (headline (:raw-value \"Quick\" :begin 51758 
:end 52823 :pre-blank 0 :contents-begin 51766 :contents-end 52823 
:robust-begin 51768 :robust-end 52821 :level 1 :priority nil :tags nil 
:todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil 
:archivedp nil :commentedp nil :post-affiliated 51758 :title 
(#(\"Quick\" 0 5 ...)) :mode nil :granularity nil :parent (org-data ...) 
:cached t :org-element--cache-sync-key (2673 . 51758))) :cached t 
:org-element--cache-sync-key (2673 . 52398)))"
 The real element is: "(headline (:raw-value \"get back to Xan\" :begin 
52350 :end 52508 :pre-blank 0 :contents-begin 52379 :contents-end 52508 
:robust-begin 52430 :robust-end 52506 :level 2 :priority 66 :tags nil 
:todo-keyword #(\"DONE\" 0 4 (line-prefix #(\"*\" 0 1 ...) wrap-prefix 
#(\"*** \" 0 1 ... 1 4 ...) ws-butler-chg chg fontified t org-todo-head 
#(\"TODO\" 0 4 ...) face (org-done org-done org-level-2))) :todo-type 
done :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp 
nil :post-affiliated 52350 :CREATED \"[2022-06-30 Do 22:31]\" :title 
\"get back to Xan\" :mode nil :granularity element :parent nil))"

 Cache around :begin:
(headline (:raw-value "maybe add another section for people eating fish" 
:begin 52182 :end 52350 :pre-blank 0 :contents-begin 52244 :contents-end 
52350 :robust-begin 52304 :robust-end 52348 :level 2 :priority 67 :tags 
nil :todo-keyword #("TODO" 0 4 (fontified t line-prefix #("*" 0 1 (face 
org-indent)) wrap-prefix #("*** " 0 1 (face org-indent) 1 4 (face 
org-indent)) face (org-todo org-todo org-level-2))) :todo-type todo 
:post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil 
:post-affiliated 52182 :CREATED "[2022-06-30 Thu 01:24]" :title "maybe 
add another section for people eating fish" :mode nil :granularity 
element :org-element--cache-sync-key (2673 . 52250) :cached t :parent 
(headline (:raw-value "Quick" :begin 51758 :end 52823 :pre-blank 0 
:contents-begin 51766 :contents-end 52823 :robust-begin 51768 
:robust-end 52821 :level 1 :priority nil :tags nil :todo-keyword nil 
:todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil 
:commentedp nil :post-affiliated 51758 :title (#("Quick" 0 5 (:parent 
(headline #3 :mode nil :granularity nil :parent (org-data (:begin 1 
:contents-begin 1 :contents-end 52823 :end 52823 :robust-begin 3 
:robust-end 52821 :post-blank 0 :post-affiliated 1 :path 
"/home/riccardo/Dropbox/org/todo.org" :mode org-data :CATEGORY "todo" 
:parent nil :cached t)) :cached t :org-element--cache-sync-key (2673 . 
51758)
(headline (:raw-value "get back to Xan" :begin 52350 :end 52624 
:pre-blank 0 :contents-begin 52379 :contents-end 52624 :robust-begin 
52430 :robust-end 52622 :level 2 :priority 66 :tags nil :todo-keyword 
#("DONE" 0 4 (line-prefix #("*" 0 1 (face 

[BUG] running org-agenda-todo-yesterday on a habit erroneously sets :LAST_REPEAT: as today, instead of yesterday [9.6 (9.6-??-e9da29b6f @ /home/jon/.emacs.d/.local/straight/build-28.1/org/)]

2022-07-05 Thread Jonathan Reeve
I will often use org-agenda-todo-yesterday to log habits that I did yesterday. 
It works fine for changing the todo state and logging it as yesterday’s, but 
the :LAST_REPEAT: property it has, since it’s a habit, is set to today, rather 
than yesterday.

This means that, for example, I can have a habit that’s set to repeat every 
day, and run org-agenda-todo-yesterday in Agenda view, which will change the 
state of a habit to “DONE” for yesterday, but when I reload the buffer, the 
item disappears, because it thinks it’s already been done for that day. But I 
want to log it as done for yesterday, and then log it again as done for today.

To reproduce:

- create a new todo item, and make it a habit, such that it appears in the 
agenda
- run org-agenda-todo-yesterday
- notice that :LAST_REPEAT: is today, instead of yesterday, as it should be

Emacs : GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, 
cairo version 1.16.0) Package: Org mode version 9.6 (9.6-??-e9da29b6f @ 
home/jon.emacs.d/.local/straight/build-28.1/org/)

Re: unfolding is delayed in relatively small file

2022-07-05 Thread Ihor Radchenko
Matt Price  writes:

> I just updated to recent main branch of org-mode with the new org folding
> engine. My emacs is from git, but somewhat out of date (2022-05-08).
>
> WIth a relatively small test file, I find that folding and unfolding a
> subtree with children does not cause a redisplay unless I alt-tab away from
> my Emacs window and then alt-tab back.  "FOLDED" or "SUBTREE NO CHILDREN"
> will echo in the message area, but the state of hte buffer won't change
> until I switch focus.

I am unable to reproduce. However, I did see some issues with slowness
in Org using Emacs master. Not the same though.

> I'm wondering if anyone else has seen this and what you've done to fix it!

Sometimes, simply updating Emacs to the latest commit helps. This is the
nature of tracking the dev branch.

Best,
Ihor



Re: [PATCH] ob-latex: Added support for including files with a relative path

2022-07-05 Thread Ihor Radchenko
Daniel Fleischer  writes:

> Ihor Radchenko [2022-07-05 Tue 19:05] wrote:
>
>> Rather than changing paths to absolute, we can simply play with the
>> working directly for latex process and set it to the directory of the
>> .org file (unless :dir argument is passed to the latex source block).
>> This is probably the most expected behavior.
>
> If I understand you correctly, changing the latex processing directory
> enables you to use relative paths in macros such as \input{}. If so,
> it's as trivial as adding `-cd' flag to `org-latex-pdf-process` when
> using `latexmk`.

It would be trivial if org-latex-pdf-process were not a custom variable.
I suspect that we may need to use something similar to what export does.

However, setting the right working directory is what other babel
backends do. The fact that ob-latex is not doing the same is an
unfortunate inconsistency and causes the input issue and can potentially
cause other problems.

Best,
Ihor



unfolding is delayed in relatively small file

2022-07-05 Thread Matt Price
Hi everyone,

I just updated to recent main branch of org-mode with the new org folding
engine. My emacs is from git, but somewhat out of date (2022-05-08).

WIth a relatively small test file, I find that folding and unfolding a
subtree with children does not cause a redisplay unless I alt-tab away from
my Emacs window and then alt-tab back.  "FOLDED" or "SUBTREE NO CHILDREN"
will echo in the message area, but the state of hte buffer won't change
until I switch focus.

I haven't done any extensive testing yet, and have many third party
packages installed. I've also just now noticed that this behaviour is
somewhat intermittent, and somehow I managed to make it stop briefly in
my   MWE, but I don't seem to be able to trigger the shift back to normal
behaviour in a "real" org file.

I'm wondering if anyone else has seen this and what you've done to fix it!

Thanks,
Matt


MWE:


* fold me

some text
** some more text
let's see what's happening.
** test again


Re: [PATCH] ob-latex: Added support for including files with a relative path

2022-07-05 Thread Daniel Fleischer
Ihor Radchenko [2022-07-05 Tue 19:05] wrote:

> Rather than changing paths to absolute, we can simply play with the
> working directly for latex process and set it to the directory of the
> .org file (unless :dir argument is passed to the latex source block).
> This is probably the most expected behavior.

If I understand you correctly, changing the latex processing directory
enables you to use relative paths in macros such as \input{}. If so,
it's as trivial as adding `-cd' flag to `org-latex-pdf-process` when
using `latexmk`.

--
Daniel Fleischer



Re: wrong type argument with latest org and latest emacs

2022-07-05 Thread Ihor Radchenko
Colin Baxter  writes:

> I'm sending this to emacs.orgmode and emacs.devel lists.
>
> With the latest emacs:
>
>
> Debugger entered--Lisp error: (wrong-type-argument stringp 
> (wrong-type-argument stringp nil))
>   format-message((wrong-type-argument stringp nil))
>   apply(format-message (wrong-type-argument stringp nil))
>   error((wrong-type-argument stringp nil))
>   #f(compiled-function (fun) # -0x1724f6e>)(org-babel-remove-temporary-stable-directory)
>   run-hook-wrapped(#f(compiled-function (fun) #) 
> org-babel-remove-temporary-stable-directory)

Thanks for reporting!
This likely caused by recent commit of mine on systems with no write
access to remote directory (at least, I am unable to reproduce the steps
on my system).

Can you please try the attached patch?

Best,
Ihor

>From ddf6278e8fcbaa4939539277b111061b7c00f550 Mon Sep 17 00:00:00 2001
Message-Id: 
From: Ihor Radchenko 
Date: Tue, 5 Jul 2022 21:00:24 +0800
Subject: [PATCH] ob-core: Fix nil value of
 `org-babel-temporary-stable-directory'

* lisp/ob-core.el: Fallback the value of
`org-babel-temporary-stable-directory' to
`org-babel-temporary-directory' if there are issues with directory
creation.

Fixes https://yhetil.org/emacs-devel/87sfnfhm6v@yandex.com
---
 lisp/ob-core.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 6c379c121..aaf895d74 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -3167,7 +3167,8 @@   (defvar org-babel-temporary-stable-directory
 	 (expand-file-name
   "babel-stable"
   (temporary-file-directory)))
-  (t nil)))
+  ;; Fallback if things do not work.
+  (t org-babel-temporary-directory)))
 "Directory to hold temporary files created to execute code blocks.
 Used by `org-babel-temp-file'.  This directory will be removed on
 Emacs shutdown."))
-- 
2.35.1



Re: [PATCH] ob-latex: Added support for including files with a relative path

2022-07-05 Thread Ihor Radchenko
emacs--- via "General discussions about Org-mode."
 writes:

>> Hi, adding an "input" type of header is one option. What about adding a
>> call to resolve relative file names instead, thus solving maybe other
>> needs in addition?
>>
> That was my second approach. I was concerned that forcing all imports with
> an absolute path could break existing exports? Correct me if I'm wrong. 
> Using the :header syntax external files can be loaded in via the old way,
> whereas using :inputs all relative paths are resolved. 
> The downside of course is that we clutter the export settings with a new 
> parameter. 

Rather than changing paths to absolute, we can simply play with the
working directly for latex process and set it to the directory of the
.org file (unless :dir argument is passed to the latex source block).
This is probably the most expected behavior.

Best,
Ihor



Re: [PATCH] ob-latex: Added support for including files with a relative path

2022-07-05 Thread General discussions about Org-mode.
Hi Daniel,


>> in the attachment you find a proposed patch to support including external 
>> files
>> when exporting a latex source block. Currently this was only possible by 
>> using a
>> :header argument. The problem with this approach is that, files needed to be
>> included with their absolute path.
>>
>
> Hi, adding an "input" type of header is one option. What about adding a
> call to resolve relative file names instead, thus solving maybe other
> needs in addition?
>
That was my second approach. I was concerned that forcing all imports with
an absolute path could break existing exports? Correct me if I'm wrong. 
Using the :header syntax external files can be loaded in via the old way,
whereas using :inputs all relative paths are resolved. 
The downside of course is that we clutter the export settings with a new 
parameter. 

Kind regards,
Bob  






wrong type argument with latest org and latest emacs

2022-07-05 Thread Colin Baxter


I'm sending this to emacs.orgmode and emacs.devel lists.

With the latest emacs:

(1) emacs -q 
(2) M-x org-version 
--> Org mode version 9.5.4 (release_9.5.4-3-g6dc785
(4) C-x C-c --> emacs closes with no messages

(5) Repeat (1)
(6) In scratch buffer load latest org-mode by eval
   (add-to-list 'load-path (expand-file-name "/path/to/git/org-mode/lisp"))
(7) M-x org-version 
--> Org mode version 9.5.4 (release_9.5.4-608-g080462
(8) C-x C-c --> emacs closes with error message
--> Wrong type argument: stringp, (wrong-type-argument stringp nil)

Debugging further reveals:

Debugger entered--Lisp error: (wrong-type-argument stringp (wrong-type-argument 
stringp nil))
  format-message((wrong-type-argument stringp nil))
  apply(format-message (wrong-type-argument stringp nil))
  error((wrong-type-argument stringp nil))
  #f(compiled-function (fun) #)(org-babel-remove-temporary-stable-directory)
  run-hook-wrapped(#f(compiled-function (fun) #) 
org-babel-remove-temporary-stable-directory)
  run-hook-query-error-with-timeout(kill-emacs-hook)
  kill-emacs(nil nil)
  save-buffers-kill-emacs(nil)
  save-buffers-kill-terminal(nil)
  funcall-interactively(save-buffers-kill-terminal nil)
  call-interactively(save-buffers-kill-terminal nil nil)
  command-execute(save-buffers-kill-terminal)


Best wishes,




Re: [PATCH] ob-latex: Added support for including files with a relative path

2022-07-05 Thread Daniel Fleischer
emacs--- via "General discussions about Org-mode." [2022-07-04 Mon 21:15] wrote:

> in the attachment you find a proposed patch to support including external 
> files
> when exporting a latex source block. Currently this was only possible by 
> using a
> :header argument. The problem with this approach is that, files needed to be
> included with their absolute path.

Hi, adding an "input" type of header is one option. What about adding a
call to resolve relative file names instead, thus solving maybe other
needs in addition?


--

Daniel Fleischer



Re: Links to javascript-based websites from orgmode.org: Paypal and Github

2022-07-05 Thread Dr. Arne Babenhauserheide

Richard Stallman  writes:

> Meanwhile, we have a potential solution for donating money: GNU Taler.
> It shows promise, for the long term: even national banks are starting
> to get interested in it.  (See taler.net.)  But banking systems are
> not set up to interact with it today.

GNU Taler requires an intermediary to clear the coins. This would again
be where a platform like liberapay would come in.

The place to bring that up seems to be the "third payment processor" issue:
https://github.com/liberapay/liberapay.com/issues/1394

And they are planning to do that, so a donation via LiberaPay is an
option to minimize proprietary Javascript — and to get rid of it in the
long run.

Though I do agree that it would be nice to have an *option* to send a
bank transfer and/or have an address to mail a cheque.

To take up criticism before it becomes a discussion: While Github is
annoying, you can read it without running proprietary Javascript (I just
checked that by opening it in eww), and you can interact with it using
email.

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


signature.asc
Description: PGP signature