Re: [O] possible export bug and org-id fr

2018-03-10 Thread Samuel Wales
On 3/10/18, Samuel Wales  wrote:
> context:

please ignore this part.  idk for certain if it is reproducible.

> fr:

this part remains.  it is similar to duplicate deletion in
org-agenda-text-search-extra-files.



[O] possible export bug and org-id fr

2018-03-10 Thread Samuel Wales
recent maint.

context:

i export a subtree.  it contains an entry with a todo kw that makes
the entry not be exported.  this entry contains an org id link on the
header.  the id target is in a non-agenda file.  org-id does not know
about that target.

export fails.  i wonder if it should succeed?  dunno.

fr:

to fix the problem, i have to set org-id-extra-files, which is
standardly 'text-search-extra-files.

if i set this to all .org and .org_archive files in org-directory, it
will pick up what i need, but it will also cause duplicates with
whatever org-id considers "non-extra".  but that definition could
change in future org versions.  also i might have to add in
text-search-extra-files, which could create more duplicates.

so i wonder if org-id deletes duplicates.  if it does, then i can set
extra files to everything in org-directory.  and maybe add a few more
things too.

-- 
The Kafka Pandemic: 

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
.



[O] [ORG] [FEATURE] ob-js.el support :session for all existing JS packages

2018-03-10 Thread numbch...@gmail.com
After add more code, not it supports `js-comint`, `skewer-mode`, `Indium`.

Waited many days, still no response. Anyone want to review this code?

Recently view Org-mode mailing list, many threads has response. Why my post
does not have any response?

[stardiviner] GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

On Thu, Mar 8, 2018 at 5:41 PM, numbch...@gmail.com 
wrote:

> ​I pushed code at this branch:
> ​
> https://code.orgmode.org/stardiviner/org-mode/src/ob-js-skewer
>
> Hope someone can review it. and merge it.
> (I found https://code.orgmode.org/ does not have the create PR button
> now. Is it disabled?)
>
> [stardiviner] GPG key ID: 47C32433
> IRC(freeenode): stardiviner Twitter:  @numbchild
> Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
> Blog: http://stardiviner.github.io/
>


[O] [BUG] Convert heading with no content to item fails

2018-03-10 Thread Adrian Bradd


Hello,

On master (commit: 51b339105), attempting to convert a blank 
headline to an item with `org-ctrl-c-minus' removes the space 
after the * and org no longer recognizes it as a heading. 

I believe this issue originated in commit 69c5b6c99. Some code was 
added to strip metadata during the conversion in `org-toggle-item' 
with `org-heading-delete-metadata'. '(org-set-tags-to nil)' is 
used to strip tags which in the case of the blank heading results 
in `(delete-region (match-beginning 1) (match-end 1))' being 
called.


`delete-region' in this case removes the space immediately after 
the star/s in the blank headline which puts the line in a state 
that org doesn't consider a headline.


Replacing the removed space following the * or preventing its 
removal would remedy the issue, but I wasn't sure where to 
implement this. Didn't want to make the change in 
`org-set-tags-to' for fear of downstream effects.


Cheers,

--
Adrian

Bioelectronic Systems Lab,
Columbia University


Re: [O] How can I obtain Org via HTTPS?

2018-03-10 Thread Radon Rosborough
> > It does not appear to be possible to obtain the Git repository for Org
> > via HTTPS
>
> FWIW it is now and since a few weeks: see https://orgmode.org

Yep, I noticed and added support for it in straight.el, see
https://github.com/raxod502/straight.el/commit/25a978830a78ecd73a89c355da47d3dc482aab64

Thanks!



Re: [O] How can I obtain Org via HTTPS?

2018-03-10 Thread Bastien Guerry
Hi Radon,

Radon Rosborough  writes:

>> > It does not appear to be possible to obtain the Git repository for Org
>> > via HTTPS
>>
>> FWIW it is now and since a few weeks: see https://orgmode.org
>
> Yep, I noticed and added support for it in straight.el, see
> https://github.com/raxod502/straight.el/commit/25a978830a78ecd73a89c355da47d3dc482aab64

Great, thanks!

-- 
 Bastien



Re: [O] How can I obtain Org via HTTPS?

2018-03-10 Thread Bastien
Hi Radon,

Radon Rosborough  writes:

> It does not appear to be possible to obtain the Git repository for Org
> via HTTPS

FWIW it is now and since a few weeks: see https://orgmode.org

-- 
 Bastien



