From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id eKYiCqWUXV+dUwAA0tVLHw (envelope-from ) for ; Sun, 13 Sep 2020 03:40:21 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id gJFsBKWUXV8dRQAAbx9fmQ (envelope-from ) for ; Sun, 13 Sep 2020 03:40:21 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AB2D49400D3 for ; Sun, 13 Sep 2020 03:40:20 +0000 (UTC) Received: from localhost ([::1]:40436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHIsF-00069w-KM for larch@yhetil.org; Sat, 12 Sep 2020 23:40:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHIrj-00069J-FT for emacs-orgmode@gnu.org; Sat, 12 Sep 2020 23:39:47 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:45830) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHIrh-00068r-K4 for emacs-orgmode@gnu.org; Sat, 12 Sep 2020 23:39:47 -0400 Received: by mail-pf1-x42e.google.com with SMTP id k15so9881148pfc.12 for ; Sat, 12 Sep 2020 20:39:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=z5Ve6PTQb03SWTgBUyd+tm8lDmT7Pc3LbjccCc4BH5w=; b=j9oJOrcG1+09yUczVjXCvYUO16qUltZMzgk9NVeBWrXlAH43AnWJm4NRefq+4KVZZS 58PlPLoWmIwqQKmxRcYeth2gVBjsZewI5z0PTkF+P4t4K9fFGzYM50mAB+LLumeYFYue q0wBiATizheQ1sMkS74y5cmKLIPv6bJAceEYPY1Nl1WYm9JIji1gR0uSaSau46UBF9o0 dOq5wvGb9AhW+F/W+tbmOA/f/4fwppf4cUuLCNOXvwLa8adhBhvYxatugZ3knAKWUYiD DUQzqS1Y2y1Oadbn2xCotjQJQnSSfxTThhFQH6qf/MMBeOyfH90VKEdOiej/t5+Qrq7n UKAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=z5Ve6PTQb03SWTgBUyd+tm8lDmT7Pc3LbjccCc4BH5w=; b=fpLeWyhuHBkHM+iMUEeINmQ0vVxc/sdGLCx/4Zd5sriJK+g4a+QFklgxttel8Ec5GS DeeM0dPITkLVM6jfxVBmDXcGDWjaz3tRBttri9Fh5rD8X2JGpUz67wBswus/KsgOPipJ j8tYMxde36pVSmXnR2PfmWHV6LRyajJyXpWBflxI7nfi1wDdF2vMk0J/6li1wHMMG2eU PQ+kigdjT4oWFZjtmUEqK0kVnwu9+8XzyNV+UbW35JfZExIf7xrkzK1bDzTyv0iYboWR Anrl5+VjSjqwDcW6dUCe6N3tMTOrqw2o9uBeglvkudsnIIHM8IzaBNENH3TYXhx5VjOa 2vXQ== X-Gm-Message-State: AOAM533FCjNP9U9w5Qz4NZ40MZ6m2bwey1oMa9QDVnDhCtkfAWO97aQc azDXihgWHejID78xX9U12gc= X-Google-Smtp-Source: ABdhPJym4u5GMqY6gjaK4P6MS7XixHK9OdOWarYHpSGaprT7liGgwQSURd0voTU4Ppp1FamhLD+LHQ== X-Received: by 2002:a62:3146:0:b029:13e:d13d:a08e with SMTP id x67-20020a6231460000b029013ed13da08emr8501017pfx.37.1599968383348; Sat, 12 Sep 2020 20:39:43 -0700 (PDT) Received: from localhost ([173.254.200.139]) by smtp.gmail.com with ESMTPSA id h7sm5273820pgc.58.2020.09.12.20.39.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 20:39:42 -0700 (PDT) From: Ihor Radchenko To: John Haman , emacs-orgmode@gnu.org Subject: Re: Possible conflict with outline-magic In-Reply-To: <376e69cc-e9aa-e31a-66ab-42d745203719@johnhaman.org> References: <376e69cc-e9aa-e31a-66ab-42d745203719@johnhaman.org> Date: Sun, 13 Sep 2020 11:38:43 +0800 Message-ID: <87d02qcpmk.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=yantar92@gmail.com; helo=mail-pf1-x42e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=j9oJOrcG; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 0.29 X-TUID: Knq/GTVogKRL > But I'm not sure why this should work while the configuration that comes= =20 > with outline-magic interacts with org-capture. org-mode is derived mode based on outline-mode. "Derived" in Emacs means that outline-mode-hook also runs in org-mode. org-capture-mode is derived mode based on org-mode. So, it runs org-capture-mode-hook, org-mode-hook, and outline-mode-hook. The first version of the code you used is not valid: >> (use-package outline-magic >> ... >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 (require 'outline-cycle)))) There is no 'outline-cycle feature provided by outline-magic package. Hence, when you run org-capture, it is trying to run outline-magic-hook that runs (require 'outline-cycle), which does not exist. Hence, the error you observed. I believe that the code you used (and copied from Example section of outline-magic package) is carried out from the times when outline-magic was called outline-cycle. You might consider reporting this as a bug in outline-magic github page. Best, Ihor John Haman writes: > Well, I was able to fix my issue using the configuration on EmacsWiki > > (use-package outline-magic > =C2=A0 :ensure t > =C2=A0 :config > =C2=A0 (eval-after-load 'outline > =C2=A0=C2=A0=C2=A0 '(progn > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (require 'outline-magic) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (define-key outline-minor-mode-map = (kbd "")=20 > 'outline-cycle)))) > > But I'm not sure why this should work while the configuration that comes= =20 > with outline-magic interacts with org-capture. > > -John > > On 9/12/20 9:52 AM, John Haman wrote: >> Hello, I would like to use the outline-magic package to cycle headings=20 >> in outline-mode. I installed outline magic, and put the recommended=20 >> configuration in my init file. >> >> (use-package outline-magic >> =C2=A0 :ensure t >> =C2=A0 :config >> =C2=A0 (add-hook 'outline-mode-hook >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (lamb= da () >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 (require 'outline-cycle)))) >> >> The package works great! I can easily cycle visibility of headings in=20 >> outline-mode with TAB. No further configuration. >> >> After installing outline-magic, my org-capture stopped working. I have=20 >> a very benign capture configuration. >> >> (use-package org-capture >> =C2=A0 :after org >> =C2=A0 :hook >> =C2=A0 (org-capture-mode . evil-insert-state) >> =C2=A0 :custom >> =C2=A0 (org-capture-templates ... ... )) >> >> When I call org-capture now, I get an error: >> >> Template key: >> File mode specification error: (file-missing Cannot open load file No=20 >> such file or directory outline-cycle) >> org-capture: Capture abort: (file-missing Cannot open load file No=20 >> such file or directory outline-cycle) >> >> How do I prevent this strange interaction between outline-magic and=20 >> org-capture? >> >> What I tried: >> >> - Loading outline-magic after org-mode. >> >> - Deleting Elpa folder and reinstalling all packages. >> >> No luck so far. >> >> (Note: I cannot switch from outline-mode to markdown-mode because=20 >> markdown-mode has fontificiation issues on the files I edit) >> >> Thanks all, any help here is greatly appreciated. >> >> John >>