[O] Update org-agenda-ndays in org-mode documentation

2018-03-15 Thread Khalfani Wadlington
The documentation for org-agenda-custom-commands
 at
https://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.html uses


org-agenda-ndays

in the customization instead of

org-agenda-span

org-agenda-ndays  is deprecated in org-version 9.


Can somebody update it because it took me an embarrassingly long time to
figure out what was wrong with my customization.


Re: [O] [PATCH] ob-sql.el: Improve Oracle connection and usage for ob-sql.

2018-03-15 Thread Pierre Téchoueyres
Nicolas Goaziou  writes:
Hi Nicolas,
> ...
> It looks good.
>
> I added two spaces at the end of sentences and pushed it.
> ...

I'm sorry I did a mistake in the previous patch. There is an
inconsistency between  the code in `org-babel-sql-dbstring-oracle' and
the example provided in the ORG-NEWS file.

So I attached two patches:
- the first (0001-ORG-NEWS-...) correct the example in order to match to the 
code,
- the second (0001-ob-sql.el...) correct the codein order to match to the 
example.

Personnaly I prefer the last as it match better with the habits of
thoses who uses Oracle's products (We talk almost ever in term of
database than in term of servers).

But it's up to you.

>From e04cbea0ac40cd54f3973c3824b7c82c4d4246f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre=20T=C3=A9choueyres?= 
Date: Thu, 15 Mar 2018 19:20:23 +0100
Subject: [PATCH] ORG-NEWS: Correct Oracle connection and usage for ob-sql.

* etc/ORG-NEWS: match exemple with code in lisp/ob-sql.el
Use :host instead of :database in call.
---
 etc/ORG-NEWS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 01a9361df..c19a0dfe1 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -212,7 +212,7 @@ parameters.  See example bellow.
   ,#+END_SRC
 
   or the alias defined in your TNSNAMES file
-  ,#+BEGIN_SRC sql :engine oracle :dbuser me :dbpassword my_insecure_password :database my_tns_alias
+  ,#+BEGIN_SRC sql :engine oracle :dbuser me :dbpassword my_insecure_password :host my_tns_alias
   select sysdate from dual;
   ,#+END_SRC
 #+END_SRC
-- 
2.14.3

>From fd4ae337ac3a38bc9c9a422628482d6f46599bac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre=20T=C3=A9choueyres?= 
Date: Thu, 15 Mar 2018 19:15:14 +0100
Subject: [PATCH] ob-sql.el: Improve Oracle connection and usage for ob-sql.

* lisp/ob-sql.el (org-babel-sql-dbstring-oracle): Permit to omit host
and port to allow use of alias defined in Oracle's TNSNAMES files.
This now allow two way calling it :
/@:/
or
/@
---
 lisp/ob-sql.el | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
index f44bf5674..d030cf528 100644
--- a/lisp/ob-sql.el
+++ b/lisp/ob-sql.el
@@ -112,10 +112,13 @@ Pass nil to omit that arg."
 
 (defun org-babel-sql-dbstring-oracle (host port user password database)
   "Make Oracle command line arguments for database connection.
-If PORT and DATABASE are nil then don't pass them.  This allows
-you to use names defined in your \"TNSNAMES\" file."
-  (concat (format "%s/%s@%s" user password host)
-	  (and port database (format ":%s/%s" port database
+If HOST and PORT are nil then don't pass them.  This allows
+you to use names defined in your \"TNSNAMES\" file.
+So you can connect with /@:/ or
+/@ using it's alias."
+  (cond ((and user password database (not (and host port))) (format "%s/%s@%s" user password database))
+	((and user password database host port) (format "%s/%s@%s:%s/%s" user password host port database))
+	(t (user-error "Missing information to connect to database."
 
 (defun org-babel-sql-dbstring-mssql (host user password database)
   "Make sqlcmd command line args for database connection.
-- 
2.14.3



[O] org-return does not work in magit's git-commit-setup-hook

2018-03-15 Thread kadal
I have the line (add-hook 'git-commit-setup-hook 'orgstruct++-mode) but 
(org-return) does not work when edting the commit message.


This is the backtrace:

"Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  looking-at(nil)
  org-return()
  (cond ((eq 'line-break (car (org-element-context))) 
(org-return-indent)) ((or (and (eq 'link (car (org-element-context))) 
(not (eolp))) (bolp)) (org-return)) ((org-inlinetask-in-task-p) 
(org-return)) ((org-at-item-checkbox-p) (cond ((and (eolp) (not (eq 
'item (car (org-element-context) (org-insert-todo-heading nil)) 
((and (eolp) (eq 'item (car (org-element-context (let* ((v 
(line-beginning-position)) (v (point))) (cl--set-buffer-substring v v 
""))) ((eq 'paragraph (car (org-element-context))) (goto-char 
(org-element-property :end (org-element-context))) 
(org-insert-todo-heading nil)) (t (org-return ((org-in-item-p) (cond 
((and (looking-at " ::") (looking-back "- " 3)) (beginning-of-line) 
(delete-region (line-beginning-position) (line-end-position))) ((and 
(looking-at "$") (looking-back "- " 3)) (beginning-of-line) 
(delete-region (line-beginning-position) (line-end-position))) ((and 
(looking-at "$") (looking-back "[0-9]*. " (line-beginning-position))) 
(beginning-of-line) (delete-region (line-beginning-position) 
(line-end-position))) (t (end-of-line) (org-insert-item 
((org-at-heading-p) (if (not (string= "" (org-element-property :title 
(org-element-context (progn (org-end-of-subtree) 
(org-insert-heading-respect-content) (outline-show-entry)) 
(beginning-of-line) (let* ((v (line-beginning-position)) (v 
(line-end-position))) (cl--set-buffer-substring v v "" 
((org-at-table-p) (if (-any\? (function (lambda (x) (not (string= "" 
x (nth (- (org-table-current-dline) 1) (remove 'hline 
(org-table-to-lisp (org-return) (beginning-of-line) (let* ((v 
(line-beginning-position)) (v (line-end-position))) 
(cl--set-buffer-substring v v "")) (org-return))) (t (org-return)))
  (if ignore (org-return) (cond ((eq 'line-break (car 
(org-element-context))) (org-return-indent)) ((or (and (eq 'link (car 
(org-element-context))) (not (eolp))) (bolp)) (org-return)) 
((org-inlinetask-in-task-p) (org-return)) ((org-at-item-checkbox-p) 
(cond ((and (eolp) (not (eq 'item (car (org-element-context) 
(org-insert-todo-heading nil)) ((and (eolp) (eq 'item (car 
(org-element-context (let* ((v (line-beginning-position)) (v 
(point))) (cl--set-buffer-substring v v ""))) ((eq 'paragraph (car 
(org-element-context))) (goto-char (org-element-property :end 
(org-element-context))) (org-insert-todo-heading nil)) (t 
(org-return ((org-in-item-p) (cond ((and (looking-at " ::") 
(looking-back "- " 3)) (beginning-of-line) (delete-region 
(line-beginning-position) (line-end-position))) ((and (looking-at "$") 
(looking-back "- " 3)) (beginning-of-line) (delete-region 
(line-beginning-position) (line-end-position))) ((and (looking-at "$") 
(looking-back "[0-9]*. " (line-beginning-position))) (beginning-of-line) 
(delete-region (line-beginning-position) (line-end-position))) (t 
(end-of-line) (org-insert-item ((org-at-heading-p) (if (not (string= 
"" (org-element-property :title (org-element-context (progn 
(org-end-of-subtree) (org-insert-heading-respect-content) 
(outline-show-entry)) (beginning-of-line) (let* ((v 
(line-beginning-position)) (v (line-end-position))) 
(cl--set-buffer-substring v v "" ((org-at-table-p) (if (-any\? 
(function (lambda (x) (not (string= "" x (nth (- 
(org-table-current-dline) 1) (remove 'hline (org-table-to-lisp 
(org-return) (beginning-of-line) (let* ((v (line-beginning-position)) (v 
(line-end-position))) (cl--set-buffer-substring v v "")) (org-return))) 
(t (org-return"




Re: [O] org mode error "pdf wasn't produced"

2018-03-15 Thread Dereje Tefera
Hi Everyone,

Thank you for your help. Problem fixed. I had to install MIkTex and
reinstall Emacs and all running well so far.


Thank you very much for time

Regards

Dereje



On Thu, Mar 15, 2018 at 10:09 AM, John Hendy  wrote:

> On Thu, Mar 15, 2018 at 10:06 AM, R Jain  wrote:
> > Hi Dereje,
> >
> > Two things:
> > 1) Pygmentize is a python package. I hope you meant trying to install it
> for
> > python, and not Latex or Emacs.
> > http://pygments.org/docs/cmdline/
> > 2) Which Tex software are you using? I recall having some compilation
> errors
> > (last year) when I was setting this up with org-mode. Though I can't put
> my
> > finger on what solved the problem, it was after I installed TexMaker. A
> > friend suggested that it has a very decent library.
> >
> > So, if you have installed the vanilla Miktex, or something else, I'd
> > recommend giving TexMaker a try. Don't recall ever having to open it up
> > though.
>
> I have successfully used MikTex in the past and definitely remember
> having an initial setup cycle of trying to export, checking the Org
> PDF Latex buffer, identifying the missing package(s), installing via
> the MikTex GUI, and repeating until all the errors went away. This may
> be purely because I default to a lean system and don't go for these
> huge meta-packages. If one chooses to install the [La/Lua/Xe]Tex
> world, this might not be the case! I have the same procedure on linux
> with TexLive where I have a default starting set of pkgs and just run
> tlmgr on whatever errors I encounter.
>
> Just one other data point!
>
> The first step is to make sure "pdflatex" is recognized, period. This
> is still not answered.
>
> John
>
> >
> > Let us know. Good luck.
> >
> > --Rishabh
> >
> >
> > On Mar 14 2018, at 3:24 pm, Dereje Tefera  wrote:
> >
> >
> > I saw that there is one error:
> >
> >  "! Package minted Error: You must have `pygmentize' installed to use
> this
> > package." but   when I try to install from the package list says no
> match.
> > and a warning:
> >
> > "Package inputenc Warning: inputenc package ignored with utf8 based
> > engines."
> >
> >
> >
> > Do you think it would be better to reinstall emacs?
> >
> >
> > Regards
> >
> > Dereje
> >
> >
> > On Wed, Mar 14, 2018 at 12:28 PM, Eric S Fraga 
> wrote:
> >
> > On Wednesday, 14 Mar 2018 at 11:39, Dereje Tefera wrote:
> >> Dear John and R Jain,
> >>
> >> I have done all required installation for the Latex and it worked for a
> >> couple of times but it  then crashes. This is the error message I am
> >> getting while trying to export to Latex PDF or Beamer. I really
> appreciate
> >> your cooperation but I completely if you are busy.
> >
> > So, it looks like LaTeX is now being found but that there are errors in
> > the LaTeX created by org.  Have you looked at the LaTeX output buffer,
> > as the error message suggests?
> >
> >> Debugger entered--Lisp error: (error "File
> >> \"c:/Users/deret/Desktop/examp3.pdf\" wasn’t produced.  See \"*Org PDF
> >> LaTeX Output*\" for details")
> >
> > The error will likely be near the end of the buffer.
> >
> > --
> > Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-303-g6cf5fc.dirty
>


