Re: [O] Greek symbol rendering problem in gnuplot

2019-04-28 Thread Fraga, Eric
Emacs (and hence org) will use whichever gnuplot is found in your $PATH,
assuming you're on Linux (you did not specify).  You also, for babel,
need the gnuplot mode.  I don't understand why you removed the gnuplot
package as it does not have the emacs mode; that is provided by the
separate gnuplot-mode package.

I don't use greek letters so cannot comment on that aspect.
-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.3-327-g3375f0


[O] Greek symbol rendering problem in gnuplot

2019-04-28 Thread Lawrence Bottorff
Maybe take a look at this

issue,
which describes a tortured trek to find a way to get Gnuplot to properly
render Π (pi) in an output graphic. Apparently, the gnuplot package is from
2014 and doesn't handle Greek symbols. Why it will use latest-greatest
gnuplot 5.2.6 and won't render Greek symbols is mysterious. Also, when
executing an org-mode babel gnuplot block, it reports in the minibuffer
that it is using Gnuplot 3.7. However, C-c C-c in the block does start up a
Gnuplot REPL in Emacs, and output does happen -- just with garbled Greek
letters. Odder is when I put the code in a separate file with the mode
running, I can get it to render pi correctly with gnuplot-run-file -- but
not gnuplot-run-buffer. The latter is garbled, the former good. BTW, a
Gnuplot session started at the command line works with Greek symbols just
fine.

So I uninstalled gnuplot and installed newer gnuplot-mode (last updated
2017). Testing just a stand-alone file with the code with
gnuplot-run-buffer produces good results; however, no REPL in Emacs is
started and the gnuplot codeblock in an org file fails. C-c C-c produces

executing Gnuplot code block...
org-babel-execute:gnuplot: Cannot open load file: No such file or
directory, gnuplot

obviously Gnuplot in org-mode babel is meant to run with the gnuplot
package and not the newer gnuplot-mode package. But now I'm stuck without a
way to render Greek letters in a Gnuplot graphic. Something about the
gnuplot package doesn't do Greek symbols and something about gnuplot-mode
doesn't do org-mode babel gnuplot. Please advise.

LB


Re: [O] Bug: Clock/Time summaries don't work across years [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]

2019-04-28 Thread Nicolas Goaziou
Hello,

George Kontsevich  writes:

> There is a rather serious bug with the Clocking feature in Org-mode
>
> If you have a Org section that looks like this
>
> * Test
>   CLOCK: [2019-01-02 Wed 10:06]--[2019-01-02 Wed 11:06] =>  1:00
>  hello
>   CLOCK: [2019-01-02 Tue 10:06]--[2019-01-02 Tue 11:06] =>  1:00
>  hi
>
>
> And then you hit C-c C-x C-d you will get a clock total of two hour. If
> you change one of them to be a different year - for instance:
>
>
> * Test
>   CLOCK: [2019-01-02 Wed 10:06]--[2019-01-02 Wed 11:06] =>  1:00
>  hello
>   CLOCK: [2018-12-11 Tue 15:10]--[2018-12-11 Tue 16:45] =>  1:35
>  hi
>
>
> Then the total shows up at just one hour!
>
> Fortunately I noticed this bug before I submitted incorrect timesheet
> totals to my employer :)

