From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eduardo Ochs Newsgroups: gmane.emacs.help Subject: Integrating eev and org-capture/org-capture-set-target-location Date: Fri, 4 Jun 2021 00:41:03 -0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4809"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs , Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 04 05:41:54 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lp0iX-00017I-RG for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 04 Jun 2021 05:41:53 +0200 Original-Received: from localhost ([::1]:47572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lp0iW-0008TK-AL for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 03 Jun 2021 23:41:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lp0i0-0008Sw-6q for help-gnu-emacs@gnu.org; Thu, 03 Jun 2021 23:41:20 -0400 Original-Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:46657) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lp0hx-0004ia-FZ for help-gnu-emacs@gnu.org; Thu, 03 Jun 2021 23:41:19 -0400 Original-Received: by mail-pj1-x1035.google.com with SMTP id pi6-20020a17090b1e46b029015cec51d7cdso5071525pjb.5 for ; Thu, 03 Jun 2021 20:41:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=7HKWNEeeHQQPyiv2KXaii7QuStrQ0zS02QQZP/GUrEQ=; b=YN53NjaE0hp+9RBfqwws8JS9VTWCvQp8eOxRLDgJPwAtIhl412WQ1Ge/hipmPc4FTQ 5wyFbhtSA3J7eOAeM/5v18LennziSqqeKF5hlvQjnyy9/9iKxMx0Aq2g102LsXC6N4lf SvAkdL8b4o5FjgsxDIzGz5tqNzJy9+clv40r7PKKwxtEWtLufEMrl/aBM0dLzT4wRVha 3b3z/11jbeKOO2mAbbX7MtlwTNSzw2hlieCAy6CY9Xe7/j1oyj6sZMllF0eu3caHf2va DFR135OEvvw2qOKGKKWom4PBbjzqkyFPKTxmBYP5kndYQf4aVDyQ1bRb8PIskklyQFVj Nk8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=7HKWNEeeHQQPyiv2KXaii7QuStrQ0zS02QQZP/GUrEQ=; b=VJz/6uXhuiQmYz0YJZd/HwsmUfwjk9P/8UA0wGoPkkaXfupbjjF/jrKXjJn+vxYZVW KTJRVBhp1+4upz4YSfr6wWvE3ilw3SE+9VFIZyzCaDbmMV9mGvoL3Mf37wnUiRbVfW3y MdCJ1T5b2MtruDQIKhoTeHxE/syGceorxN6dHQ0lNzA/wfUxFytWfGwGEuuehxhCeJmF h5oICdI/v+E5Qza2yPLH9lxwMH7EGqvI3BHe+O4jTsc+L5IsvMGnV3wQp6so+TmJ0ehe gWxOYZhAojJup0xneVtBs8YjoPw9eYzqaB79qfddRdM0KimoMFs01dNcHmuN1ppuu7ls 9Flg== X-Gm-Message-State: AOAM531s+CLHFq+8f1ebw9KIlLPoTFZFKWIPxd6MXyZvlUXMOKMgHyij WDnVDQtLcEERwcQhxWi1y45Xi9rb0Tarfat4fBz713YRflM= X-Google-Smtp-Source: ABdhPJz1d6JJDJrBAHC9Ae6iQ81Mm+WhfwhiPnEwEdUYJ36pUZEbjpaZkxD9eQvJkyoN0P+P84imAuj+BxRX8xfS+94= X-Received: by 2002:a17:90a:9103:: with SMTP id k3mr14430748pjo.117.1622778074821; Thu, 03 Jun 2021 20:41:14 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=eduardoochs@gmail.com; helo=mail-pj1-x1035.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:130537 Archived-At: Hi Jean Louis, this is an answer to these messages that you sent: https://lists.gnu.org/archive/html/help-gnu-emacs/2021-06/msg00028.html https://lists.gnu.org/archive/html/help-gnu-emacs/2021-06/msg00055.html I decided to create a new thread, and I'm working on org-capture first. I'll leave org-protocol for later. I watched Prot's video about org-capture - https://www.youtube.com/watch?v=qCdScs4YO8k - and I am trying to implement a function that works as a sexp hyperlink to a "target" structure like the ones that appear in org-capture-templates. These target structures are documented here: (find-evardescr 'org-capture-templates) (find-evardescr 'org-capture-templates "\ntarget") (find-evardescr 'org-capture-templates "\ntarget" "file+headline") (find-orgnode "Capture templates" "file+headline") (find-orgnode "Template elements" "\ntarget") In Prot's video he uses targets like these, (file+headline "tasks.org" "Task list") (file+headline "tasks.org" "Links to buffers/files") and I am trying to write a function `find-orgctarget' such that (find-orgctarget '(file+headline "tasks.org" "Task list")) would open the file (concat org-directory "/tasks.org") and then find the headline "* Task list" in it, and put the point in the line following that headline. After a few very naive attempts I got this definition for `find-orgctarget': (require 'org-capture) (defun find-orgctarget (target) (org-capture-set-target-location target) (org-capture-finalize t)) but when I run this (find-orgctarget '(file+headline "tasks.org" "Task list")) I get this error: org-capture-finalize: This does not seem to be a capture buffer for Org mode Do you - or anyone else - know how to fix that? Thanks in advance! Eduardo Ochs http://angg.twu.net/#eev http://angg.twu.net/eev-intros/find-eev-quick-intro.html#3 (find-eev-quick-intro "3. Elisp hyperlinks")