new website: not easy to find how to ask for help

2020-12-07 Thread Eric S Fraga
Dear all,

I love the new front page to the org website, especially the annotated
example!

Minor criticism however: it is very difficult (for a new user) to find
how to ask for help.  The community tab doesn't tell the reader the
mailing list address and the manual says nothing at all about this.  A
new user may not wish to join a mailing list that may look intimidating
and so will not follow the "subscribe to the list" link.

I wanted to point somebody to instructions on how to ask for help and
couldn't do so easily.

A suggestion: at minimum, add the mailing list address to the community
page so that a reader does not have to go to the subscribing page to
find that out; better yet, make it visible on the front page?

thank you,
eric

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-143-g9a1549



Re: Archive an task which has un-indented logbook caused error

2020-12-07 Thread Kyle Meyer


stardiviner writes:

> I have an Org task like this:
> ```org
> ** DONE lantern [2/2]
>CLOSED: [2019-02-16 Sat 23:45]
> :LOGBOOK:
> - State "DONE"   from "TODO"   [2019-02-16 Sat 23:45] \\
>   Arch Linux install lantern from AUR.
> CLOCK: [2019-02-16 Sat 23:38]--[2019-02-16 Sat 23:45] =>  0:07
> - State "TODO"   from  [2016-01-09 Sat 10:37]
> :END:
>
> happey ending!
> ```
> You can noticed that there are three spaces offset before `CLOSED`.
> And NO spaces before the `:LOGBOOK:` drawer. When I press `[C-c C-x C-a]`.
> I got following error.
>
> Here is the error after I `toggle-debug-on-error`.
> ```
> Debugger entered--Lisp error: (wrong-type-argument wholenump -1)
>   move-to-column(-1 t)
>   indent-line-to(-1)

Thanks for reporting.  This is the same error as reported by Duianto at
https://orgmode.org/list/cae-tx7i5ew3ed3yx6jjx57qnurtv0aumwkue0w83yuureke...@mail.gmail.com

It bisects to 11ef7454a (org.el (org-fixup-indentation): Fix logbook
drawers indentation, 2020-09-07).



Archive an task which has un-indented logbook caused error

2020-12-07 Thread stardiviner
I have an Org task like this:
```org
** DONE lantern [2/2]
   CLOSED: [2019-02-16 Sat 23:45]
:LOGBOOK:
- State "DONE"   from "TODO"   [2019-02-16 Sat 23:45] \\
  Arch Linux install lantern from AUR.
CLOCK: [2019-02-16 Sat 23:38]--[2019-02-16 Sat 23:45] =>  0:07
- State "TODO"   from  [2016-01-09 Sat 10:37]
:END:

happey ending!
```
You can noticed that there are three spaces offset before `CLOSED`.
And NO spaces before the `:LOGBOOK:` drawer. When I press `[C-c C-x C-a]`.
I got following error.

Here is the error after I `toggle-debug-on-error`.
```
Debugger entered--Lisp error: (wrong-type-argument wholenump -1)
  move-to-column(-1 t)
  indent-line-to(-1)
  (while (and (not (> (point) end-marker)) (>= ci diff)) (indent-line-to (+
ci diff)) (forward-line))
  (let ((end-marker (move-marker (make-marker) (match-end 0))) (ci
(current-indentation))) (while (and (not (> (point) end-marker)) (>= ci
diff)) (indent-line-to (+ ci diff)) (forward-line)))
  (progn (let ((end-marker (move-marker (make-marker) (match-end 0))) (ci
(current-indentation))) (while (and (not (> (point) end-marker)) (>= ci
diff)) (indent-line-to (+ ci diff)) (forward-line
  (if (looking-at org-logbook-drawer-re) (progn (let ((end-marker
(move-marker (make-marker) (match-end 0))) (ci (current-indentation)))
(while (and (not (> (point) end-marker)) (>= ci diff)) (indent-line-to (+
ci diff)) (forward-line)
  (save-restriction (widen) (narrow-to-region (line-beginning-position)
(save-excursion (if (progn (defvar org-called-with-limited-levels) (defvar
org-outline-regexp) (defvar outline-regexp) (defvar org-outline-regexp-bol)
(let* ((org-called-with-limited-levels t) (org-outline-regexp ...)
(outline-regexp org-outline-regexp) (org-outline-regexp-bol ...))
(org-at-heading-p))) (progn (defvar org-called-with-limited-levels) (defvar
org-outline-regexp) (defvar outline-regexp) (defvar org-outline-regexp-bol)
(let* ((org-called-with-limited-levels t) (org-outline-regexp ...)
(outline-regexp org-outline-regexp) (org-outline-regexp-bol ...))
(outline-next-heading))) (org-inlinetask-goto-end)) (point)))
(forward-line) (if (looking-at-p org-planning-line-re) (progn
(org-indent-line) (forward-line))) (if (looking-at org-property-drawer-re)
(progn (goto-char (match-end 0)) (forward-line) (org-indent-region
(match-beginning 0) (match-end 0 (if (looking-at org-logbook-drawer-re)
(progn (let ((end-marker (move-marker (make-marker) (match-end 0))) (ci
(current-indentation))) (while (and (not (> ... end-marker)) (>= ci diff))
(indent-line-to (+ ci diff)) (forward-line) (catch 'no-shift (if (or (=
0 diff) (not (eq org-adapt-indentation t))) (progn (throw 'no-shift nil)))
(let ((case-fold-search t)) (if (< diff 0) (progn (let ((diff ...)
(forbidden-re ...)) (save-excursion (while ... ...) (while (not (eobp))
(cond ((and (looking-at-p org-footnote-definition-re) (let ... ...)))
((looking-at-p org-outline-regexp) (forward-line)) ((looking-at-p "[
\11]*$") (forward-line)) (t (indent-line-to (+ ... diff))
(beginning-of-line) (or (and ... ...) (forward-line
  (save-excursion (save-restriction (widen) (narrow-to-region
(line-beginning-position) (save-excursion (if (progn (defvar
org-called-with-limited-levels) (defvar org-outline-regexp) (defvar
outline-regexp) (defvar org-outline-regexp-bol) (let* (... ... ... ...)
(org-at-heading-p))) (progn (defvar org-called-with-limited-levels) (defvar
org-outline-regexp) (defvar outline-regexp) (defvar org-outline-regexp-bol)
(let* (... ... ... ...) (outline-next-heading))) (org-inlinetask-goto-end))
(point))) (forward-line) (if (looking-at-p org-planning-line-re) (progn
(org-indent-line) (forward-line))) (if (looking-at org-property-drawer-re)
(progn (goto-char (match-end 0)) (forward-line) (org-indent-region
(match-beginning 0) (match-end 0 (if (looking-at org-logbook-drawer-re)
(progn (let ((end-marker (move-marker ... ...)) (ci (current-indentation)))
(while (and (not ...) (>= ci diff)) (indent-line-to (+ ci diff))
(forward-line) (catch 'no-shift (if (or (= 0 diff) (not (eq
org-adapt-indentation t))) (progn (throw 'no-shift nil))) (let
((case-fold-search t)) (if (< diff 0) (progn (let (... ...) (save-excursion
... (while (not (eobp)) (cond ((and ... ...)) ((looking-at-p
org-outline-regexp) (forward-line)) ((looking-at-p "[ \11]*$")
(forward-line)) (t (indent-line-to ...) (beginning-of-line) (or ...
...
  org-fixup-indentation(-1)
  (progn (org-fixup-indentation (- diff)))
  (if org-adapt-indentation (progn (org-fixup-indentation (- diff
  (if (= level 1) nil (if org-auto-align-tags (progn (org-align-tags))) (if
org-adapt-indentation (progn (org-fixup-indentation (- diff)
  (let* ((after-change-functions (remq 'flyspell-after-change-function
after-change-functions)) (level (let ((save-match-data-internal
(match-data))) (unwind-protect (progn (funcall outline-level))
(set-match-data save-match-data-internal 'evaporate (up-head (concat

error when archiving two subtrees in a row

2020-12-07 Thread Ian Garmaise
When I archive one subtree (C-c $), the first one succeeds.
The second archive operation fails with a permission denied error as shown
in the messages buffer:

Copied: Subtree(s) with 11 characters
Saving file c:/users/ian/Dropbox/org/nowtutoradmin.org_archive...
Wrote c:/users/ian/Dropbox/org/nowtutoradmin.org_archive
Cut: Subtree(s) with 11 characters
Subtree archived in file: ~/Dropbox/org/nowtutoradmin.org_archive
Copied: Subtree(s) with 11 characters
Saving file c:/users/ian/Dropbox/org/nowtutoradmin.org_archive...
basic-save-buffer-2: Unlocking file: Permission denied,
c:/users/ian/Dropbox/org/nowtutoradmin.org_archive

Noticed this yesterday.  Updated org and all packages, then tried it again
today, was able to reproduce it easily
Ian


Emacs  : GNU Emacs 27.1 (build 1, x86_64-w64-mingw32)
 of 2020-08-21
Package: Org mode version 9.4 (9.4-55-g706ba9-elpa @
c:/users/ian/.emacs.d/elpa/org-20201207/)

current state:
==
(setq
 org-babel-results-keyword "results"
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-columns-default-format "%40ITEM(Task) %17Effort(Estimated Effort){:}
%CLOCKSUM %CLOCKSUM_T"
 org-link-shell-confirm-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-global-properties '(("Effort_All" . "0 0:10 0:30 1:00 2:00 3:00 4:00
5:00 6:00 7:00"))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-html-format-inlinetask-function
'org-html-format-inlinetask-default-function
 org-enforce-todo-dependencies t
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-agenda-files '("~/Dropbox/org/organizer.org" "~/Dropbox/org/
nowtutoradmin.org" "~/Dropbox/org/testerror.org")
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-tag-alist '(("@work" . 119) ("@home" . 104) ("laptop" . 108))
 org-modules '(ol-w3m ol-bbdb ol-bibtex ol-docview ol-gnus ol-info ol-irc
ol-mhe ol-rmail ol-eww org-habit)
 org-plantuml-jar-path "/users/ian/plantuml.jar"
 org-blocker-hook '(org-block-todo-from-checkboxes
org-block-todo-from-children-or-siblings-or-parent)
 org-mode-hook '(org-clock-load #[0 "\300\301\302\303\304$\207" [add-hook
change-major-mode-hook org-show-all append local] 5]
#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook
org-babel-show-result-all append local] 5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-clock-persist 'history
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-mime-src-mode-hook '(org-mime-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-babel-pre-tangle-hook '(save-buffer)
 org-file-apps '((auto-mode . emacs) ("\\.mm\\'" . default)
("\\.x?html?\\'" . default) ("\\.pdf\\'" . default)
("\\.xlsx\\'" . default) ("\\.docx\\'" . default))
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-babel-load-languages '((emacs-lisp . t) (latex . t) (dot . t) (org .
t) (plantuml . t))
 org-agenda-time-grid '((daily today require-timed) (600 800 1000 1200 1400
1600 1800 2000) ".." "")
 org-log-done 'time
 org-link-abbrev-alist '(("gmail" . "
https://mail.google.com/mail/?view=cm=1=%s;))
 org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS
WIDTH)"]
 org-agenda-span 'day
 org-agenda-loop-over-headlines-in-active-region nil
 org-src-lang-modes '(("plantuml" . plantuml) ("C" . c) ("C++" . c++)
("asymptote" . asy) ("bash" . sh) ("beamer" . latex)
 ("calc" . fundamental) ("cpp" . c++) ("ditaa" . artist) ("dot" .
fundamental) ("elisp" . emacs-lisp)
 ("ocaml" . tuareg) ("screen" . shell-script) ("shell" . sh) ("sqlite"
. sql))
 org-catch-invisible-edits 'smart
 org-occur-hook '(org-first-headline-recenter)
 org-log-into-drawer t
 org-enforce-todo-checkbox-dependencies t
 org-agenda-include-diary t
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-show-empty-lines
 org-optimize-window-after-visibility-change)
 org-todo-keywords '((sequence "TODO" "IN-PROGRESS" "WAITING" "DONE"))
 org-speed-command-hook '(org-speed-command-activate
org-babel

[org-save-all-org-buffers] Saving is not reliable?

2020-12-07 Thread Mikhail Skorzhisnkii
Hello forum,

I start noticing some time ago that saving org-mode buffers works
unreliably in my setup. Most of the time I am using function
`org-save-all-org-buffers' from core org. Unfortunately I don't have a
good reproduction scenarios of this bug. In fact I don't have
reproduction scenario at all. It just happens sometimes: I am sure I
saved all org buffers I had, then restart emacs and then I see that some
changes were not actually saved.

Possibly there is something wrong in my customisations. But without a
reproduction scenario, I don't see a way to prove it. However, after I
made a tiny change to the function, I stopped seeing these problems at
all. Here is the fix I have applied:

,
| diff --git a/lisp/org.elf b/lisp/org.el
| index df3f377f6..448dc4a88 100644
| --- a/lisp/org.el
| +++ b/lisp/org.el
| @@ -15229,7 +15229,9 @@ The value is a list, with zero or more of the symbols 
`effort', `appt',
|"Save all Org buffers without user confirmation."
|(interactive)
|(message "Saving all Org buffers...")
| -  (save-some-buffers t (lambda () (derived-mode-p 'org-mode)))
| +  (save-some-buffers t (lambda ()
| + (and (derived-mode-p 'org-mode)
| +  (not (buffer-base-buffer)
|(when (featurep 'org-id) (org-id-locations-save))
|(message "Saving all Org buffers... done"))
`

My theory was that `save-some-buffers' may work unreliably with indirect
buffers, so I've excluded them from the saving. Again, I have tried to
prove it by using indirect buffer and saving it instead of base buffer.
But it worked without a problem. So even if my theory is correct, bug
not reproducing every time. Nevertheless I am having this change already
for two weeks and I don't have reproduction of this bug. Previously I've
noticed loosing data every day or so.

I don't suggest to apply this patch, but may be someone have\had the
same problem or have a deeper insight how indirect buffers work and why
my fix may be a working solution?

  Kind regards,
  Mikhail Skorzhinskii


Re: [PATCH] Persistently save downloaded inline remote images

2020-12-07 Thread Jack Kamm
> Jack, as the author of the org-display-remote-inline-images commit, what
> do you think about this patch?

This patch takes the same approach as an earlier attempt by Kit in 2014
[1].  That patch was never merged; Michael objected that the approach
seemed too complex, and suggested using file-local-copy and cacheing the
filename instead; he also suggested implementing this cacheing
functionality in Tramp instead of Org.

So, when I submitted a new attempt at this, I chose to cache by simply
opening the image files in Emacs instead, since the implementation is
much simpler, and would hopefully sidestep the objections from the 2014
approach.

While cacheing via tempfiles is more complex, it does have some
benefits: it allows cacheing across Emacs sessions, and it avoids the
side effect of opening the image files in Emacs.

I'm agnostic whether tempfiles or Emacs buffers are ultimately
better. My inclination is to be conservative and stick with the status
quo unless there's a compelling reason to switch.

So, I suggest Ferdinand confirm he's tested the existing "cache" option,
and articulate why he found it unsuitable, before merging this.

If we do proceed in this direction, I'd suggest replacing the current
cache mechanism entirely -- I don't see a good reason to maintain 2
solutions to the same problem. Also, we could combine the "download" and
"cache" options into a single implementation, making them synonyms for
backwards compatibility.

[1] https://lists.gnu.org/archive/html/emacs-orgmode/2014-11/msg00690.html
[2] https://lists.gnu.org/archive/html/emacs-orgmode/2020-01/msg00177.html



Allow to set :follow link parameter for "file" links

2020-12-07 Thread Johan Tolö

Hi all,

For some time I have been using the suggestion by John Kitchin at:

https://kitchingroup.cheme.cmu.edu/blog/2016/11/04/New-link-features-in-org-9/#orgc074278

to "improve" the file link. Since upgrading org mode it no longer 
works. I believe it was caused by the changes introduced with 
commit: afd3b04ec 


Perhaps there is a better way to do this now?

Kind regards,
Johan

--
Johan Tolö, PhD
Department of Physiology/Metabolic Physiology
Institute of Neuroscience and Physiology
The Sahlgrenska Academy at Gothenburg University
Visiting address: Medicinaregatan 11
Postal address: Box 432
SE-405 30 Göteborg
Sweden
Email: johan.t...@gu.se
Phone office: +46(0)317863349
Phone lab: +46(0)317863434