Re: [O] org mode error "pdf wasn't produced"

2018-03-15 Thread John Hendy
On Thu, Mar 15, 2018 at 10:06 AM, R Jain  wrote:
> Hi Dereje,
>
> Two things:
> 1) Pygmentize is a python package. I hope you meant trying to install it for
> python, and not Latex or Emacs.
> http://pygments.org/docs/cmdline/
> 2) Which Tex software are you using? I recall having some compilation errors
> (last year) when I was setting this up with org-mode. Though I can't put my
> finger on what solved the problem, it was after I installed TexMaker. A
> friend suggested that it has a very decent library.
>
> So, if you have installed the vanilla Miktex, or something else, I'd
> recommend giving TexMaker a try. Don't recall ever having to open it up
> though.

I have successfully used MikTex in the past and definitely remember
having an initial setup cycle of trying to export, checking the Org
PDF Latex buffer, identifying the missing package(s), installing via
the MikTex GUI, and repeating until all the errors went away. This may
be purely because I default to a lean system and don't go for these
huge meta-packages. If one chooses to install the [La/Lua/Xe]Tex
world, this might not be the case! I have the same procedure on linux
with TexLive where I have a default starting set of pkgs and just run
tlmgr on whatever errors I encounter.

Just one other data point!

The first step is to make sure "pdflatex" is recognized, period. This
is still not answered.

