Re: Cycling through TODO workflow joins the next line onto the current one

2020-09-28 Thread Kyle Meyer
Ihor Radchenko writes:

>> On my emacs 27, following demonstrates the problem.
>
> The patch is attached. It should fix the problem.

Thanks for the patch.

> Subject: [PATCH] Do not remove trailing newline when deleting planning info
>  line.
>
> * lisp/org.el (org-add-planning-info): Remove front newline instead of
> trailing newline when deleting planning info is completetly removed
> from a heading.  Fixes "Cycling through TODO workflow joins the next
> line onto the current one".
>
> The old behaviour affected folded headlines containing only planning
> info in the body:
>
> Before deletion:
> * DONE Headline
>   CLOSED: [2020-09-23 Wed 21:39]
> * test
>
> After deletion:
> * DONE Headline
> * test
>
> The newline after the first headline is hidden making both the
> headlines appear at the same visual line.
>
> New behaviour:
> After deletion:
> * DONE Headline
> * test
>
> All the folded text is completely removed.

Nicely explained, and appears to work well.  Applied (5d4c0f59d) with a
couple of minor tweaks to the commit message:

1:  8e776cca1 ! 1:  5d4c0f59d Do not remove trailing newline when deleting 
planning info line.
@@ Metadata
 Author: Ihor Radchenko 
 
  ## Commit message ##
-Do not remove trailing newline when deleting planning info line.
+Do not remove trailing newline when deleting planning info line
 
 * lisp/org.el (org-add-planning-info): Remove front newline instead of
-trailing newline when deleting planning info is completetly removed
-from a heading.  Fixes "Cycling through TODO workflow joins the next
-line onto the current one".
+trailing newline when planning info is completetly removed from a
+heading.
 
 The old behaviour affected folded headlines containing only planning
 info in the body:
@@ Commit message
 
 All the folded text is completely removed.
 