Re: [O] noweb-ref within section property for emacs-lisp [9.0.3 (9.0.3-elpa @ /home/alanxoc3/.emacs.d/elpa/org-20161224/)]

2018-03-10 Thread Nicolas Goaziou
Hello,

Alan Morgan  writes:

> The bug is fairly self explanatory. noweb-ref works fine in elisp when
> the argument is put in the code block, but it doesn't work when using
> the property section things. Here is a quick example (divided by lines):
>
> --
> This code block will give me an error,
> saying that the function wasn't defined or whatever. :(
>
> #+BEGIN_SRC emacs-lisp :noweb yes
> <>
> #+END_SRC
>
>
> * Testing the noweb-ref thing
>   :PROPERTIES:
>   :header-args:emacs-lisp: :noweb-ref library
>   :END:
>
>   I want these code blocks to be put together. But it don't work bro!
>
>#+BEGIN_SRC emacs-lisp
>  (defun do-something () (print "yes"))
>#+END_SRC
>
>#+BEGIN_SRC emacs-lisp
>  (defun do-something-else () (print "no"))
>#+END_SRC
>
> --

I cannot reproduce it with a recent Org. Could you update yours and try
again? Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: (more) Broken links in Worg [9.0.10 (9.0.10-elpaplus @ /home/mgsk/.emacs.d/elpa/org-plus-contrib-20170827/)]

2018-03-10 Thread Bastien
Hi Mark,

thanks a lot for reporting those broken links.

Most of them should be fixed now.

-- 
 Bastien



Re: [O] How to keep correct filepaths when using the #+INCLUDE derivative?

2018-03-10 Thread Daniel P. Gomez


I've fixed the implementation of 
`org-export--prepare-file-contents` so

that links are relative to the included file. A patch is attached.

I've also created two org files in the test examples directory:
"includer-with-links.org" and "subdir/includee-with-links.org". My 
goal
was to add a test in "test-ox.el" `test-org-export/expand-include` 
that
checks whether, after exporting the "includer-with-links.org" file 
to

Org, the headings *Source and *Target are the same.

I did not figure out how to do this cleanly, so any help 
implementing

the test itself would be greatly appreciated.

Regards,

Daniel

>From b47dcf43067cd57e2ee3c1f8e4dfea94bca7d14b Mon Sep 17 00:00:00 2001
From: Daniel Gomez 
Date: Fri, 2 Mar 2018 14:46:41 +0100
Subject: [PATCH 1/1] Fix file links when using #+INCLUDE

---
 lisp/ox.el  | 36 ++---
 testing/examples/includer-with-links.org| 19 +
 testing/examples/subdir/includee-with-links.org | 12 +
 3 files changed, 64 insertions(+), 3 deletions(-)
 create mode 100644 testing/examples/includer-with-links.org
 create mode 100644 testing/examples/subdir/includee-with-links.org

diff --git a/lisp/ox.el b/lisp/ox.el
index bd49a8a26..f9b2d8095 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -3257,7 +3257,8 @@ avoid infinite recursion.  Optional argument DIR is the current
 working directory.  It is used to properly resolve relative
 paths.  Optional argument FOOTNOTES is a hash-table used for
 storing and resolving footnotes.  It is created automatically."