John

>
> Let us know. Good luck.
>
> --Rishabh
>
>
> On Mar 14 2018, at 3:24 pm, Dereje Tefera  wrote:
>
>
> I saw that there is one error:
>
>  "! Package minted Error: You must have `pygmentize' installed to use this
> package." but   when I try to install from the package list says no match.
> and a warning:
>
> "Package inputenc Warning: inputenc package ignored with utf8 based
> engines."
>
>
>
> Do you think it would be better to reinstall emacs?
>
>
> Regards
>
> Dereje
>
>
> On Wed, Mar 14, 2018 at 12:28 PM, Eric S Fraga  wrote:
>
> On Wednesday, 14 Mar 2018 at 11:39, Dereje Tefera wrote:
>> Dear John and R Jain,
>>
>> I have done all required installation for the Latex and it worked for a
>> couple of times but it  then crashes. This is the error message I am
>> getting while trying to export to Latex PDF or Beamer. I really appreciate
>> your cooperation but I completely if you are busy.
>
> So, it looks like LaTeX is now being found but that there are errors in
> the LaTeX created by org.  Have you looked at the LaTeX output buffer,
> as the error message suggests?
>
>> Debugger entered--Lisp error: (error "File
>> \"c:/Users/deret/Desktop/examp3.pdf\" wasn’t produced.  See \"*Org PDF
>> LaTeX Output*\" for details")
>
> The error will likely be near the end of the buffer.
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-303-g6cf5fc.dirty



