[O] [PATCH] lisp/ob-sql.el: Fix filename conversion in minGW environment.

2017-04-11 Thread Xi Shen
Hi,

Regarding a patch I made early. Ref. title: [PATCH] ob-sql.el: Support
sqlcmd and cygwin environment.

I found it does not for Emacs for Windows. More generally, it does not work
in minGW or MSYS environments. I think it is because minGW is not a POSIX
environment, and applications in minGW can actually talk to Windows system
and handle Windows file path directly.

Because there's no official way to identify if Emacs is in minGW
environment, I must roll out cygwin environment first, then I test if it is
in "windows-nt" environment.

Please review the patch, and let me know if you have any comments/question.


Thanks,
David


ob-sql.el.patch
Description: Binary data


Re: [O] is it bad to have both org and org-plus-contrib installed?

2017-04-11 Thread Cook, Malcolm
Hi,
Coming late to this fray and responding to original Subject

If you

(require 'use-package)

Then you might find the following to work, as I do:

(use-package org
  :ensure org-plus-contrib ; following 
http://emacs.stackexchange.com/questions/7890/org-plus-contrib-and-org-with-require-or-use-package
;; .. etc
)

YMMV,

Malcolm

From: Emacs-orgmode [mailto:emacs-orgmode-bounces+mec=stowers@gnu.org] On 
Behalf Of Kaushal Modi
Sent: Tuesday, April 11, 2017 5:39 PM
To: Thomas S. Dye ; Alan Schmitt 

Cc: emacs-orgmode 
Subject: Re: [O] is it bad to have both org and org-plus-contrib installed?

Hi all,

I just discovered a bug in this advice that I suggested earlier in this 
thread.. I needed to fix the order of packages in the new-ret list that is 
returned. The bug was that the order of pkgs in new-ret was flipped compared to 
that in orig-ret.. so I needed to flip it back using reverse.

So just for record, here is the fixed function:

;; http://emacs.stackexchange.com/a/26513/115
(defun modi/package-dependency-check-ignore (orig-ret)
  "Remove the `black listed packages' from ORIG-RET.

Packages listed in the let-bound `pkg-black-list' will not be auto-installed
even if they are found as dependencies.

It is known that this advice is not effective when installed packages
asynchronously using `paradox'. Below is effective on synchronous
package installations."
  (let ((pkg-black-list '(org))
new-ret
pkg-name)
(dolist (pkg-struct orig-ret)
  (setq pkg-name (package-desc-name pkg-struct))
  (if (member pkg-name pkg-black-list)
  (message (concat "Package `%s' will not be installed. "
   "See `modi/package-dependency-check-ignore'.")
   pkg-name)
(push pkg-struct new-ret)))
;; Tue Apr 11 17:48:16 EDT 2017 - kmodi
;; It's *very* critical that the order of packages stays the same in NEW-RET
;; as in ORIG-RET. The `push' command flips the order, so use `reverse'
;; to flip the order back to the original.
;;   Without this step, you will get errors like below when installing
;; packages with dependencies:
;;   Debugger entered--Lisp error: (error "Unable to activate package 
‘nim-mode’.
;;   Required package ‘flycheck-28’ is unavailable")
(setq new-ret (reverse new-ret))
new-ret))
(advice-add 'package-compute-transaction :filter-return 
#'modi/package-dependency-check-ignore)

On Tue, Jan 24, 2017 at 11:28 AM Thomas S. Dye 
> wrote:

Alan Schmitt writes:

> Thank you for the suggestion, but I use Spacemacs, which in turn uses
> paradox.
>
> Why couldn't there be an org-contrib package, depending on org? So that
> way org would not be duplicated in two packages.

I've run into the same problem with Spacemacs and would welcome a
solution.

All the best,
Tom

--
Thomas S. Dye
http://www.tsdye.com
--

Kaushal Modi


Re: [O] is it bad to have both org and org-plus-contrib installed?

2017-04-11 Thread Kaushal Modi
Hi all,

I just discovered a bug in this advice that I suggested earlier in this
thread.. I needed to fix the order of packages in the new-ret list that is
returned. The bug was that the order of pkgs in new-ret was flipped
compared to that in orig-ret.. so I needed to flip it back using reverse.

So just for record, here is the fixed function:

;; http://emacs.stackexchange.com/a/26513/115
(defun modi/package-dependency-check-ignore (orig-ret)
  "Remove the `black listed packages' from ORIG-RET.

Packages listed in the let-bound `pkg-black-list' will not be auto-installed
even if they are found as dependencies.

It is known that this advice is not effective when installed packages
asynchronously using `paradox'. Below is effective on synchronous
package installations."
  (let ((pkg-black-list '(org))
new-ret
pkg-name)
(dolist (pkg-struct orig-ret)
  (setq pkg-name (package-desc-name pkg-struct))
  (if (member pkg-name pkg-black-list)
  (message (concat "Package `%s' will not be installed. "
   "See `modi/package-dependency-check-ignore'.")
   pkg-name)
(push pkg-struct new-ret)))
;; Tue Apr 11 17:48:16 EDT 2017 - kmodi
;; It's *very* critical that the order of packages stays the same in
NEW-RET
;; as in ORIG-RET. The `push' command flips the order, so use `reverse'
;; to flip the order back to the original.
;;   Without this step, you will get errors like below when installing
;; packages with dependencies:
;;   Debugger entered--Lisp error: (error "Unable to activate package
‘nim-mode’.
;;   Required package ‘flycheck-28’ is unavailable")
(setq new-ret (reverse new-ret))
new-ret))
(advice-add 'package-compute-transaction :filter-return
#'modi/package-dependency-check-ignore)

On Tue, Jan 24, 2017 at 11:28 AM Thomas S. Dye  wrote:

>
> Alan Schmitt writes:
>
> > Thank you for the suggestion, but I use Spacemacs, which in turn uses
> > paradox.
> >
> > Why couldn't there be an org-contrib package, depending on org? So that
> > way org would not be duplicated in two packages.
>
> I've run into the same problem with Spacemacs and would welcome a
> solution.
>
> All the best,
> Tom
>
> --
> Thomas S. Dye
> http://www.tsdye.com
>
-- 

Kaushal Modi


Re: [O] org-link-search failing to find links created by clock table

2017-04-11 Thread Stacey Marshall
*** Some additional information, by example

Emacs  : GNU Emacs 25.2.1 (x86_64-apple-darwin16.4.0, Carbon Version 157 AppKit 
1504.81)
 of 2017-03-07
Package: Org mode version 9.0.5 (release_9.0.5-351-g0e0fda.dirty @ 
/Users/stacey/.emacs.d/org-mode/lisp/)

In this buffer the TODO keywords are FIXME and FIXED, as set by:

#+SEQ_TODO: FIXME FIXED

Clock table generated with C-c C-x C-r and then modified to include link and 
increase maxlevel to include the sample CLOCK entries below.

#+BEGIN: clocktable :maxlevel 4 :scope subtree :link t 
#+CAPTION: Clock summary at [2017-04-11 Tue 23:29]
| Headline   | Time  |   | | |
|+---+---+-+-|
| *Total time*   | *1h 4min* |   | | |
|+---+---+-+-|
| \_
[[file:/Users/stacey/Dropbox/org-mode.org::Example%20of%20the%20issue][Example 
of the issue]] |   |   | 1h 4min | |
| \_  [[file:/Users/stacey/Dropbox/org-mode.org::Test%20log][Test log]] 
  |   |   | | 0h 4min |
| \_  [[file:/Users/stacey/Dropbox/org-mode.org::FIXME%20Test%20log][FIXME 
Test log]] |   |   | | 1h 0min |
#+END:

- Test Log link works, its link is:
  - FIXME Test log does not, its link is:
  
 Test log
:LOGBOOK:
CLOCK: [2017-04-11 Tue 23:20]--[2017-04-11 Tue 23:24] =>  0:04
:END:
 FIXME Test log
:LOGBOOK:
CLOCK: [2017-04-11 Tue 22:20]--[2017-04-11 Tue 23:20] =>  1:00
:END:


--
Stacey






[O] org-link-search failing to find links created by clock table

2017-04-11 Thread Stacey Marshall
created a clock table and the resulting links fail to work. I get a message:

condition-case: No match for fuzzy expression: DONE private data removed".
Tracked that down to lisp/org.el org-link-search() where there are two 
identical messages. Changing the first to add the word "heading" confirms it is 
the first search that was in operation. Adding a message to print out title-re 
I see the following

^\*+.*\(?:COMMENT[ ]\)?.*DONE.+private.+data.+removed\.
If I manually edit the link and remove the TODO keyword (DONE) the link then 
works.

Looking at org.el function org-search-link it requests the heading without the 
keyword (org-get-headeing t t t ).

But as seen, the link from the clock table has the keyword.

org-clock.el function org-clock-table-data sets hdl (when links are requested):

(org-make-org-heading-search-string
 (replace-regexp-in-string
  org-bracket-link-regexp
  (lambda (m) (or (match-string 3 m)
 (match-string 1 m)))
  (match-string 2)))
That's as far as I've gotten….




--
Stacey





Re: [O] Radio targets

2017-04-11 Thread R C
Hi,
Please see attached. The org file is just:

* <<>> heading
  The discussion in *abc* highlights the issue.


On Tue, Apr 11, 2017 at 5:28 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> R C  writes:
>
> > I set up radio targets such as <<>> in a heading, which makes
> all
> > occurrences of the word analysis to be links to the heading. However this
> > seems to override the boldface settings such *Analysis*, so that the
> > asterisks show up in the exported text. Is there a way to get around
> > this?
>
> Could you show an ECM demonstrating the issue?
>
> Regards,
>
> --
> Nicolas Goaziou
>


tst.pdf
Description: Adobe PDF document


tst.org
Description: Binary data


Re: [O] Radio targets

2017-04-11 Thread Nicolas Goaziou
Hello,

R C  writes:

> I set up radio targets such as <<>> in a heading, which makes all
> occurrences of the word analysis to be links to the heading. However this
> seems to override the boldface settings such *Analysis*, so that the
> asterisks show up in the exported text. Is there a way to get around
> this?

Could you show an ECM demonstrating the issue?

Regards,

-- 
Nicolas Goaziou