See `org-clock-display-default-range'.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Strike-through messes with heading face [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/local/share/emacs/27.0.50/lisp/org/)]

2019-04-28 Thread Kévin Le Gouguec
Thank you for applying the patch, although after discussing with Stefan
Monnier on help-gnu-emacs[1], I believe the correct fix should go in
Emacs's font-lock.el.  font-lock-prepend-text-property should work just
as well as font-lock-append-text-property, and my patch relies on
undefined behaviour IIUC.

I am currently writing a proper bug report, which I will submit to
bug-gnu-emacs.

https://lists.gnu.org/archive/html/help-gnu-emacs/2019-04/msg00248.html



Re: [O] [PATCH] Fix behaviour of ":dir" when ":mkdirp" is not defined

2019-04-28 Thread Achim Gratz

Am 24.04.2019 um 12:43 schrieb Joaquín Aguirrezabalaga:

   #+begin_src elisp :dir /tmp/some-test-dir :mkdirp t
   default-directory
   #+end_src


Do not hardcode "/tmp" in the tests.


--
Achim.

(on the road :-)




[O] bug#35419: [Proposal] Buffer Lenses and the Case of Org-Mode (also, Jupyter)

2019-04-28 Thread Philipp Stephani
Am Do., 25. Apr. 2019 um 10:41 Uhr schrieb Dmitrii Korobeinikov
:
> I have imagined that at the low level there is an actual data structure that 
> keeps the raw textual data and it could be directly shared by multiple 
> buffers.

That's what indirect buffers do. Maybe the indirect buffer
functionality could be beefed up to support what you want?





[O] Bug: missing `save-excursion' in `org-fast-tag-selection' [9.2.3 (9.2.3-9-g0803e2-elpa @ /home/il/.emacs.d/elpa/org-20190422/)]

2019-04-28 Thread Ingo Lohmar
Hi all, 