Re: [O] org mode error "pdf wasn't produced"

2018-03-15 Thread R Jain
Hi Dereje,

Two things:
1) Pygmentize is a python package. I hope you meant trying to install it for 
python, and not Latex or Emacs.
http://pygments.org/docs/cmdline/
2) Which Tex software are you using? I recall having some compilation errors 
(last year) when I was setting this up with org-mode. Though I can't put my 
finger on what solved the problem, it was after I installed TexMaker. A friend 
suggested that it has a very decent library.
So, if you have installed the vanilla Miktex, or something else, I'd recommend 
giving TexMaker a try. Don't recall ever having to open it up though.
Let us know. Good luck.
--Rishabh

On Mar 14 2018, at 3:24 pm, Dereje Tefera  wrote:
>
> I saw that there is one error:
>
> "! Package minted Error: You must have `pygmentize' installed to use this 
> package." but when I try to install from the package list says no match.
> and a warning:
>
> "Package inputenc Warning: inputenc package ignored with utf8 based engines."
>
>
>
>
> Do you think it would be better to reinstall emacs?
>
>
> Regards
>
> Dereje
>
>
> On Wed, Mar 14, 2018 at 12:28 PM, Eric S Fraga  (mailto:esfli...@gmail.com)> wrote:
> > On Wednesday, 14 Mar 2018 at 11:39, Dereje Tefera wrote:
> > > Dear John and R Jain,
> > >
> > > I have done all required installation for the Latex and it worked for a
> > > couple of times but it then crashes. This is the error message I am
> > > getting while trying to export to Latex PDF or Beamer. I really appreciate
> > > your cooperation but I completely if you are busy.
> >
> > So, it looks like LaTeX is now being found but that there are errors in
> > the LaTeX created by org. Have you looked at the LaTeX output buffer,
> > as the error message suggests?
> >
> > > Debugger entered--Lisp error: (error "File
> > > \"c:/Users/deret/Desktop/examp3.pdf\" wasn’t produced. See \"*Org PDF 
> > > LaTeX Output*\" for details")
> >
> > The error will likely be near the end of the buffer.
> > --
> > Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-303-g6cf5fc.dirty
>
>
>
>



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-15 Thread Martin Kampas
Hi,

This seems to fix the bug.

Best Regards,
Martin

