unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jorge <jorge13515@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: How to customize an option to a dynamic value (computed by lisp form)
Date: Tue, 23 Aug 2016 17:26:31 -0300	[thread overview]
Message-ID: <CAJR3QncuRLcqhk0Ga_0YxeES=-K_01QZV3-zGHambvPQO+vpjA@mail.gmail.com> (raw)

Hi.  I set three options to a dynamic value, using the value of the option
`org-directory'.  Now my custom-set-variables call in init.el includes the
following:

   '(org-agenda-files
     (list
      (concat org-directory "/agenda/")
      "~/Dropbox/wanessa_e_jorge/administração_clínica/derma-prime.org"))
   [...]
   '(org-icalendar-combined-agenda-file (concat org-directory "/org.ics"))
   [...]
   '(org-mobile-inbox-for-pull (concat org-directory "/agenda/from-mobile.org"))

The problem is that when I try to customize one of these three options, the
customize buffer does not know that the value was computed dynamically.  For
example, the customize buffer for org-mobile-inbox-for-pull shows the value as
simply "~/org/agenda/from-mobile.org".  This means that if I edit the value to
"~/org/agenda/from-mobile42.org" and save the customization, it will be written
to init.el as a string literal, no longer respecting org-directory.  Then if I
later change org-directory I will have problems.

Previously I worked around this problem by setting these options manually
(editing org-init.el, which is called by init.el), but I think the ideal would
be to use customize, so I decided to ask here.  I have already searched Google
and the list archives.

Thank you for your attention.
-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



             reply	other threads:[~2016-08-23 20:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-23 20:26 Jorge [this message]
2016-08-24 17:50 ` How to customize an option to a dynamic value (computed by lisp form) Pascal J. Bourguignon
2016-08-25 17:55   ` Jorge
2016-08-25 20:54     ` Drew Adams
2016-08-26 12:54       ` Jorge
2016-08-26 13:26         ` Jorge
2016-08-26 14:28         ` Drew Adams
2016-08-26 19:02           ` Jorge
2016-08-26 20:18             ` Jorge
2016-08-26 20:59             ` Drew Adams
2016-08-27 11:50               ` tomas
2016-08-30 20:42               ` Jorge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJR3QncuRLcqhk0Ga_0YxeES=-K_01QZV3-zGHambvPQO+vpjA@mail.gmail.com' \
    --to=jorge13515@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).