I tried to use `org-agenda-set-tags'.  The source buffer (where the
change should be applied) is visible at the same time as the agenda is.
Also, fast tag selection with a single key is enabled.

Under these circumstances, the tag text is appended to the line (not
even necessarily a heading!) where point is in the source buffer visible
next to the agenda, instead of the correct heading that I acted upon.

I tracked this done to a missing `save-excursion' wrapped around the
`save-window-excursion' in `org-fast-tag-selection' (org.el line 14567
in my version).  This would be analogous to what is done in
`org-fast-todo-selection' and fixes my issue.

Thanks!



Emacs  : GNU Emacs 27.0.50 (build 24, x86_64-pc-linux-gnu, X toolkit, Xaw3d 
scroll bars)
 of 2019-02-16
Package: Org mode version 9.2.3 (9.2.3-9-g0803e2-elpa @ 
/home/il/.emacs.d/elpa/org-20190422/)

current state:
==
(setq
 org-agenda-window-setup 'current-window
 org-fast-tag-selection-single-key t
 org-tag-persistent-alist '(("REFILE" . 82) ("SELECT" . 115)))



[O] Setupfile doesn't seem to pass pre-defined macros

2019-04-28 Thread emsenn
Hey y'all,

I've recently been playing more with Org-mode's INCLUDE and SETUPFILE features, 
and think I might have found a bug.

File alpha.org contains

#+MACRO: womble fribble
#+AUTHOR: muffet

File beta.org contains

#+SETUPFILE: ./alpha.org
The womble macro is {{{womble}}}

File gamma.org contains

#+SETUPFILE: ./alpha.org
The author is {{{author}}}

---

Beta exports fine, but Gamma fails, saying: Undefined org macro: author; 
aborting

That seems like a bug to me, but am I misusing it? The manual's section on 
macro replacement says that author is among a few "pre-defined" macros: 
https://orgmode.org/manual/Macro-replacement.html

If I define author in a file, the macro work. If I INCLUDE Alpha it works too. 
But not if I use SETUPFILE.

Thanks for your time,
emsenn



[O] Add a dynamic block to a block agenda

2019-04-28 Thread Gautam Mohan
Hello,

I’m trying to put together some disparate parts of org’s functionality into one 
export and I’m not sure of the best way to do so.

I have a few customized clock report dynamic blocks, a column view dynamic 
block, and some complex tag queries that I handle using the agenda (currently 
displayed as a block agenda)

Is there a way to combine these? The most sensible way I see this is to allow a 
block agenda to somehow read in my dynamic blocks? Another way might be to get 
these agenda views / tag searches as their own dynamic blocks.

My desired workflow is to have all 5-6 of these blocks together at once so I 
can generate a combined report of all their information.

Any help would be greatly appreciated. Thanks in advance!

—Gautam


[O] Bug: Clock/Time summaries don't work across years [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]

2019-04-28 Thread George Kontsevich

There is a rather serious bug with the Clocking feature in Org-mode

If you have a Org section that looks like this

* Test
  CLOCK: [2019-01-02 Wed 10:06]--[2019-01-02 Wed 11:06] =>  1:00
 hello
  CLOCK: [2019-01-02 Tue 10:06]--[2019-01-02 Tue 11:06] =>  1:00
 hi


And then you hit C-c C-x C-d you will get a clock total of two hour. If
you change one of them to be a different year - for instance:


* Test
  CLOCK: [2019-01-02 Wed 10:06]--[2019-01-02 Wed 11:06] =>  1:00
 hello
  CLOCK: [2018-12-11 Tue 15:10]--[2018-12-11 Tue 16:45] =>  1:35
 hi


Then the total shows up at just one hour!

Fortunately I noticed this bug before I submitted incorrect timesheet
totals to my employer :)

George

Emacs  : GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.7)
 of 2019-04-11, modified by Debian
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ 
/usr/share/emacs/26.1/lisp/org/)








[O] Bug: previous-line throws "beginning of buffer" with visual-line-mode on [9.2 (9.2-elpa @ /home/avercruysse/.emacs.d/elpa/org-20181230/)]

2019-04-28 Thread Alec Vercruysse
Hello,

I've recently switched to org mode as my fundamental mode, and do
almost all of my writing in it now. One issue that I've encountered,
however, is that with a lot of text under a single subheading, when
holding the up arrow key to move point up (running previous-line, found
in global-map), emacs throws the "beginning of buffer" exception (and
rings the bell) before moving point up. I still am able to move up a
line, it's just that the cursor movement when holding down the key is no
longer smooth, and I get a visual warning.

I've found that this only occurs when visual-line-mode is set (I use
global-visual-line-mode). When I turn it off, I get no errors.

Emacs  : GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21)
 of 2017-09-22, modified by Debian
Package: Org mode version 9.2 (9.2-elpa @
/home/avercruysse/.emacs.d/elpa/org-20181230/)

current state:
==
(setq
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-activate
org-babel-speed-command-activate)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-tab-before-tab-emulation-hook '(org-tempo-complete-tag)
 org-support-shift-select t
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-from-is-user-regexp "\\"
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(org-indent-mode (lambda nil (setq
company-minimum-prefix-length 2)) latex-style-math-setup org-tempo-setup
er/add-org-mode-expansions
#[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-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees
org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
 org-todo-keywords '((sequence "TODO(t)" "DISCUSS(s)" "IN-PROGRESS(i)" "|"
"DONE(d)" "CANCELED(c)"))
 org-latex-packages-alist '(("" "listings" nil))
 org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el")
("elisp" . "el"))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("id" :follow org-id-open) ("eww" :follow eww :store
org-eww-store-link)
   ("rmail" :follow org-rmail-open :store org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link :export
org-irc-export)
   ("info" :follow org-info-open :export org-info-export :store
org-info-store-link)
   ("gnus" :follow org-gnus-open :store org-gnus-store-link)
   ("docview" :follow org-docview-open :export org-docview-export
:store org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete
org-bbdb-complete-link :store
org-bbdb-store-link)
   ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs") ("doi"
:follow org--open-doi-link)
   ("elisp" :follow org--open-elisp-link) ("file" :complete
org-file-complete-link)
   ("ftp" :follow (lambda (path) (browse-url (concat "ftp:" path
("help" :follow org--open-help-link)
   ("http" :follow (lambda (path) (browse-url (concat "http:" path
   ("https" :follow (lambda (path) (browse-url (concat "https:" path
   ("mailto" :follow (lambda (path) (browse-url (concat "mailto:;
path
   ("news" :follow (lambda (path) (browse-url (concat "news:; path
("shell" :follow org--open-shell-link))
 org-babel-load-languages '((python . t) (ditaa . t) (shell . t))
 org-hierarchical-todo-statistics nil
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-confirm-babel-evaluate nil
 )


[O] Bug: missing `save-excursion' in `org-fast-tag-selection' [9.2.3 (9.2.3-9-g0803e2-elpa @ /home/il/.emacs.d/elpa/org-20190422/)]

2019-04-28 Thread Ingo Lohmar


Hi all, 