+Reported-by: Krishan Kharagjitsing 
+Ref: 
https://orgmode.org/list/cakxdjo2xugbotx-xcl7wbxyvp2oj8ivemdmrncvzdrtewzn...@mail.gmail.com
+
  ## lisp/org.el ##
 @@ lisp/org.el: (defun org-add-planning-info (what  time  
remove)
 ;; If there is nothing more to add and no more keyword is



Re: ob-java compile only

2020-09-28 Thread ian martins
Thanks for explaining. That makes sense.

I'm hesitant to add the compile-only header for a couple reasons. Generally
C-c C-c on a source block means "run this" but with compile-only it'll mean
"run this but don't run it." It's semantically inconsistent. Also I want to
bring more feature parity to ob-java, so that there's more consistency
across babel. I'm reluctant to add headers not found elsewhere.

Consider some alternatives:
1. one option is to add a dummy main to every class. it could do nothing or
run unit tests. it's not a bad place to kick off unit tests, but I don't
think you should have to.
2. you could use org-babel-tangle to write out the source files, and
compile from an emacs compile buffer. this might be more convenient than
compiling from babel since recompiles are a single keystroke.
3. a future version of ob-java will know if a class has a "public static
void main." at that point it'll be easy to automatically skip execution of
the class if it doesn't define a main, without the need for a new header.

On Mon, Sep 28, 2020 at 4:11 AM John Herrlin  wrote:

>
> Hey Ian,
>
> Thank you for the quick feedback!
>
> That workflow seems to work perfectly if it's Java all the way. Then it
> compiles all the related files. I am mostly working with the classes
> from Clojure.
>
> Here is an example:
>
>#+HEADER: :classname se/my_test_package/Hey
>#+HEADER: :compile-only t
>#+HEADER: :results none
>#+HEADER: :dir src
>#+BEGIN_SRC java
>  package se.my_test_package;
>
>  public class Hey {
>  public static String hey(String name) {
>  return "Hey " + name;
>  }
>  }
>#+END_SRC
>
>#+BEGIN_SRC clojure :results output code
>  (import [se.my_test_package Hey])
>
>  (Hey/hey "John")
>#+END_SRC
>
>
> Best regards
>
>
>
> ian martins  writes:
>
> > Hi John,
> >
> > Thanks for the suggestion and patch. Is the reason for this so that you
> can
> > have classes without needing dummy "main" methods?
> >
> > Did you consider using org-babel-tangle to generate the source files?
> This
> > works for me:
> >
> > Steps:
> > 1. put javatangle.org (below) on your local.
> > 2. create "pkg" directory where javatangle.org is
> > 3. run org-babel-tangle on javatangle.org (this writes two source files
> to
> > the pkg dir)
> > 4. run C-c C-c on the top source block (this compiles both source files
> and
> > runs main)
> >
> > - javatangle.org -
> >
> > #+begin_src java :results output :classname pkg/Main :tangle
> pkg/Main.java
> >   package pkg;
> >
> >   public class Main {
> >   public static void main(String[] args) {
> >   System.out.println(Hey.hey());
> >   }
> >   }
> > #+end_src
> >
> > #+begin_src java :results output :classname pkg/Hey :tangle pkg/Hey.java
> >   package pkg;
> >
> >   public class Hey {
> >   public static String hey() {
> >   return "hey";
> >   }
> >   }
> > #+end_src
> >
> >
> >
> > On Sun, Sep 27, 2020 at 5:19 PM John Herrlin  wrote:
> >
> >>
> >> Hey Ian!
> >>
> >> Happy to see you as the maintainer of the ob-java!
> >>
> >> I would like to propose a feature to ob-java. The feature allows a
> >> source code block to write and compile only, without executing.
> >>
> >> Here is a common use case for me.
> >>
> >> Class without a entry point have an :compile-only header.
> >>
> >>#+HEADER: :classname se/my_test_package/Hey
> >>#+HEADER: :dir src
> >>#+HEADER: :compile-only t
> >>#+HEADER: :results none
> >>#+BEGIN_SRC java
> >>  package se.my_test_package;
> >>
> >>  public class Hey {
> >>  public static String hey(String name) {
> >>  return "Hey " + name;
> >>  }
> >>  }
> >>#+END_SRC
> >>
> >> The provided diff works for my small use case. What do you think?
> >>
> >> --
> >> Best regards
> >> John
> >>
> >>
>
>
> --
> Mvh John
>


Clock report: Handy way to "Advance" report by 1 week

2020-09-28 Thread Nathan Neff
Hello all,

I was writing this e-mail to ask this question and I got one of those
"Org Mode Rules!" moments and thought I'd share:

I have this clockreport which works great

* Week of  [2020-09-28 Mon]
#+BEGIN: clocktable :scope agenda :maxlevel 2 :tstart "[2020-09-28 Mon]"
:tend "[2020-10-04 Sun]" :fileskip0 t :link t :step day

I simply clone the heading each week using
org-clone-subtree-with-time-shift and
it works awesome

Example:  I clone the original and select +1w and org-mode gives me:

 This Week [2020-10-05 Mon]
#+BEGIN: clocktable :scope agenda :maxlevel 2 :tstart "[2020-10-05 Mon]"
:tend "[2020-10-11 Sun]" :fileskip0 t :link t :step day
#+END:

That is so cool!


[PATCH] Add org-meta*-final-hook

2020-09-28 Thread Jay Bosamiya
Hi all,

Similar to org-shiftup-final-hook, org-shiftdown-final-hook, etc, I have
added org-metaup-final-hook, org-metadown-final-hook, etc. Please see
attached patch.

Please do let me know if any changes are required.

Cheers,
Jay
From 1568c1ab790edd2bb63aba32e8fcd2e3ad3d99fc Mon Sep 17 00:00:00 2001
From: Jay Bosamiya 
Date: Mon, 28 Sep 2020 18:22:50 -0400
Subject: [PATCH] lisp/org.el: Introduce org-meta*-final-hook

* lisp/org.el: Introduce org-meta*-final-hook.
These hooks, similar to org-shift*-final-hook are run at the end of
meta-directionkey after all other options have been exhausted.
---
 lisp/org.el | 20 
 1 file changed, 20 insertions(+)

diff --git a/lisp/org.el b/lisp/org.el
index 26f3f4dd7..6fcb8f0a0 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16795,15 +16795,31 @@ before indentation and \t insertion takes place.")
 (defvar org-metaleft-hook nil
   "Hook for functions attaching themselves to `M-left'.
 See `org-ctrl-c-ctrl-c-hook' for more information.")
+(defvar org-metaleft-final-hook nil
+  "Hook for functions attaching themselves to `M-left'.
+This one runs after all other options have been excluded.
+See `org-ctrl-c-ctrl-c-hook' for more information.")
 (defvar org-metaright-hook nil
   "Hook for functions attaching themselves to `M-right'.
 See `org-ctrl-c-ctrl-c-hook' for more information.")
+(defvar org-metaright-final-hook nil
+  "Hook for functions attaching themselves to `M-right'.
+This one runs after all other options have been excluded.
+See `org-ctrl-c-ctrl-c-hook' for more information.")
 (defvar org-metaup-hook nil
   "Hook for functions attaching themselves to `M-up'.
 See `org-ctrl-c-ctrl-c-hook' for more information.")
+(defvar org-metaup-final-hook nil
+  "Hook for functions attaching themselves to `M-up'.
+This one runs after all other options have been excluded.
+See `org-ctrl-c-ctrl-c-hook' for more information.")
 (defvar org-metadown-hook nil
   "Hook for functions attaching themselves to `M-down'.
 See `org-ctrl-c-ctrl-c-hook' for more information.")
+(defvar org-metadown-final-hook nil
+  "Hook for functions attaching themselves to `M-down'.
+This one runs after all other options have been excluded.
+See `org-ctrl-c-ctrl-c-hook' for more information.")
 (defvar org-shiftmetaleft-hook nil
   "Hook for functions attaching themselves to `M-S-left'.
 See `org-ctrl-c-ctrl-c-hook' for more information.")
@@ -16974,6 +16990,7 @@ and returns at first non-nil value."
 	   (org-at-item-p
 (when (org-check-for-hidden 'items) (org-hidden-tree-error))
 (call-interactively 'org-outdent-item))
+   ((run-hook-with-args-until-success 'org-metaleft-final-hook))
(t (call-interactively 'backward-word
 
 (defun org-metaright ( _arg)
@@ -17012,6 +17029,7 @@ and returns at first non-nil value."
 	   (org-at-item-p
 (when (org-check-for-hidden 'items) (org-hidden-tree-error))
 (call-interactively 'org-indent-item))
+   ((run-hook-with-args-until-success 'org-metaright-final-hook))
(t (call-interactively 'forward-word
 
 (defun org-check-for-hidden (what)
@@ -17069,6 +17087,7 @@ for more information."
((org-at-table-p) (org-call-with-arg 'org-table-move-row 'up))
((org-at-heading-p) (call-interactively 'org-move-subtree-up))
((org-at-item-p) (call-interactively 'org-move-item-up))
+   ((run-hook-with-args-until-success 'org-metaup-final-hook))
(t (org-drag-element-backward
 
 (defun org-metadown ( _arg)
@@ -17099,6 +17118,7 @@ commands for more information."
((org-at-table-p) (call-interactively 'org-table-move-row))
((org-at-heading-p) (call-interactively 'org-move-subtree-down))
((org-at-item-p) (call-interactively 'org-move-item-down))
+   ((run-hook-with-args-until-success 'org-metadown-final-hook))
(t (org-drag-element-forward
 
 (defun org-shiftup ( arg)
-- 
2.20.1



Re: The Website Revamp: The final stretch

2020-09-28 Thread Leslie Watter
A vote for A from me.
I prefer light backgrounds when navigating except on image galleries.

Cheers,

Leslie


On Thu, Sep 24, 2020 at 11:07 PM Samuel Wales  wrote:

> i am lost about a and b and 1-2 and so on.
>
> but  i went to a tecosaur site and noticed that the old unicorn
> covering text when you use large fonts or have a low dpi monitor is no
> longer a problem, whihc is good.  i'd suggest high contrast, light on
> dark, preferably with no glaring whites anywhere.
>
> i probably didn't address any of hte questions though.  :)
>
>
> On 9/24/20, Ihor Radchenko  wrote:
> >> You can find the final 3 concepts here: https://0x0.st/ilFH.pdf, once
> >> again I'd like to encourage any feedback, and ranking of the options.
> >
> > I like A and B with slight preference towards B.
> >
> > Also, the website renders strangely in qutebrowser (see the attached
> > screenshot). Firefox renders everything just fine on the same system.
> >
> > Best,
> > Ihor
> >
> >
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
>
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>
>

-- 
Leslie H. Watter


[feature request] org-agenda-skip-unless

2020-09-28 Thread Alexander Adolf
Hello All,

I wanted to improve a bit on my current, simple agenda setup

(setq org-agenda-custom-commands
  '(("n" "Agenda and all TODOs"
 ((agenda "" nil)
  (alltodo "" ((org-agenda-block-separator "")))

and achieve an agenda with three sections:
1) (agenda "" nil)
2) all todos with some planning information (scheduled or deadline)
3) all todos without any planning information

Number 1 I already have. Number 3 can be achieved with

(org-agenda-skip-function '(org-agenda-skip-if nil '(scheduled deadline)))

But what about number 2? I searched the docs and code, bout couldn't
seem to find anything.

I hence ended up with the idea that I would need a new function,
hypothetically (and cunningly) called org-agenda-skip-unless, which
would do the same as org-agenda-skip-if, but with inverted logic.

With that, my dream agenda would be:

(setq org-agenda-custom-commands
  '(("n" "Agenda and all TODOs"
 ((agenda "" nil)
  (alltodo "" ((org-agenda-block-separator "")
   (org-agenda-overriding-header "TODO items with a date:")
   (org-agenda-skip-function '(org-agenda-skip-unless nil 
'(scheduled deadline)
  (alltodo "" ((org-agenda-block-separator "")
   (org-agenda-overriding-header "Other TODO items:")
   (org-agenda-skip-function '(org-agenda-skip-if nil 
'(scheduled deadline)



Many thanks and looking forward to your thoughts,

  --alexander



Bug: missing autoload org-load-modules-maybe [9.4 (9.4-7-g3eccc5-elpaplus @ /home/standard/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200921/)]

2020-09-28 Thread Tim Frana

Hello,

Reproduction:

Start emacs without loading org, call org-store-link.
Error message is displayed: "Symbol’s function definition is void: 
org-load-modules-maybe"


Expected behaviour:

Org link to the current location is stored.

I guess an autoload should be added? Manually adding one in my setup 
heals it:


(with-eval-after-load 'ol
  (when (not (fboundp 'org-load-modules-maybe))
    (autoload 'org-load-modules-maybe "org" nil nil)))

Best Regards,
Tim


Emacs  : GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2019-09-16
Distribution: Spacemacs develop
Package: Org mode version 9.4 (9.4-7-g3eccc5-elpaplus @ 
/home/standard/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200921/)



current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)

 org-after-todo-state-change-hook '(org-expiry-insert-created)
 org-link-shell-confirm-function 'yes-or-no-p
 org-blank-before-new-entry '((heading . t) (plain-list-item))
 org-babel-after-execute-hook '(spacemacs/ob-fix-inline-images)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-agenda-tags-todo-honor-ignore-options t
 org-export-with-sub-superscripts '{}
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-refile-targets '((nil :maxlevel . 3) (org-agenda-files :maxlevel . 3))
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function

 org-enforce-todo-dependencies t
 org-edit-src-content-indentation 0
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-imenu-depth 8
 org-agenda-files 
'("/home/standard/.spacemacs.d/private/tf-common/_todo.org")

 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-clock-report-include-clocking-task t
 org-modules '(org-habit ol-w3m ol-bbdb ol-bibtex ol-docview ol-gnus 
ol-info ol-irc ol-mhe ol-rmail ol-eww)

 org-startup-folded t
 org-blocker-hook '(org-depend-block-todo)
 org-archive-location "%s_archive.org::"
 org-id-link-to-org-use-id 'create-if-interactive
 org-mode-hook '((lambda nil (setq paragraph-start "\f\\|[ ]*$" 
paragraph-separate "[     \f]*$")) turn-on-auto-fill org-tempo-setup 
org-clock-load
 #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-show-all append local] 5] flyspell-mode 
spacemacs/org-setup-evil-surround spacemacs/load-yasnippet
 #[0 "\301\211\207" [imenu-create-index-function 
org-imenu-get-tree] 2] toc-org-enable org-superstar-mode 
org-download-enable dotspacemacs//prettify-spacemacs-docs 
spacemacs//org-babel-do-load-languages
 #[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 
spacemacs//evil-org-mode org-eldoc-load

 spacemacs//init-company-org-mode company-mode)
 org-clock-persist t
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-outline-path-complete-in-steps nil
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-agenda-restore-windows-after-quit t
 org-confirm-elisp-link-function 'yes-or-no-p
 org-startup-indented t
 org-startup-with-inline-images t
 org-clock-history-length 20
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-hide-block-startup t
 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-expiry-handler-function 'org-toggle-archive-tag
 org-babel-pre-tangle-hook '(save-buffer)
 org-file-apps '((auto-mode . emacs) 
("\\.\\(xlsx?\\|docx?\\|pptx?\\|pdf\\|ods\\|png\\)\\'" . default))
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-babel-load-languages '((dot . t) (calc . t) (plantuml . t) (sql . 
t) (js . t) (shell . t) (emacs-lisp . t))

 org-log-done 'time
 org-export-backends '(confluence md ascii html icalendar latex odt)
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME 
CONTENTS WIDTH)"]

 org-trigger-hook '(org-depend-trigger-todo)
 org-priority-lowest 68
 org-agenda-loop-over-headlines-in-active-region nil
 org-src-lang-modes '(("arduino" . arduino) ("redis" . redis) ("php" . 
php) ("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-fontify-done-headline nil
 org-agenda-prefix-format '((agenda . " %i %-12:c%?-12t% s") (timeline 
. "  % s") (todo . " %i %b") (tags . " %i %-12:c") (search . " %i %-12:c"))

 org-occur-hook '(org-first-headline-recenter)
 org-log-into-drawer t
 org-protocol-protocol-alist '(("capture-eww-readable" :protocol 
"capture-eww-readable" :function 

Re: Bug: Math mode doesn't work if followed by a dash [9.4 (nil @ /home/gutin/.emacs.d/.local/straight/build/org-mode/)]

2020-09-28 Thread Richard Lawrence
Hi Gutin,

gutin  writes:

> What I meant is that if you type
>
>   $*$-algebra
>
> and hit C-c C-x C-l, then the "$*$" doesn't get replaced with a
> mathematical image. A similar problem happens when you export to Latex:
> The dollar signs get escaped.

I believe this is intentional. There are too many other uses of dollar
signs that people might want to use in Org documents that might be
broken if Org treated them as math mode delimiters; so the regexp that
matches math mode delimiters is deliberately limited in scope.

The recommended workaround is to use the \(...\) style of delimiter for
math mode instead, which is much less ambiguous. Here is a function that
makes this easy, by inserting these delimiters when you type "$". It's
been posted on this mailing list before, and I use a version of it
myself; it's very useful!

   ;; from Nicolas Richard 
   ;; Date: Fri, 8 Mar 2013 16:23:02 +0100
   ;; Message-ID: <87vc913oh5@yahoo.fr>
   (defun yf/org-electric-dollar nil
 "When called once, insert \\(\\) and leave point in between.
   When called twice, replace the previously inserted \\(\\) by one $."
  (interactive)
  (if (and (looking-at ")") (looking-back "("))
  (progn (delete-char 2)
 (delete-char -2)
 (insert "$"))
(insert "\\(\\)")
(backward-char 2)))
   (define-key org-mode-map (kbd "$") 'yf/org-electric-dollar

Hope that helps!

-- 
Best,
Richard



Re: Bug: Math mode doesn't work if followed by a dash [9.4 (nil @ /home/gutin/.emacs.d/.local/straight/build/org-mode/)]

2020-09-28 Thread Richard Lawrence
Hi Gutin,

gutin  writes:

> If a pair of dollar signs is followed by a dash, then math mode doesn't
> work.

Can you say a bit more about what you are trying to do, what you are
expecting to happen, and what you are seeing instead?

Since you refer to math mode, I assume you are exporting to LaTeX. I
just tested this:

some text
$$-1$$
other text

and it exports fine to LaTeX on my machine (Emacs 26.1, Org 9.4).
What's broken for you?

-- 
Best,
Richard



Bug: Math mode doesn't work if followed by a dash [9.4 (nil @ /home/gutin/.emacs.d/.local/straight/build/org-mode/)]

2020-09-28 Thread gutin



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.
-
---

If a pair of dollar signs is followed by a dash, then math mode doesn't
work.

Emacs  : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.22, cairo version 1.17.3)
 of 2020-08-28
Package: Org mode version 9.4 (nil @
/home/gutin/.emacs.d/.local/straight/build/org-mode/)

current state:
==
(setq
 org-footnote-auto-label 'plain
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-
configure-edit-buffer
 doom-modeline-set-org-src-modeline)
 org-fontify-whole-heading-line t
 org-link-shell-confirm-function 'yes-or-no-p
 org-mode-local-vars-hook '(eldoc-mode)
 org-babel-after-execute-hook '(org-redisplay-inline-images)
 org-insert-heading-respect-content t
 org-after-refile-insert-hook '(save-buffer)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-refile-targets '((nil :maxlevel . 3) (org-agenda-files :maxlevel .
3))
 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-special-ctrl-a/e t
 org-imenu-depth 8
 org-agenda-files '("~/org/")
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-
default
 org-reveal-start-hook '(org-decrypt-entry)
 org-modules '(ol-bibtex)
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-mode-hook '(doom--setq-gcmh-high-cons-threshold-for-org-mode-h
er/add-org-mode-expansions
 +lookup--init-org-mode-handlers-h
 (closure (t) ( _) (add-hook 'before-save-hook
'org-encrypt-entries nil t))
 #[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
 #[0 "\301\211\207" [imenu-create-index-function org-
imenu-get-tree] 2]
 doom-disable-show-paren-mode-h doom-disable-show-
trailing-whitespace-h
 +org-enable-auto-reformat-tables-h +org-enable-auto-
update-cookies-h
 +org-make-last-point-visible-h evil-org-mode toc-org-
enable embrace-org-mode-hook
 org-eldoc-load)
 org-clock-persist 'history
 org-export-with-smart-quotes t
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME
CONTENTS)"]
 org-outline-path-complete-in-steps nil
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-agenda-finalize-hook '(+org-exclude-agenda-buffers-from-workspace-
h
+org-defer-mode-in-agenda-buffers-h)
 org-startup-indented t
 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-agenda-deadline-faces '((1.001 . error) (1.0 . org-warning) (0.5 .
org-upcoming-deadline)
 (0.0 . org-upcoming-distant-deadline))
 org-crypt-key nil
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(+org-yas-expand-maybe-h +org-indent-maybe-h org-
babel-hide-result-toggle-maybe
  org-babel-header-arg-expand +org-cycle-only-
current-subtree-h
  +org-clear-babel-results-h)
 org-hide-leading-stars t
 org-load-hook '(+org-init-org-directory-h +org-init-appearance-h +org-
init-agenda-h
 +org-init-attachments-h +org-init-babel-h +org-init-
babel-lazy-loader-h
 +org-init-capture-defaults-h +org-init-capture-frame-h 
+org-init-custom-links-h
 +org-init-export-h +org-init-habit-h +org-init-hacks-h 
+org-init-keybinds-h
 +org-init-popup-rules-h +org-init-protocol-h +org-
init-protocol-lazy-loader-h
 +org-init-smartparens-h)
 org-link-abbrev-alist '(("doom-repo" . "
https://github.com/hlissner/doom-emacs/%s;)
 ("wolfram" . "
https://wolframalpha.com/input/?i=%s;)
 ("wikipedia" . "
https://en.wikipedia.org/wiki/%s;)
 ("duckduckgo" . "https://duckduckgo.com/?q=%s;
)
 ("gmap" . "https://maps.google.com/maps?q=%s;)
 ("gimages" . "https://google.com/images?q=%s;)
 ("google" . "https://google.com/search?q=;)
 ("youtube" . 

Bug: clocktable

2020-09-28 Thread matthias
Salut l’équipe d’Orgmode,

J’ai un soucis avec le clocktable  qui semble être un bug car il n’accepte pas 
les attributs latex avant la ligne BEGIN:
#+latex_header: \usepackage{tabularx}
#+ATTR_LATEX: :align Xll :width \textwidth
#+BEGIN: clocktable :scope file :maxlevel 2

la seul solution que j'ai trouvé, c'est la suivante (mettre l’attribut après le 
BEGIN :) :
#+latex_header: \usepackage{tabularx}
#+BEGIN: clocktable :scope file :maxlevel 2
#+ATTR_LATEX: :align Xll :width \textwidth

Mais à chaque fois que je met à jour le clocktable (C-c C-c) la ligne 
d'attribut latex disparait.

 

Cordialement.

 

Matt


openpgp-digital-signature.asc
Description: PGP signature


Re: org-table-sum

2020-09-28 Thread Robert Pluim
> On Mon, 28 Sep 2020 14:50:38 +0200, Jeremie Juste 
>  said:
>> 
>> You could make org-table-sum use calc, which would achieve the same. I
>> donʼt think there'd be any complaints about floating-point additions
>> suddenly being more accurate (famous last words)
Jeremie> I have investigated a little further about using calc. I haven't 
come up
Jeremie> with a solution yet. I don't know yet which function calc is using 
to
Jeremie> perform this operation. I have tried calcFunc-vsum but fell back 
on the
Jeremie> same issue.

Jeremie> #+BEGIN_SRC elisp
Jeremie> (calcFunc-vsum 85.6 .1)
Jeremie> #+end_src   

I donʼt think calcFunc-vsum is intended to be called by lisp code
directly. Iʼd investigate how TBLFM calls it, and see if that can be
moved into org-table-sum.

Robert
-- 



Re: org-table-sum

2020-09-28 Thread Jeremie Juste
Hello Robert,

Thanks for sharing your thoughts.

> I suspect that the people using org-table sum would not want to split
> the function in two: itʼs a useful utility function (and why split off
> the integer summing? Thatʼs always going to be accurate).
I see your point here and I agree with you.

>
> You could make org-table-sum use calc, which would achieve the same. I
> donʼt think there'd be any complaints about floating-point additions
> suddenly being more accurate (famous last words)
I have investigated a little further about using calc. I haven't come up
with a solution yet. I don't know yet which function calc is using to
perform this operation. I have tried calcFunc-vsum but fell back on the
same issue.

#+BEGIN_SRC elisp
(calcFunc-vsum 85.6 .1)
#+end_src   

-- 
Best regards
Jeremie Juste



Re: org-table-sum

2020-09-28 Thread Robert Pluim
> On Sun, 27 Sep 2020 01:07:22 +0200, Jeremie Juste 
>  said:

Jeremie> Hello,
Jeremie> Thanks for the input.

Jeremie> From what I understand, it seems that org-table-sum is not 
behaving as
Jeremie> expected. I don't know if it would be interesting to split the 
function
Jeremie> into 2. One for summing of time values and one for summing 
integers?

I suspect that the people using org-table sum would not want to split
the function in two: itʼs a useful utility function (and why split off
the integer summing? Thatʼs always going to be accurate).

Jeremie> For the sum of integers (possibly real numbers) it might be 
interesting
Jeremie> to make a function use TBLFM directly? 

You could make org-table-sum use calc, which would achieve the same. I
donʼt think there'd be any complaints about floating-point additions
suddenly being more accurate (famous last words)

Robert
-- 



Re: [Feature Request] Diagrams

2020-09-28 Thread Eric S Fraga
On Sunday, 27 Sep 2020 at 15:29, Roshan Diwakar wrote:
> https://github.com/mingrammer/diagrams
> But still a source block literate programming option would make it
> immensely useful

This does look good/useful.  Obviously needs somebody to implement
ob-diagrams...

In the meantime, you may wish to look at the graphviz package which is
supported by org babel: ob-dot.el.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-35-g4b6495



Re: [BUG] orgalist: Hickup in fill-paragraph with orgalist in markdown-mode

2020-09-28 Thread Daniel Hornung
Am Sunday, 27 September 2020, 12:35:41 CEST schrieb Nicolas Goaziou:
> Daniel Hornung  writes:
> > when in markdown-mode, fill-paragraph behaves strangely in lists if the
> > orgalist minor mode is enabled.
> > 
> > In the following example, when the cursor is in the first item of the
> > list,
> > pressing M-q or executing fill-paragraph does not recognize that line 3 is
> > another list item:
> 
> I just released orgalist 1.13, which should fix this problem. Please let
> me know how it goes. You need to wait for GNU ELPA to catch up, tho.

Hi,

it works again for me in orgalist 1.13.

Thank you!
Daniel

-- 

Daniel Hornung

IndiScale - Wir machen individuelles Datenmanagement skalierbar.

IndiScale GmbH
Lotzestraße 22a
37083 Göttingen

T: +49-551-288 76 48-2
E: d.horn...@indiscale.com

Amtsgericht Göttingen • HRB 205721 • Geschäftsführung Henrik tom Wörden


signature.asc
Description: This is a digitally signed message part.


Re: [PATCH] Enhance org-html--build-meta-info

2020-09-28 Thread Jens Lechtenboerger
On 2020-09-28, TEC wrote:

> Jens Lechtenboerger  writes:
>
>> On 2020-09-28, TEC wrote:
>>
>>> Jens Lechtenboerger  writes:
 Also, in org-html--build-meta-info you call
 org-html-encode-plain-text with two arguments, but it just accepts
 one.
>>>
>>> ? No I don't.
>>
>> Your patch contains this:
>>
>> +  (let* ((title (org-html-encode-plain-text (plist-get info :title)
>> info))
>
> O, that's the bit you were referring to. That's just copied from
> the
> current state (iirc). Anyway, I dropped the second argument.

Without the second argument I get an error “Wrong type argument:
stringp,” when evaluating regular expressions against the cons cell
that is returned as title.

As I see now, author and title are cons cells, which is why
org-element-interpret-data is necessary to produce strings with Org
syntax.

Also, after fixing the title, I get “wrong-type-argument sequencep
utf-8” for “(concat "text/html;charset=" charset)”.

Best wishes
Jens



Re: ob-java compile only

2020-09-28 Thread John Herrlin


Hey Ian,

Thank you for the quick feedback!

That workflow seems to work perfectly if it's Java all the way. Then it
compiles all the related files. I am mostly working with the classes
from Clojure.

Here is an example:

   #+HEADER: :classname se/my_test_package/Hey
   #+HEADER: :compile-only t
   #+HEADER: :results none
   #+HEADER: :dir src
   #+BEGIN_SRC java
 package se.my_test_package;

 public class Hey {
 public static String hey(String name) {
 return "Hey " + name;
 }
 }
   #+END_SRC

   #+BEGIN_SRC clojure :results output code
 (import [se.my_test_package Hey])

 (Hey/hey "John")
   #+END_SRC


Best regards



ian martins  writes:

> Hi John,
>
> Thanks for the suggestion and patch. Is the reason for this so that you can
> have classes without needing dummy "main" methods?
>
> Did you consider using org-babel-tangle to generate the source files? This
> works for me:
>
> Steps:
> 1. put javatangle.org (below) on your local.
> 2. create "pkg" directory where javatangle.org is
> 3. run org-babel-tangle on javatangle.org (this writes two source files to
> the pkg dir)
> 4. run C-c C-c on the top source block (this compiles both source files and
> runs main)
>
> - javatangle.org -
>
> #+begin_src java :results output :classname pkg/Main :tangle pkg/Main.java
>   package pkg;
>
>   public class Main {
>   public static void main(String[] args) {
>   System.out.println(Hey.hey());
>   }
>   }
> #+end_src
>
> #+begin_src java :results output :classname pkg/Hey :tangle pkg/Hey.java
>   package pkg;
>
>   public class Hey {
>   public static String hey() {
>   return "hey";
>   }
>   }
> #+end_src
>
>
>
> On Sun, Sep 27, 2020 at 5:19 PM John Herrlin  wrote:
>
>>
>> Hey Ian!
>>
>> Happy to see you as the maintainer of the ob-java!
>>
>> I would like to propose a feature to ob-java. The feature allows a
>> source code block to write and compile only, without executing.
>>
>> Here is a common use case for me.
>>
>> Class without a entry point have an :compile-only header.
>>
>>#+HEADER: :classname se/my_test_package/Hey
>>#+HEADER: :dir src
>>#+HEADER: :compile-only t
>>#+HEADER: :results none
>>#+BEGIN_SRC java
>>  package se.my_test_package;
>>
>>  public class Hey {
>>  public static String hey(String name) {
>>  return "Hey " + name;
>>  }
>>  }
>>#+END_SRC
>>
>> The provided diff works for my small use case. What do you think?
>>
>> --
>> Best regards
>> John
>>
>>


--
Mvh John