>From fef860e356a4ca75366f69ec9c2d52252c9d7d3f Mon Sep 17 00:00:00 2001
From: Martin Kampas 
Date: Thu, 15 Mar 2018 15:41:53 +0100
Subject: [PATCH] Fix matching tags when mixing group tags and their ancestors

* lisp/org.el (org-expand-tags): Fix recursion stop condition

See http://lists.gnu.org/r/emacs-orgmode/2018-03/msg00228.html
---
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 76bc60c88..7bf013390 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13960,7 +13960,7 @@ When DOWNCASE is non-nil, expand downcased TAGS."
 (tag (match-string 2 return-match))
 (tag (if downcased (downcase tag) tag)))
(unless (or (get-text-property 0 'grouptag (match-string 2 return-
match))
-   (member tag work-already-expanded))
+   (member tag tags-already-expanded))
  (setq tags-in-group (assoc tag taggroups))
  (push tag work-already-expanded)
  ;; Recursively expand each tag in the group, if the tag hasn't
-- 
2.16.2






Re: [O] problem exporting: "You need to specify a :file parameter"

2018-03-15 Thread Eric S Fraga
Ignore this email.  Although it is true that something has changed in
how org processes src blocks, my invocation was wrong and org now
catches the error properly.  I had to change "output" to "value" to get
the call statement to work.

Thanks and sorry for the noise.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-303-g6cf5fc.dirty


signature.asc
Description: PGP signature


[O] column view with display-line-numbers-mode

2018-03-15 Thread Eric S Fraga
The display-line-numbers-mode introduced in recent Emacs versions is
very nice and works very well generally.  However, org is not aware of
it and this causes a minor problem with the display of the header line
in column view mode.

The line numbers are displayed between the fringe and the actual
contents of the lines and so the text starts some distance from the
window border.  The header has no line numbers so starts immediately
after the fringe.  See attached image.


Not a major problem but I thought I would mention it.  Affects the
æsthetic in me.  :-)

Thanks,
eric

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-303-g6cf5fc.dirty


signature.asc
Description: PGP signature


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

2018-03-15 Thread Roland Everaert
I also face the same problem, which forces me to download and install
manually the package instead of using the ELPA repo.

I would also appreciate a change in behavior of the webserver.


Thanks,

Roland.


On Wed, Mar 14, 2018 at 11:14 PM, Keshav Kini 
wrote:

> Hi,
>
> This mail is about the Org ELPA repository, not Org itself.  Please
> let me know if I've mailed the wrong list.
>
> Inside my corporate network, I must connect to external hosts such as
> orgmode.org via an HTTP proxy.  Most programs on my machine are able
> to access both HTTP and HTTPS URLs through the proxy without any
> problem.
>
> However, it seems that Emacs's URL package, used by many Emacs tools
> including package.el, has been unable to properly establish HTTPS
> connections over an HTTP proxy for a long time:
>
>   https://debbugs.gnu.org/11788
>
> A patch which fixes this problem was written in 2015 by Tao Fang but
> is not currently present in any released Emacs version.  (It will be
> incorporated into Emacs 26, according to the NEWS.26 file in the Emacs
> development repository.)
>
> Meanwhile, the orgmode.org web server is currently responding to HTTPS
> requests with an HTTP 301 status, redirecting the client to the
> corresponding HTTPS URL, i.e. it tries to force the client to use
> HTTPS.  This is in contrast with a couple of other major ELPA
> repositories, MELPA and GNU ELPA:
>
> | $ curl -Is http://orgmode.org/elpa/archive-contents | head -1
> | HTTP/1.1 301 Moved Permanently
> | $ curl -Is http://melpa.org/packages/archive-contents | head -1
> | HTTP/1.1 200 OK
> | $ curl -Is http://elpa.gnu.org/packages/archive-contents | head -1
> | HTTP/1.1 200 OK
>
> This would seem to mean that anyone using an unpatched non-development
> version of Emacs today is unable to connect to the Org ELPA from
> behind an HTTP proxy.  I gather that this must be a recent change in
> behavior, because I have been able to download packages from the Org
> ELPA in the past without any trouble.
>
> Would it be possible for whoever maintains the orgmode.org web server
> to reconfigure it so that it responds to HTTP requests directly as it
> used to do, instead of redirecting to HTTPS?
>
> Thanks,
> Keshav
>
>