Re: [O] Bug: Matching tags: results incomplete when mixing group tags and their ancestors [9.1.7 (9.1.7-12-g74f6ed-elpaplus @ /home/martin/.emacs.d/elpa/org-plus-contrib-20180305/)]

2018-03-21 Thread Martin Kampas
Hi Bastien,

> If you have time to add tests, that'd be great, as Nicolas suggested.

Here you are.

Best Regards,
Martin

>From bd8059e18fa3bd2977415449139fc626d03817a3 Mon Sep 17 00:00:00 2001
From: Martin Kampas 
Date: Thu, 22 Mar 2018 06:20:31 +0100
Subject: [PATCH] Extend match-sparse-tree test for tag hierarchies

* test-org.el (test-org/match-sparse-tree): Extend test after commit
894ec00 (org.el: Fix recursion stop condition when expanding tags).
---
 testing/lisp/test-org.el | 9 +
 1 file changed, 9 insertions(+)

diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index e97dfe775..8d8b36f86 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -5765,6 +5765,15 @@ Paragraph"
  (org-match-sparse-tree nil "Lev_1")
  (search-forward "H4")
  (org-invisible-p2)))
+  (should-not
+   (org-test-with-temp-text
+   "#+TAGS: [ Lev_1 : Lev_2 ]\n
+#+TAGS: [ Lev_2 : Lev_3 ]\n
+#+TAGS: { Lev_3 : Lev_4 }\n
+* H\n** H1 :Lev_1:\n** H2 :Lev_2:\n** H3 :Lev_3:\n** H4 :Lev_4:"
+ (org-match-sparse-tree nil "Lev_1+Lev_3")
+ (search-forward "H4")
+ (org-invisible-p2)))
   ;; Match regular expressions in tags
   (should-not
(org-test-with-temp-text
-- 
2.16.2






Re: [O] Regression in #+include behavior [master]

2018-03-21 Thread Kaushal Modi
On Tue, Mar 20, 2018 at 3:53 AM Nicolas Goaziou 
wrote:

>
> The code was fixing links in the whole document, not only in the subtree
> you were including.
>
> The problem lay somewhere else in the file, in the "* Hey! I have a link
> [[https://example.org][here]] (Awesome!)" headline.


That was a pathological test case for ox-hugo :)


> There, `org-element-context' needed to check the headline, by (looking-at
> org-complex-heading-regexp). However, since the changes were happening in
> Fundamental mode, the regexp was not set. Hence the error.
>

Thanks! It makes sense now.


> So, the fix implements the following changes:
> - only modify links withing the included part of the document,
> - do not modify anything if includer and includee both live in the same
>   directory,
> - switch to Org mode before proceeding with changes.
>
-- 

Kaushal Modi


[O] [PATCH] ob-clojure-literate.el support :ns header and inject CIDER outside of project

2018-03-21 Thread stardiviner

Two patches

One is to support ob-clojure.el future coming header argument :ns.

The second is to support jack-in CIDER outside of Clojure project by 
default. Not no need to ob-clojure project to be created anymore.


>From f262876da5744ddb7e5e8d4100a0fe02e1bd9e21 Mon Sep 17 00:00:00 2001
From: stardiviner 
Date: Thu, 22 Mar 2018 01:21:22 +0800
Subject: [PATCH 1/2] * ob-clojure-literate.el: CIDER jack-in outside of
 project by default.

---
 contrib/lisp/ob-clojure-literate.el | 50 ++---
 1 file changed, 30 insertions(+), 20 deletions(-)

diff --git a/contrib/lisp/ob-clojure-literate.el b/contrib/lisp/ob-clojure-literate.el
index a7ab1894d..8d419b0b4 100644
--- a/contrib/lisp/ob-clojure-literate.el
+++ b/contrib/lisp/ob-clojure-literate.el
@@ -35,8 +35,10 @@ Don't auto jack in by default for not rude."
   :type 'boolean
   :group 'ob-clojure-literate)
 
-(defcustom ob-clojure-literate-project-location (concat user-emacs-directory "Org-mode/")
-  "The location for `ob-clojure-literate' scaffold project."
+(defcustom ob-clojure-literate-project-location nil
+  "The location for `ob-clojure-literate' scaffold project.
+If it is nil, then `cider-jack-in' will jack-in outside of Clojure project.
+If it is a directory, `ob-clojure-literate' will try to create Clojure project automatically."
   :type 'string
   :group 'ob-clojure-literate)
 
@@ -45,7 +47,7 @@ Don't auto jack in by default for not rude."
 (defvar ob-clojure-literate-session-ns nil)
 (defvar ob-clojure-literate-cider-connections nil)
 
-(defcustom ob-clojure-literate-default-session "*cider-repl ob-clojure*"
+(defcustom ob-clojure-literate-default-session "*cider-repl localhost*"
   "The default session name for `ob-clojure-literate'."
   :type 'string
   :group 'ob-clojure-literate)
@@ -104,23 +106,31 @@ Don't auto jack in by default for not rude."
 (defun ob-clojure-literate-auto-jackin ()
   "Auto setup ob-clojure-literate scaffold and jack-in Clojure project."
   (interactive)
-  (unless (file-directory-p (expand-file-name ob-clojure-literate-project-location))
-(make-directory ob-clojure-literate-project-location t)
-(let ((default-directory ob-clojure-literate-project-location))
-  (shell-command "lein new ob-clojure")))
-  (unless (or
-   (and (cider-connected-p)
-(if (not (null ob-clojure-literate-session))
-(seq-contains cider-connections (get-buffer ob-clojure-literate-session
-   cider-connections
-   (not (null ob-clojure-literate-session)))
-;; return back to original file.
-(if (not (and (= (length (ob-clojure-literate-get-session-list)) 1)
-  (-contains-p (ob-clojure-literate-get-session-list) ob-clojure-literate-default-session)))
-(save-window-excursion
-  (find-file (expand-file-name (concat ob-clojure-literate-project-location "ob-clojure/src/ob_clojure/core.clj")))
-  (with-current-buffer "core.clj"
-(cider-jack-in))
+  (cond
+   ;; jack-in outside of Clojure project.
+   ((null ob-clojure-literate-project-location)
+(if (member (get-buffer "*cider-repl localhost*") cider-connections)
+	(message "CIDER default session already launched.")
+  (cider-jack-in nil)))
+   ((not (null ob-clojure-literate-project-location))
+(unless (file-directory-p (expand-file-name ob-clojure-literate-project-location))
+  (make-directory ob-clojure-literate-project-location t)
+  (let ((default-directory ob-clojure-literate-project-location))
+	(shell-command "lein new ob-clojure")))
+(unless (or
+ (and (cider-connected-p)
+  (if (not (null ob-clojure-literate-session))
+		  (seq-contains cider-connections (get-buffer ob-clojure-literate-session
+ cider-connections
+ (not (null ob-clojure-literate-session)))
+  ;; return back to original file.
+  (if (not (and (= (length (ob-clojure-literate-get-session-list)) 1)
+(-contains-p (ob-clojure-literate-get-session-list) ob-clojure-literate-default-session)))
+  (save-window-excursion
+(find-file (expand-file-name (concat ob-clojure-literate-project-location "ob-clojure/src/ob_clojure/core.clj")))
+(with-current-buffer "core.clj"
+	  (cider-jack-in))
+   ))
 
 (defun ob-clojure-literate-set-local-cider-connections (toggle?)
   "Set buffer local `cider-connections' for `ob-clojure-literate-mode' `TOGGLE?'."
-- 
2.16.2

>From c794c8ecd9a860727fba769b39c373aa84fe9b1f Mon Sep 17 00:00:00 2001
From: stardiviner 
Date: Thu, 22 Mar 2018 01:43:18 +0800
Subject: [PATCH 2/2] * ob-clojure-literate.el: support use :ns header
 argument.

- rename ob-clojure-literate-cider-do-not-find-ns to ob-clojure-literate-set-ns
---
 contrib/lisp/ob-clojure-literate.el | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/contrib/lisp/ob-clojure-literate.el b/contrib/lisp/ob-clojure-liter

Re: [O] cautionary tale: avoid creating/using a macro called "title"

2018-03-21 Thread Eric S Fraga
On Wednesday, 21 Mar 2018 at 02:06, Bastien wrote:
> Hi Eric,
>
> Eric S Fraga  writes:
>
>> I have, until now, used a macro
>>
>>   #+macro title The title of the document
>>
>> to be subsequently used in the actual #+title line, as in
>>
>>   #+title: @@latex:...@@ {{{title}}} @@latex:...@@
>>
>> (LaTeX details not important, I think.)
>
> just out of curiosity, I tried to reproduce this error but it works
> fine here.  Do you still have this error?

Yes.  The following minimal example does not export with my
configuration.

#+begin_src org
  ,#+macro: title The actual title
  ,#+title: @@latex:\fbox{@@ {{{title}}} @@latex:}@@
  ,#+options: toc:nil num:nil

  ,* heading
  And some text follows.

#+end_src

I have not tried with emacs -Q.  I will do so if this example works fine
for you.

Thanks,
eric

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.7-475-g3ffc7d


signature.asc
Description: PGP signature


Re: [O] Connecting to Org ELPA via an HTTP proxy from Emacs 25 and older

2018-03-21 Thread Roland Everaert
The problem is solved for me.

Thank you,


Roland.

On Wed, Mar 21, 2018 at 12:27 AM, Bastien  wrote:

> Hi Keshav and Roland,
>
> I was not aware the redirection could cause such a problem.
>
> Both http://orgmode.org and https://orgmode.org should now
> work, let me know if this fixes your issue.
>
> Thanks for reporting this,
>
> --
>  Bastien
>