From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernhard =?iso-8859-1?Q?Pr=F6ll?= Subject: Re: Insert org-id Link at Point via Outline Path Completion Date: Sun, 2 Aug 2015 09:03:21 +0200 Message-ID: <20150802070321.GA28191@gmail.com> References: <20150801090706.GA3296@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLnIu-0000ay-66 for emacs-orgmode@gnu.org; Sun, 02 Aug 2015 03:03:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLnIr-0002c4-0K for emacs-orgmode@gnu.org; Sun, 02 Aug 2015 03:03:28 -0400 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:33694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLnIq-0002by-Lb for emacs-orgmode@gnu.org; Sun, 02 Aug 2015 03:03:24 -0400 Received: by wicmv11 with SMTP id mv11so100207150wic.0 for ; Sun, 02 Aug 2015 00:03:24 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Xebar Saram Cc: org mode , Dominic Surano Hi again, my guess into the blue: You haven't set the directory as described in the readme (it defaults to nil). Since I don't use helm, I haven't considered it. The purpose of this backend is avoiding the `find-file-noselect' as used in `org-refile' and the `helm-org-agenda-headings' suggested by John. It's somewhat in-between using `org-refile' and an indexing with external tools (recoll for example as recently debated on this list). Regards, Bernhard Pr=F6ll On Sat, 01. Aug 16:20, Xebar Saram wrote: >Thx so much Bernhard > >this looks really promising. i never had luck with either company or >auto-complete t o get it to work reliably (it often stops working even tho= ugh >its still in the mod bar). >anyway i tried it and added this to my config (after cloning from git): > >(add-to-list 'load-path "/home/zeltak/.emacs.g/company-org-headings") >(add-hook 'org-mode-hook >=A0(lambda () (set (make-local-variable 'company-backends) >=A0 =A0 '((company-org-headings))))) > >i dont see it completes on org heading, is there any keys i need to press = or >anything else in need to config? does this work only when you try to inser= t a >link? > >best and thx so much, this look awesome > >P.S have you considered Helm for this as well? > >best > >Z > > > >On Sat, Aug 1, 2015 at 12:07 PM, Bernhard Pr=F6ll = wrote: > > Hi Saram, > > I've been in the same boat and decided to write a company-backend for > this purpose. So if you're already using company-mode, this may be wor= th > looking into: > > https://github.com/mutbuerger/company-org-headings > > Keep in mind that I'm in the process of learning Elisp and > there has been little to no testing done on the package. Furthermore it > uses org-store-link instead of org-id-store-link. > > Regards, > Bernhard Pr=F6ll > > > On Fri, 31. Jul 09:43, Xebar Saram wrote: > > i also have a similar workflow and would love to hear Dominic if y= ou > found a > solution for this or if anyone on the list has other suggestions? > > best > > Z > > On Tue, May 12, 2015 at 10:57 PM, Dominic Surano > wrote: > > =A0 =A0Hello, > > =A0 =A0I use org-mode a lot like a wiki so links to other org-mode= headings > are > =A0 =A0very common. Currently, I navigate to the heading or pull i= t up in > an > =A0 =A0agenda view, store the link with C-l, going back to where I= want to > =A0 =A0insert the link, then insert the link with C-c C-l RET. Thi= s is a > bit > =A0 =A0time consuming. > > =A0 =A0Instead, I would prefer to map a key that allows me to inse= rt a link > at > =A0 =A0the current point using tab completion similar to org-refil= e (C-c > C-w). > =A0 =A0Looking through org-id.el, it seems like > org-id-get-with-outline-path > =A0 =A0completion was designed for this purpose. I tried: > > =A0 =A0(global-set-key "\C-ci" (lambda () (interactive) (org-id-ge= t-with > =A0 =A0outline-path-completion))) > > =A0 =A0but it didn't work as intended. Anyone have any ideas? > > =A0 =A0Thanks! > =A0 =A0-D > > =A0 =A0For reference, I have the following set in my configuration: > > =A0 =A0;; Use global IDs > =A0 =A0(require 'org-id) > =A0 =A0(setq org-id-link-to-org-use-id t) > > =A0 =A0;; Update ID file .org-id-locations on startup > =A0 =A0(org-id-update-id-locations) > > =A0 =A0;; Targets include this file and any file contributing to t= he agenda > - > =A0 =A0up to 9 levels deep > =A0 =A0(setq org-refile-targets (quote ((nil :maxlevel . 9) > =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0(org-agenda-files :maxlevel . 9)))) > =A0 =A0(setq org-refile-use-outline-path 'file) > =A0 =A0(setq org-outline-path-complete-in-steps t) > =A0 =A0(setq org-refile-allow-creating-parent-nodes t) > > > > > >