From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/88237 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.gnus.general Subject: Re: Gnorb and org-refile-use-outline-path Date: Sat, 10 Nov 2018 07:15:35 +0100 Message-ID: <87efbtzce0.fsf@web.de> References: <8736sebxyt.fsf@web.de> <87o9b2wwvr.fsf@ericabrahamsen.net> <87k1lpixdm.fsf@web.de> <875zx9wl65.fsf@ericabrahamsen.net> <87tvkt1m6b.fsf@web.de> <87in19s8i2.fsf@ericabrahamsen.net> <87va59s7ci.fsf@web.de> <87bm6zscab.fsf@ericabrahamsen.net> <874lcrsbw8.fsf@ericabrahamsen.net> <87in17nf69.fsf@web.de> <875zx6njfj.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1541830502 27691 195.159.176.226 (10 Nov 2018 06:15:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 10 Nov 2018 06:15:02 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: ding@gnus.org To: Eric Abrahamsen Original-X-From: ding-owner+M36447@lists.math.uh.edu Sat Nov 10 07:14:57 2018 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLMXp-00073r-H7 for ding-account@gmane.org; Sat, 10 Nov 2018 07:14:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.90_1) (envelope-from ) id 1gLMYy-0003T7-Hk; Sat, 10 Nov 2018 00:16:08 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gLMYm-0003QG-FE for ding@lists.math.uh.edu; Sat, 10 Nov 2018 00:15:56 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1gLMYj-0000p2-VZ for ding@lists.math.uh.edu; Sat, 10 Nov 2018 00:15:56 -0600 Original-Received: from mout.web.de ([212.227.15.4]) by quimby.gnus.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLMYi-0000ge-2j for ding@gnus.org; Sat, 10 Nov 2018 07:15:52 +0100 Original-Received: from drachen.dragon ([94.218.210.177]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lp7Lg-1fpa2u2XXY-00esmp; Sat, 10 Nov 2018 07:15:36 +0100 In-Reply-To: <875zx6njfj.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Fri, 09 Nov 2018 11:24:16 -0800") X-Provags-ID: V03:K1:9nrV1aMaPVaPTgRF47vMuHqYw2agPo8UF9CRfFqVAbPP9SVi5yL Lm8GICD6rML1UgkhHOYq9iD6AfArNIZam3Jxh3K1XCu9+lCGVB6rS444hVlnmn5CPBIlqBM AuVVA8PkzzUk5ZuAI/KqsVagLjpVzjFMBnKfKf8XSVsJWCH1fx9AcuDBZa/m3AOOoODQOi6 nhY+IRoENfAGrKrN4rpoQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:+gVF98aJ8Wk=:zlUN5zdNzLJskb5BBn2D8X SXFwBv88vmO9LM6o3ybXYrm9z6jX1NjzvDmUlMloJUvNwEC0o8ZxsFaqtAmCNg78Pv7pF+LuH zzNbmJfhQY/vmtPFgmkiOb1huuCf+/7K9tlJtiY4fLkgjUwSjfNz95EOHmIMmR0WRqwxOJ9Ei GYX9IXvjbhSCTnAGKl1opT+N8AzgtHQGvrO2lXgXo0n5rEWqDt8lK17W79t0B3zd8VoKdtjxT Ixn6uQaOX9wAdwiIMGPi/knmQn/sSSf5k3uVLEPW82CsmX4xcM1Gqe7v8r2dUzX7l2NNZIGlR GGLB6sjjmKsc1djADN6OxeFYddfizsCLf97cz3TKyE6TTn4w35OD+Bm02sfnpGf074kanggVO JwOmMoPT3Lt/gkqtTOctp3J/964HqkP3efw5dO3RFSXi/4k+iR/R4p32P7uxsbeWsVdhS994H jg+7Yb3Nz7z61D7GCyKSSY/NbfA1AbOvauEJVlM4hXZCVKec5jcBOag4wMqWXKWY4W83JO3sA //kaYsXnIuDccPA1Fv1TfYJcdUWNoIaTYBUMpKGFPDHUhfWl02u0HRY0UtyGIMhrytVE27Mhf 7gmlWkvgqpNhaU5Ox5D+rhRo4HnZlt00Op4Mwc/cnULcn5iDcnDGjquCwX26I4xh9tN6ZAxET C7brZPCR5RChCALa4YGwPFKJ9EVUuybykxwUYryTB6BFgJPDn2jOaEzYhoWXVNk+tRGNPq0pB YA3AFSBn1cp0co47PP2tD3CX2FBF/j7RKibP3wpVMfJeuxcjnhyKye5wq+Yd730k3wItO3ty X-Spam-Score: -2.9 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:88237 Archived-At: Eric Abrahamsen writes: > > (let ((org-refile-use-outline-path > > (if (eq gnorb-gnus-refile-use-outline-path 'use-org-value-maybe) > > (or org-refile-use-outline-path 'file) > > gnorb-gnus-refile-use-outline-path))) > > code...) > > > Huh. That looks like a lot of work Not really. What is really nontrivial work is to find out all places where you need to bind `org-refile-use-outline-path'. Then factor the (if (eq gnorb-gnus-refile-use-outline-path 'use-org-value-maybe) (or org-refile-use-outline-path 'file) gnorb-gnus-refile-use-outline-path) part into a defun `gnorb-get-gnus-refile-use-outline-path', and all you have to do is to bind `org-refile-use-outline-path' to (gnorb-get-gnus-refile-use-outline-path) instead of gnorb-gnus-refile-use-outline-path in all those places. If you had to treat several variables this way, it would be better to define a macro `gnorb-with-org-bindings' that expands into a `let'. But that's still a small and trivial change. Michael.