-  (let ((case-fold-search t)
+  (let ((includer-file (buffer-file-name (buffer-base-buffer)))
+	(case-fold-search t)
 	(file-prefix (make-hash-table :test #'equal))
 	(current-prefix 0)
 	(footnotes (or footnotes (make-hash-table :test #'equal)))
@@ -3373,7 +3374,8 @@ storing and resolving footnotes.  It is created automatically."
 			 (or
 			  (gethash file file-prefix)
 			  (puthash file (cl-incf current-prefix) file-prefix))
-			 footnotes)))
+			 footnotes
+			 includer-file)))
 		 (org-export-expand-include-keyword
 		  (cons (list file lines) included)
 		  (file-name-directory file)
@@ -3451,7 +3453,7 @@ Return a string of lines to be included in the format expected by
 		   counter
 
 (defun org-export--prepare-file-contents
-(file &optional lines ind minlevel id footnotes)
+(file &optional lines ind minlevel id footnotes includer-file)
   "Prepare contents of FILE for inclusion and return it as a string.
 
 When optional argument LINES is a string specifying a range of
@@ -3476,6 +3478,34 @@ Optional argument FOOTNOTES is a hash-table to store footnotes in
 the included document."
   (with-temp-buffer
 (insert-file-contents file)
+;; Adapt all file links within the included document that
+;; contain relative paths in order to make these paths
+;; relative to the base document, or absolute
+(goto-char (point-min))
+(while (re-search-forward org-any-link-re nil t)
+  (let ((link (save-excursion
+		(backward-char)
+		(org-element-context
+	(when (string= "file" (org-element-property :type link))
+	  (let* ((old-path (org-element-property :path link))
+		 (new-path (let ((abspath (expand-file-name
+ old-path
+ (file-name-directory file
+			 (if includer-file
+ (file-relative-name
+  abspath (file-name-directory includer-file))
+			   abspath
+	(insert (let ((new (org-element-copy link)))
+		  (org-element-put-property new :path new-path)
+		  (when (org-element-property :contents-begin link)
+			(org-element-adopt-elements
+			 new
+			 (buffer-substring
+			  (org-element-property :contents-begin link)
+			  (org-element-property :contents-end link
+		  (delete-region (org-element-property :begin link)
+ (org-element-property :end link))
+		  (org-element-interpret-data new)))
 (when lines
   (let* ((lines (split-string lines "-"))
 	 (lbeg (string-to-number (car lines)))
diff --git a/testing/examples/includer-with-links.org b/testing/examples/includer-with-links.org
new file mode 100644
index 0..f97b76375
--- /dev/null
+++ b/testing/examples/includer-with-links.org
@@ -0,0 +1,19 @@
+* Source
+
+#+INCLUDE: "./subdir/includee-with-links.org::*Links" :only-contents t
+
+
+* Target
+
+File link with description
+[[file:subdir/setupfile2.org][A setupfile]]
+
+File link pointing to a specific header
+[[file:normal.org::top]]
+
+Bracketed file link without description
+[[file:subdir/setupfile.org]]
+
+Plain file link
+file:subdir/setupfile.org
+
diff --git a/testing/examples/subdir/includee-with-links.org b/testing/examples/subdir/includee-with-links.org
new file mode 100644
index 0..1f734ab86
--- /dev/null
+++ b/testing/examples/subdir/includee-with-links.org
@@ -0,0 +1,12 @@
+* Links
+File link with description
+[[file:setupfile2.org][A setupfile]]
+
+File link pointing to a speci

Re: [O] bibliographystyle in scimax

2018-03-10 Thread András Simonyi
Dear Joseph,

I'm looking forward to hear about your experiences. FYI, out of
curiosity I tried out citeproc-orgref with mu4e (I don't use GNUS), and
it worked very much as expected except that I've found a typo/bug in the
default bibliography header for html export, which you might wish to
correct by setting the value of the variable

citeproc-orgref-html-bib-header

to something like

"Bibliography\n"

instead of the default syntactically incorrect

"Bibliography\n"

(I plan to have a new release sometime next week which will fix this
among other improvements.)

best wishes,

András

  > Dear Andras,

  > Many thanks  for this  help. I  just succeeded  this morning  to install
  > citeproc   and   citeproc-orgref   (Iignored   the   Emacs   command
  > /package-install-file/, thanks to  you, I know it now!).  Of course, I'm
  > using org-ref that is the best  program that I know to manage references
  > (again, many thanks to John Kitchin for this amazing tool).

  > I am going to test citeprog-ref soon and I will inform you.

  > We stay in touch,

  > Best wishes,

  > Jo



[O] [a outline regexp problem] (was: [SOLVED])

2018-03-10 Thread Uwe Brauer


  > Uwe Brauer  writes: 

  > Ok, good ... ;-) 

However I run into a problem with my daily workflow. I am using 
very often bookmark.el by Karl Fogel.   Especially I have the 
following setting 
  
(defun my-set-outline-bookmark () 
  (interactive) (message "Now the outline-regexp is set to \" 
  [A-Z]*:1.1\" ")) 
 
(add-hook 'bookmark-bmenu-mode-hook 'hide-body) (add-hook 
'bookmark-bmenu-mode-hook 'turn-on-outline-minor-mode) (add-hook 
'bookmark-bmenu-mode-hook 'my-set-outline-bookmark) 

However with the outorg setting and the outline mode, I obtain now 
an  Cannot calculate outcommented outline-regexp without 
’comment-start’ character defined!   The culprit is


(add-hook 'outline-minor-mode-hook 'outshine-hook-function)
I will write Adam Porter.


Uwe Brauer