Re: [O] ob-sql company

2019-07-02 Thread Tim Cross


Ag Ibragimov  writes:

> I've been using ob-sql to query DBs right from Org-mode and I love it. The 
> only thing I could wish for is auto-completion. Does anyone know if it is 
> possible at all to make it work so Company would show possible table/column 
> names? That would be huge and then I wouldn't have to use external tools like 
> Postico.

as far as I'm aware, this is not possible.

The challenge is in dealing with the different databases - there would
need to be some sort of query layer which was able to interrogate
whatever mechanism the database uses as its data dictionary to find
names of schemas, tables, views, functions, indexes and then columns in
those tables, view, indexes etc. Oviously, it can be done as this is
what tools like dbeaver,  pgAdmin, sqlDeveloper etc all do.

>From memory, there have been some modes which a db specific that attempt
to do this sort of thing (I seem tor recall there was one for Oracle
sqlplus).

-- 
Tim Cross



[O] Org Version 9.2.4 Insert Template at Point Doesn't Respect :empty-lines Property

2019-07-02 Thread Dominic Surano
I recently upgraded to Org-mode version 9.2.4 from 9.1.9 and when I insert
a capture template at point in an org-file using C-0 C-c c or C-0 M-x
org-capture, it appears that properties :empty-lines, :empty-lines-after,
and :empty-lines-before are not respected. In all instances, regardless of
these values, the heading is moved to the lowest possible line before the
next heading. Has anyone else experienced this? I reviewed the Org-mode 9.2
Changes  and nothing obvious popped out.
Is there a variable I'm missing? Is there anything in that changed in
org-capture that would cause this? Can anyone replicated this?

I tried the following capture-template on both versions:

(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/org/gtd.org" "Tasks")
   "* TODO %?\n  %i\n  %a" :empty-lines 2)
  ("j" "Journal" entry (file+datetree "~/org/journal.org")
   "* %?\nEntered on %U\n  %i\n  %a")))

And received the following:

* Version 9.1.9

** First Heading
** TODO New Capture at Point


** Second Heading

* Version 9.2.4

** First Heading
** TODO New Capture at Point
** Second Heading

If it's not clear, the New Capture at Point template removes all spaces
between itself and the Second Heading. I also posted this question on Reddit

and
StackExchange

but
didn't receive any responses.
-- 
Dominic Surano
Email is my fastest and preferred method of contact
Phone, address, etc. available upon request

Life should be an adventure 


[O] Bug: org-agenda-list attempts to add text properties to agenda header even if org-agenda-overriding-header is set to "" [9.2.4 (release_9.2.4-386-gb855ac @ /home/nick/elisp/org-mode/lisp/)]

2019-07-02 Thread Nick Dokos



Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


Evaluate the following form:

 (let ((org-agenda-overriding-header "")) (org-agenda-list))

It fails with

 org-agenda-list: Args out of range: 0, 1

It seems that the following code in org-agenda-list:

--8<---cut here---start->8---
 ...
  (unless org-agenda-compact-blocks
(let* ((d1 (car day-numbers))
   (d2 (org-last day-numbers))
   (w1 (org-days-to-iso-week d1))
   (w2 (org-days-to-iso-week d2)))
  (setq s (point))
  (org-agenda--insert-overriding-header
(concat (org-agenda-span-name span)
"-agenda"
(cond ((<= 350 (- d2 d1)) "")
  ((= w1 w2) (format " (W%02d)" w1))
  (t (format " (W%02d-W%02d)" w1 w2)))
":\n")))
(add-text-properties s (1- (point)) (list 'face 'org-agenda-structure
  'org-date-line t))
(org-agenda-mark-header-line s))
--8<---cut here---end--->8---

tries to add text properties to the string even though it has been set to the
empty string.

I was able to reproduce this after it was reported on the Emacs SE:


https://emacs.stackexchange.com/questions/51354/is-there-any-way-to-hide-agenda-date-header

Emacs  : GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32)
 of 2019-05-01
Package: Org mode version 9.2.4 (release_9.2.4-386-gb855ac @ 
/home/nick/elisp/org-mode/lisp/)
-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler