From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/88236 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Gnorb and org-refile-use-outline-path Date: Fri, 09 Nov 2018 11:24:16 -0800 Message-ID: <875zx6njfj.fsf@ericabrahamsen.net> 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1541791394 2400 195.159.176.226 (9 Nov 2018 19:23:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Nov 2018 19:23:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: ding@gnus.org Original-X-From: ding-owner+M36446@lists.math.uh.edu Fri Nov 09 20:23:10 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 1gLCN2-0000Ji-1R for ding-account@gmane.org; Fri, 09 Nov 2018 20:23:08 +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 1gLCOT-00069O-Qe; Fri, 09 Nov 2018 13:24:37 -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 1gLCOK-00066P-L0 for ding@lists.math.uh.edu; Fri, 09 Nov 2018 13:24:28 -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 1gLCOJ-0004su-0G for ding@lists.math.uh.edu; Fri, 09 Nov 2018 13:24:28 -0600 Original-Received: from [195.159.176.226] (helo=blaine.gmane.org) by quimby.gnus.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLCOH-0007w4-Oq for ding@gnus.org; Fri, 09 Nov 2018 20:24:25 +0100 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1gLCM8-0007Uf-Uv for ding@gnus.org; Fri, 09 Nov 2018 20:22:12 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:A3rqQ/dy0hkNQVBLur6ZyK5hCkQ= X-Spam-Score: -1.1 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:88236 Archived-At: Michael Heerdegen writes: > Eric Abrahamsen writes: > >> > So like this? >> > >> > (eval-after-load 'org >> > (unless gnorb-gnus-refile-use-outline-path >> > (setq gnorb-gnus-refile-use-outline-path >> > org-refile-use-outline-path))) >> >> Quoted, of course.... > > (or just `with-eval-after-load'?). > > You can do that, but of course only if > gnorb-gnus-refile-use-outline-path -> nil is not a significant value. > Which, I guess, is in your case. There should still be a way for the > user to set gnorb-gnus-refile-use-outline-path nil while having > org-refile-use-outline-path non-nil. > > What I often do in my code instead is: I make such options have an extra > dedicated value, say 'use-org-value-maybe, to mean, in this case, use > the org value or 'file, for example And in the code, whenever the > variable is referenced, I would use > > (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...) > > That's cleaner than silently changing values of options which can lead > to confusion. You would want to make that dedicated value the default, > obviously. Huh. That looks like a lot of work, but maybe you're right it's the only way to have complete control. I might raise this on emacs.devel and see what they think. Thanks, Eric