Re: [PATCH] lisp/org.el: Use `org-document-info' face for subtitles

2020-11-05 Thread Kyle Meyer
Titus von der Malsburg writes:

> Subject: [PATCH] lisp/org.el: Use face org-document-info for subtitle
>
> * lisp/org.el: The value for the #+subtitle: property is now displayed
> with face `org-document-info' instead of `org-meta-line'.
>
> Like the title, author, e-mail, date, the subtitle is information
> that is displayed in the exported document.

Makes sense to me, and I guess it was left out just because #+subtitle
wasn't around until v8.3.

> ---
>  lisp/org.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/org.el b/lisp/org.el
> index 03df139fb..27f09645b 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -5307,7 +5307,7 @@ by a #."
>(min (point-max) end-of-endline))
>  '(face org-block-end-line)))
>   t))
> -  ((member dc1 '("+title:" "+author:" "+email:" "+date:"))
> +  ((member dc1 '("+title:" "+subtitle:" "+author:" "+email:" "+date:"))
> (org-remove-flyspell-overlays-in
>  (match-beginning 0)
>  (if (equal "+title:" dc1) (match-end 2) (match-end 0)))

Please also update org-document-info-keyword's docstring.



Re: Bug: problem caused by eval-after-load "speedbar" [9.3 (release_9.3 @ c:/ProgramData/chocolatey/lib/Emacs/tools/emacs/share/emacs/27.1/lisp/org/)]

2020-11-05 Thread Kyle Meyer
John Foerch writes:

> Hello,
>
> I was getting the following error on emacs startup:
>
> Symbol’s function definition is void: speedbar-add-supported-extension
[...]
> However, I noticed that 'eval-after-load can take either a filename or a
> feature symbol as its argument.  If the string "speedbar" were changed
> to the symbol 'speedbar, the eval form would be triggered by speedbar's
> 'provide form, not only loading a file that happened to be called
> "speedbar.el"

Thanks for the report and suggested fix.  I've switched this spot and
others over to using a symbol (51c4cc1a8).



Re: [PATCH] ox.el: Add missing polish translations in export dictionary

2020-11-05 Thread Kyle Meyer
Karol Wójcik via "General discussions about Org-mode." writes:

> Hi All,
>
> This patch is just a quick addition to export dictionary for polish language. 
> Things which were translated:
>
> - Continued from previous page -> Ciąg dalszy poprzedniej strony
> - Continued on next page-> Kontynuacja na następnej stronie
>
> Let me know if it's ok.

Thanks.  Applied (93325df0b), tacking on a changelog entry to the commit
message.



Re: [PATCH] ob-java

2020-11-05 Thread Jarmo Hurri


Hello Ian.

ian martins  writes:

>> Being a heavy user, I wonder if worg documentation page is being kept
>> up to date with the changes?
> Yes, that page is up to date. Actually, the page is new.

Brilliant! So the only thing that was not up to date was me.

(I wonder if it would be possible to have timestamps in worg. I have
bumped into situations before where I have not known the temporal
relationship between worg documentation and current org version.)

> Are you using the latest? 

Yes.

> Were there any issues when you updated?

At some point I was using the latest at that time, and my org java stuff
broke in the middle of a presentation during class. I have not had the
time to check whether the very latest solves these issues. I will start
preparing some new material now, and will let you know if anything weird
happens.

I greatly appreciate the effort you are putting into this package.

All the best, and stay safe.

Jarmo




[PATCH] ob-C.el: Fix a number a bugs related to table parameters

2020-11-05 Thread Asa Zeren
Here are a number of fixes to ob-C.el. There is still probably a bunch
of general cleanup to do in this file, but these changes make it work
for me.


0001-ob-C.el-Fix-a-number-a-bugs-related-to-table-paramet.patch
Description: Binary data


Re: [PATCH] org-manual.org: Remove languages list and update worg link

2020-11-05 Thread Kyle Meyer
ian martins writes:

> Subject: [PATCH] org-manual.org: Remove language list and fix Worg link
>
> * doc/org-manual.org: Remove the language list and fix the Worg link
> since the languages page has moved.  Renumber footnotes.
>
> The language list in the manual is missing many languages.  Rather
> than trying to keep the list up to date in two places that link to
> each other, this removes the list from the manual which is updated
> less frequently.  There were a few footnotes in the table, so this
> also renumbers the remaining footnotes.

Sounds like a good idea to me.

> The languages page was moved in Worg to make it the index page in the
> languages directory.  This updates the link in the manual to point to
> its new location.
> ---
>  doc/org-manual.org | 103 +
>  1 file changed, 38 insertions(+), 65 deletions(-)
[...]
> -[fn:160] Note that, for ~org-odd-levels-only~, a level number
> +[fn:158] Note that, for ~org-odd-levels-only~, a level number
>  corresponds to order in the hierarchy, not to the number of stars.
>  
>  [fn:161] If you move entries or Org files from one directory to

Hmm, the 158 to 161 jump after your renumbering caught my eye, but it
looks like it's orthogonal to your changes.  There was a bad merge
conflict resolution in 9410fbe06 that unlinked this definition from its
reference (one of the two [fn:89]s).  I'll clean it up after your
changes land.



Re: [PATCH] New "project" option for org-link-file-path-type

2020-11-05 Thread Kyle Meyer
Jack Kamm writes:

> I like the idea of letting org-link-file-path-type be a function.
>
> However, it struck me that it might be too limiting to just have the
> function return the project root. There's a lot more potential for
> customization here -- for example, a user might want to combine the
> noabbrev option with the adaptive option. If we could instead pass a
> function that takes the filename as an argument and returns the path to
> insert, that would allow for greater flexibility.
>
> Other benefits are that the implementation is much simpler, and
> subjectively I think it's more intuitive to explain the meaning of this
> option (as opposed to an option where the user passes a function that
> returns the project root).
>
> The downside of this is that the user has to do a bit more work and
> write some elisp to take advantage of the option.
>
> I've attached an updated patch in this direction. What do you think? I
> think the simplicity and flexibility outweighs the downside, but I'm not
> sure.

I think that's a good direction to go (for the reasons you laid out, not
just because it lets me use this with projectile :).

> +++ b/etc/ORG-NEWS
> @@ -35,6 +35,25 @@ omit a file description was to omit the header argument 
> entirely,
>  which made it difficult/impossible to provide a default value for
>  =file-desc=.
>  
> +*** New option to set ~org-link-file-path-type~ to a function
> +
> +If ~org-link-file-path-type~ can now be set to a function that takes
> +the full filename as an argument and returns the path to link to.

Drop "If"?

> +For example, if you use ~project.el~, you can set this function to use
> +relative links within a project as follows:
> +
> +#+begin_src emacs-lisp
> +(setq (org-link-file-path-type
> +   (lambda (path)
> + (let* ((proj (project-current))
> +(root (if proj (project-root proj) default-directory)))
> +   (if (string-prefix-p (expand-file-name root) path)
> +   (progn
> + (file-relative-name path))
> + (abbreviate-file-name path))
> +#+end_src

superfluous progn



org-crypt patch

2020-11-05 Thread Logan James
Add `org-crypt-decrypt-after-save-magic' function to complement the
currently existing `org-crypt-use-before-save-magic' function. Causes the
buffer to be unencrypted after it has been saved to file so that you can
continue working on it without manually running `org-decrypt-entries'
This has the downside of the buffer always being considered as modified,
but is a useful optional function.

Also updated the suggested org-crypt config in the org-manual to include
(org-crypt-decrypt-after-save-magic)
From 3b58d32a03eea8f7a84661a88c451c2e9ed94fbc Mon Sep 17 00:00:00 2001
From: Logan Warner 
Date: Fri, 6 Nov 2020 10:11:27 +1300
Subject: [PATCH] lisp/org-crypt.el: Add org-crypt-decrypt-after-save-magic
 which complements the org-crypt-use-before-save-magic function

* org-crypt.el (org-crypt-decrypt-after-save-magic): Add the complement of `org-crypt-use-before-save' called `org-crypt-decrypt-after-save-magic' which adds a function to the hook `after-save-hook' which calls `org-decrypt-entries'
* org-manual.org (Org Crypt): add "(org-crypt-decrypt-after-save-magic)" to the suggested org crypt settings in the Emacs init file, below "(org-crypt-use-before-save-magic)"

`org-crypt-decrypt-after-save-magic' currently encrypts entries on save but doesn't decrypt them again after the file has been saved. This causes users to have to call `org-decrypt-entries'. Adding the new function allows users to add it to their .emacs and remove this requirement. TINYCHANGE
---
 doc/org-manual.org |  1 +
 lisp/org-crypt.el  | 13 +
 2 files changed, 14 insertions(+)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 7ab7d1c94..6679bea40 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -19706,6 +19706,7 @@ Here is a suggestion for Org Crypt settings in Emacs init file:
 #+begin_src emacs-lisp
 (require 'org-crypt)
 (org-crypt-use-before-save-magic)
+(org-crypt-decrypt-after-save-magic)
 (setq org-tags-exclude-from-inheritance '("crypt"))
 
 (setq org-crypt-key nil)
diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el
index 187560c55..b8d71114d 100644
--- a/lisp/org-crypt.el
+++ b/lisp/org-crypt.el
@@ -46,6 +46,10 @@
 ;; 4. To automatically encrypt all necessary entries when saving a
 ;;file, call `org-crypt-use-before-save-magic' after loading
 ;;org-crypt.el.
+;;
+;; 5. To automatically decrypt all neccessary entries which have been
+;;encrypted by `org-crypt-use-before-save-magic' after the file
+;;has been saved call `org-crypt-decrypt-after-save-magic'
 
 ;;; Thanks:
 
@@ -311,6 +315,15 @@ Assume `epg-context' is set."
'org-mode-hook
(lambda () (add-hook 'before-save-hook 'org-encrypt-entries nil t
 
+;; Note
+;; This will cause the buffer to always register as having been modified
+;;;###autoload
+(defun org-crypt-decrypt-after-save-magic ()
+	"Add a hook to automatically decrypt entries after a file has been saved to disk."
+	(add-hook
+	 'org-mode-hook
+	 (lambda () (add-hook 'after-save-hook 'org-decrypt-entries nil t
+
 (add-hook 'org-reveal-start-hook 'org-decrypt-entry)
 
 (provide 'org-crypt)
-- 
2.29.1



New bidi problems with org-mode (Arabic, Hebrew,..)

2020-11-05 Thread Fr Ml

  
  
https://emacs.stackexchange.com/questions/61494/new-bidi-problems-with-org-mode-arabic-hebrew
  
  Hallo, 
  
  Some time ago (maybe 3 months) I've noticed some problems with the
  bidi support (right-to-left languages) in org-mode.
  
  One problem I can't reproduce: The characters have then a strange
  form but If I change the text scale (larger or smaller) it becomes
  normal.
  
  The second problem I can reproduce, you can see it in the two
  images:
  
  In this image: I have the option `bidi-paragraph-direction: nil`,
  to get the right direction for  Hebrew and Arabic. As you see the
  headline color isn't consistently brown. The English text don't
  have this problem.
  
  [![The color of the headline changes, gets black. The direction is
  right to left][1]][1]
  
  In this image without the option: Everything is ok:
  [![Here it's ok, the direction is left to right][2]][2]
  
  In both examples my init file is empty. And I've tried many fonts.
  My org version is 9.3 and emacs version is 27.1.
  
  Actually, the first problem is bigger for me but I can't reproduce
  it; I think that both problems appeared a the same time. So maybe
  solving the second will solve the first one too(?)
  
  EDIT: I can reproduce the problem with the colors also on a
  Windows machine with latest version: emacs 27.1 and the included
  org 9.3. With the older version: emacs 26.3 and the included
  org-version 9.1.7 I don't have the problem - at least I didn't see
  it. 
  
    [1]: https://i.stack.imgur.com/NVUMY.png
    [2]: https://i.stack.imgur.com/emHDx.png
  
  
  

  



[PATCH] ox-md.el/preserve radio target hyperlink

2020-11-05 Thread nazar.sta...@atk.sk
exporting to markdown looses radio target hyperlinks.

>From bbe8ef631467f9f5f097412a946a82d38e96235c Mon Sep 17 00:00:00 2001
From: "turbo.c...@clovermail.net" 
Date: Tue, 3 Nov 2020 22:24:03 +0200
Subject: [PATCH] ox-md.el/preserve radio target hyperlink

* ox-md.el (org-md-link): format markdown hyperlink from org radio
target
---
 lisp/ox-md.el | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-md.el b/lisp/ox-md.el
index 1d20c04f4..a63815e43 100644
--- a/lisp/ox-md.el
+++ b/lisp/ox-md.el
@@ -543,7 +543,13 @@ INFO is a plist holding contextual information.  See
  ((string= type "coderef")
   (format (org-export-get-coderef-format path desc)
 	  (org-export-resolve-coderef path info)))
- ((equal type "radio") desc)
+ ((string= type "radio")
+  (let ((destination (org-export-resolve-radio-link link info)))
+	(if (not destination) desc
+	  (format "%s"
+		  (org-export-get-reference destination info)
+		  ""
+		  desc
  (t (if (not desc) (format "<%s>" path)
 	  (format "[%s](%s)" desc path))
 
-- 
2.29.1



Re: Bug: unsigned file `archive-contents' on orgmode.org [9.4 (9.4-19-gb1de0c-elpa @ /home/data1/protected/.emacs.d/elpa/org-20201019/)]

2020-11-05 Thread Bastien
Thanks a lot, that's very useful.

Something I'm not sure: shall we sign only the "archive-contents" file
or both "archive-contents" and "org-MMDD.tar"?

For the public key of Org ELPA, where would you expect to download it
from? https://orgmode.org/elpa/key.asc or https://pgp.mit.edu or both?

-- 
 Bastien



Re: Bug: unsigned file `archive-contents' on orgmode.org [9.4 (9.4-19-gb1de0c-elpa @ /home/data1/protected/.emacs.d/elpa/org-20201019/)]

2020-11-05 Thread Jean Louis
* Bastien  [2020-11-05 20:19]:
> Hi Jean Louis,
> 
> Jean Louis  writes:
> 
> > GNU ELPA provides signed archive-contents. Org should provide it too,
> > isn't it?
> 
> can you let us know what are the steps involved in signing
> the archive-contents file?

This I find out as I have the variable `package-check-signature'
turned on. Majority who are getting Emacs with value `allow-unsigned'
will not even see that.

Documentation:
Non-nil means to check package signatures when installing.
More specifically the value can be:
- nil: package signatures are ignored.
- `allow-unsigned': install a package even if it is unsigned, but
  if it is signed, we have the key for it, and OpenGPG is
  installed, verify the signature.
- t: accept a package only if it comes with at least one verified signature.
- `all': same as t, except when the package has several signatures,
  in which case we verify all the signatures.


You may probably automate it. It is in the Emacs Lisp manual:

41.4 Creating and Maintaining Package Archives
==

   One way to increase the security of your packages is to “sign” them
using a cryptographic key.  If you have generated a private/public gpg
key pair, you can use gpg to sign the package like this:

 gpg -ba -o FILE.sig FILE

For a single-file package, FILE is the package Lisp file; for a
multi-file package, it is the package tar file.  You can also sign the
archive’s contents file in the same way.  Make the ‘.sig’ files
available in the same location as the packages.  You should also make
your public key available for people to download; e.g., by uploading it
to a key server such as .  When people install
packages from your archive, they can use your public key to verify the
signatures.

   A full explanation of these matters is outside the scope of this
manual.  For more information on cryptographic keys and signing, *note
GnuPG: (gnupg)Top.  Emacs comes with an interface to GNU Privacy Guard,
*note EasyPG: (epa)Top.




Re: Bug: unsigned file `archive-contents' on orgmode.org [9.4 (9.4-19-gb1de0c-elpa @ /home/data1/protected/.emacs.d/elpa/org-20201019/)]

2020-11-05 Thread Bastien
Hi Jean Louis,

Jean Louis  writes:

> GNU ELPA provides signed archive-contents. Org should provide it too,
> isn't it?

can you let us know what are the steps involved in signing
the archive-contents file?

Thanks,

-- 
 Bastien



Re: [PATCH] ob-java

2020-11-05 Thread ian martins
Yes, that page is up to date. Actually, the page is new.

Are you using the latest? Were there any issues when you updated?

On Thu, Nov 5, 2020, 11:32 AM Jarmo Hurri  wrote:

>
> Hi there!
>
> I noticed that a lot of work is being put into Java in Babel. Excellent.
>
> Being a heavy user, I wonder if worg documentation page is being kept up
> to date with the changes?
>
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-java.html
>
> All the best, and stay safe.
>
> Jarmo
>
>
>


Bug: unsigned file `archive-contents' on orgmode.org [9.4 (9.4-19-gb1de0c-elpa @ /home/data1/protected/.emacs.d/elpa/org-20201019/)]

2020-11-05 Thread Jean Louis



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.


GNU ELPA provides signed archive-contents. Org should provide it too,
isn't it?

Debugger entered--Lisp error: (error "Unsigned file ‘archive-contents’ at 
https://orgmod...;)
  signal(error ("Unsigned file ‘archive-contents’ at https://orgmod...;))
  error("Unsigned file `%s' at %s" "archive-contents" 
"https://orgmode.org/elpa/;)
  #f(compiled-function () #)()
  package--with-response-buffer-1("https://orgmode.org/elpa/; 
#f(compiled-function () #) :file 
"archive-contents.sig" :async nil :error-function #f(compiled-function () 
#) :noerror t)
  package--check-signature("https://orgmode.org/elpa/; "archive-contents" "(1 
(org  . [(20201102) ( ) \"Outline-ba..." nil #f(compiled-function 
( good-sigs) #) #f(compiled-function () 
#))
  #f(compiled-function () #)()
  package--with-response-buffer-1("https://orgmode.org/elpa/; 
#f(compiled-function () #) :file 
"archive-contents" :async nil :error-function #f(compiled-function () 
#) :noerror nil)
  package--download-one-archive(("org" . "https://orgmode.org/elpa/;) 
"archive-contents" nil)
  package--download-and-read-archives(nil)
  package-refresh-contents()
  funcall-interactively(package-refresh-contents)
  call-interactively(package-refresh-contents record nil)
  command-execute(package-refresh-contents record)
  execute-extended-command(nil "package-refresh-contents" nil)
  funcall-interactively(execute-extended-command nil "package-refresh-contents" 
nil)
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)


Emacs  : GNU Emacs 28.0.50 (build 25, x86_64-pc-linux-gnu, X toolkit, cairo 
version 1.14.8, Xaw3d scroll bars)
 of 2020-11-01
Package: Org mode version 9.4 (9.4-19-gb1de0c-elpa @ 
/home/data1/protected/.emacs.d/elpa/org-20201019/)

-- 
Thanks,
Jean Louis
⎔ λ  퍄 팡 팚



Re: [PATCH] ob-java

2020-11-05 Thread Jarmo Hurri


Hi there!

I noticed that a lot of work is being put into Java in Babel. Excellent.

Being a heavy user, I wonder if worg documentation page is being kept up
to date with the changes?

https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-java.html

All the best, and stay safe.

Jarmo