Re: SSL cert expired on orgmode.org

2022-09-16 Thread Bastien
Ihor Radchenko  writes:

> On a related note, certificate for https://bzg.fr/en/ has also been
> expired.

Doh!  Fixed too, thanks.

-- 
 Bastien



Re: SSL cert expired on orgmode.org

2022-09-16 Thread Ihor Radchenko
Bastien Guerry  writes:

> Corwin Brust  writes:
>
>>> Not sure who is in charge of these, but the orgmode.org SSL cert
>>> expired today. Someone brought it up on IRC.
>
> This should be fixed now, thanks for the heads up!

On a related note, certificate for https://bzg.fr/en/ has also been
expired.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



contrib - ol-todo

2022-09-16 Thread Tyler Grinn

I've built this small package which registers a todo type link:

[[todo:~/projects.org::#my-todo][My todo]]

And it is displayed like this:

 My todo

Where DONE is the actual todo keyword on the target heading. The keyword
on the link and target stay in sync, so setting a different todo keyword
either on the link or the target will update both. The link does not
show up in the agenda and can be placed anywhere an org link is valid.

I'm using this to create a list of todos I want done today from a larger
list of all my todos.

Is this something that would be appropriate for org-contrib?

---

When I tried to register a :store function which is valid for org buffers
backed by a file, the desired behavior was that I could choose between
storing a file link and a todo link, but instead, it simply stores a
todo link without confirmation. Is this a known problem?



;;; ol-todo.el --- Store symbolic link to a TODO entry  -*- lexical-binding: t 
-*-

;; Copyright (C) 2014-2022 Free Software Foundation, Inc.

;; Author: Tyler Grinn 
;; Package-Requires: ((emacs "27.2"))
;; Version: 0.0.1

;;; Commentary:

;; When this type of link is inserted, the todo keyword of the target
;; heading is displayed before the link.  With point inside a todo
;; link, use C-c C-c to update the link and C-c C-t to change the todo
;; status of the target heading.
;;
;; Use `org-todo-link-store' to store the heading at point in
;; `org-stored-links'.  This is not registered as a provider for
;; `org-store-link' because it would override the default storing
;; behavior for org files.

;;; Code:

 Requirements:

(require 'org)
(require 'ol)
(require 'org-keys)
(require 'org-refile)
(require 'org-element)

 Org todo link keymap

(defun org-todo-link-recalculate ()
  "Recalculate TODO status for todo link at point."
  (interactive)
  (if-let* ((ov (seq-find
 (lambda (o) (overlay-get o 'ol-todo))
 (overlays-at (point
(start (car (org-in-regexp org-link-any-re)))
(link (save-excursion
(goto-char start)
(org-element-link-parser)))
(path (org-element-property :path link)))
  (overlay-put ov 'before-string (org-todo-link-get-todo path

(defun org-todo-link-todo ()
  "Set TODO keyword on todo link at point."
  (interactive)
  (when-let* ((ov (seq-find
   (lambda (o) (overlay-get o 'ol-todo))
   (overlays-at (point
  (start (car (org-in-regexp org-link-any-re)))
  (link (save-excursion
  (goto-char start)
  (org-element-link-parser)))
  (path (org-element-property :path link)))
(save-window-excursion
  (let* ((org-link-frame-setup '((file . find-file)))
 (pos (org-todo-link-find path)))
(save-excursion
  (goto-char pos)
  (org-todo
(overlay-put ov 'before-string (org-todo-link-get-todo path

(defvar org-todo-link-keymap
  (let ((map (make-sparse-keymap)))
(set-keymap-parent map org-mouse-map)
(mapc
 (lambda (k) (define-key map (kbd (car k)) (cdr k)))
 '(("C-c C-c" . org-todo-link-recalculate)
   ("C-c C-t" . org-todo-link-todo)))
map)
  "Keymap for todo links.")

;; Create `todo' style link
;;;###autoload
(org-link-set-parameters "todo"
 :complete #'org-todo-link-complete
 :insert-description #'org-todo-link-description
 :activate-func #'org-todo-link-activate
 :face #'org-todo-link-face
 :follow #'org-todo-link-follow
 :keymap org-todo-link-keymap)

(defun org-todo-link-complete (&optional _)
  "Prompt user to complete path to TODO item in refile targets."
  (let ((it (org-refile-get-location "TODO Item: "))
(org-link-frame-setup '((file . find-file)))
org-stored-links)
(save-window-excursion
  (org-open-file (nth 1 it))
  (save-excursion
(goto-char (nth 3 it))
(org-todo-link-store)))
(caar org-stored-links)))

(defun org-todo-link-description (loc _)
  "Generate probable description from todo link LOC."
  (save-window-excursion
(let* ((org-link-frame-setup '((file . find-file)))
   (pos (org-todo-link-find
 (replace-regexp-in-string "^todo:" "" loc
  (org-entry-get pos "ITEM"

(defun org-todo-link-activate (start end path &rest _)
  "Create overlay from START to END and display todo of heading at PATH."
  (let ((overlays (seq-filter
   (lambda (o) (overlay-get o 'ol-todo))
   (overlays-in start end
(if (not overlays)
(let ((ov (make-overlay start end)))
  (overlay-put ov 'ol-todo t)
  (overlay-put ov 'evaporate t)
  (overlay-put ov 'before-string (org-todo-link-get-todo path)))
  (move-overlay (car overlays) start end)
  (

Properly handle defaults in org-set-property

2022-09-16 Thread Janek F
As discussed in 
https://emacs.stackexchange.com/questions/71774/pass-default-value-to-org-set-property/71777,
 providing a default to org-set-property does not always work.

It calls `org-read-property-value`, which only uses the supplied default value 
if it can compute a list of allowed values for the property. But then, the 
default value has to be part of that `_ALL` list.

Can this be changed so it always uses the given default?


Thanks everyone for the great work!
~ Janek



Re: [BUG] org-paste-subtree inserts empty line above paste

2022-09-16 Thread Felix Wiemuth



On 13.09.22 04:39, Ihor Radchenko wrote:

Felix Wiemuth  writes:


Emacs 28.1
Orgmode 9.5.2 (but discovered already 2020-01-20)

When pasting a subtree (of whichever level) with org-paste-subtree at
any position (can be an empty line or a line with a header prefix, e.g.
"*** "), always an empty line is inserted above the inserted subtree.

I would expect no new line to be inserted, and I think this was the
behaviour before I noticed this.

I am unable to reproduce.
Could you please detail what exactly you tried step by step?
See https://orgmode.org/manual/Feedback.html


I'm sorry, assumed it was a general issue. I actually tried it with a 
fresh emacs and there it does not happen.


I tried it with a fresh spacemacs (development branch at commit 201d22b) 
and there the issue exists.


Any idea what the reason could be? Could it be any configuration that 
leads to this? Or is it probably a bug in spacemacs and I should post 
the issue there?


Thanks!




Re: SSL cert expired on orgmode.org

2022-09-16 Thread Bastien Guerry
Corwin Brust  writes:

>> Not sure who is in charge of these, but the orgmode.org SSL cert
>> expired today. Someone brought it up on IRC.

This should be fixed now, thanks for the heads up!

-- 
 Bastien



Re: SSL cert expired on orgmode.org

2022-09-16 Thread Corwin Brust
On Fri, Sep 16, 2022 at 9:18 AM Russell Adams  wrote:
>
> Not sure who is in charge of these, but the orgmode.org SSL cert
> expired today. Someone brought it up on IRC.

Thanks Russel!

Adding Bastien in CC.



SSL cert expired on orgmode.org

2022-09-16 Thread Russell Adams
Not sure who is in charge of these, but the orgmode.org SSL cert
expired today. Someone brought it up on IRC.

--
Russell Adamsrlad...@adamsinfoserv.com
https://www.adamsinfoserv.com/