I tried to use `org-agenda-set-tags'.  The source buffer, where the
change should be applied is visible at the same time as the agenda is.
Also, fast tag selection with a single key is enabled.

Under these circumstances, the tag text is appended to the line (not
even necessarily a heading!) where point is in the source buffer visible
parallel to the agenda, instead of the correct heading that I acted
upon.

I tracked this done to a missing `save-excursion' wrapped around the
`save-window-excursion' in `org-fast-tag-selection' (org.el line 14567
in my version).  This would be analogous to what is done in
`org-fast-todo-selection' and fixes my issue.

Thanks!



Emacs  : GNU Emacs 27.0.50 (build 24, x86_64-pc-linux-gnu, X toolkit, Xaw3d 
scroll bars)
 of 2019-02-16
Package: Org mode version 9.2.3 (9.2.3-9-g0803e2-elpa @ 
/home/il/.emacs.d/elpa/org-20190422/)

current state:
==
(setq
 org-fast-tag-selection-single-key t
 org-tag-persistent-alist '(("REFILE" . 82) ("SELECT" . 115))
 org-src-window-setup 'other-window)



[O] [PATCH] Fix behaviour of ":dir" when ":mkdirp" is not defined

2019-04-28 Thread Joaquín Aguirrezabalaga
Hello,

I think the behaviour of ":dir" is broken since commit 8b5941330
(ob-core: Make :mkdirp work for :dir too). It only works now if
":mkdirp" is defined.

If I execute the following:

  #+begin_src elisp :dir /tmp/some-test-dir
  default-directory
  #+end_src

Instead of the expected "/tmp/some-test-dir" returned value, I get my
current directory.

Only add ":mkdirp t":

  #+begin_src elisp :dir /tmp/some-test-dir :mkdirp t
  default-directory
  #+end_src

do I get the expected result.

Please find attached my proposal for fixing the issue.

Regards,

Joaquín Aguirrezabalaga

>From 9a6e63a96604dce4efac7780a633341ce00828d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joaqu=C3=ADn=20Aguirrezabalaga?= 
Date: Wed, 24 Apr 2019 11:42:19 +0200
Subject: [PATCH] ob-core: Fix :dir when :mkdirp is not defined

* lisp/ob-core.el (org-babel-execute-src-block): Fix behaviour of
  ":dir path" when ":mkdirp" is not defined.

* testing/lisp/test-ob.el: Add a test case.

Since commit 8b5941330 the behaviour for ":dir path" is broken. Its
value is only considered when ":mkdirp" is defined.
---
 lisp/ob-core.el | 13 +++--
 testing/lisp/test-ob.el |  8 
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 7591e99ca..eaeb56837 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -680,12 +680,13 @@ block."
 		 (mkdirp (cdr (assq :mkdirp params)))
 		 (default-directory
 		   (or (and dir
-			(not (member mkdirp '("no" "nil" nil)))
-			(progn
-			  (let ((d (file-name-as-directory
-	(expand-file-name dir
-(make-directory d 'parents)
-d)))
+			(if (member mkdirp '("no" "nil" nil))
+(file-name-as-directory (expand-file-name dir))
+			  (progn
+(let ((d (file-name-as-directory
+	  (expand-file-name dir
+  (make-directory d 'parents)
+  d
 		   default-directory))
 		 (cmd (intern (concat "org-babel-execute:" lang)))
 		 result)
diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
index facc0a4ba..1833cac3c 100644
--- a/testing/lisp/test-ob.el
+++ b/testing/lisp/test-ob.el
@@ -1635,6 +1635,14 @@ t
  (prog1 (file-directory-p "data/code")
(delete-directory "data" t)
 
+(ert-deftest test-ob-core/dir-no-mkdirp ()
+  "Test :dir without :mkdirp header combination."
+  (org-test-with-temp-text-in-file
+   "#+begin_src emacs-lisp :dir /tmp/test-dir-no-mkdirp
+default-directory
+#+end_src"
+   (should (equal "/tmp/test-dir-no-mkdirp/" (org-babel-execute-src-block)
+
 (ert-deftest test-ob/script-escape ()
   ;; Delimited lists of numbers
   (should (equal '(1 2 3)
-- 
2.20.1