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 t7ehIeHUw1/KLgAA0tVLHw (envelope-from ) for ; Sun, 29 Nov 2020 17:05:37 +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 cBfPHOHUw1+RRAAAbx9fmQ (envelope-from ) for ; Sun, 29 Nov 2020 17:05:37 +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 D5155940466 for ; Sun, 29 Nov 2020 17:05:36 +0000 (UTC) Received: from localhost ([::1]:34388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjQ8l-0002Hi-Q7 for larch@yhetil.org; Sun, 29 Nov 2020 12:05:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjQ4i-0007RA-Mb for emacs-orgmode@gnu.org; Sun, 29 Nov 2020 12:01:26 -0500 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:39930) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjQ4g-00030y-Hd for emacs-orgmode@gnu.org; Sun, 29 Nov 2020 12:01:24 -0500 Received: by mail-pl1-x636.google.com with SMTP id k5so5137705plt.6 for ; Sun, 29 Nov 2020 09:01:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:message-id :date:mime-version; bh=vYZYTiGUEfX2oB+FFbFsCLZtWyzF2hWh9sqcGP+Zfsw=; b=IesIbq5iuAE+Mf5H+edI1wnIba/XibYnvwDkeJKmpI3KOv0Rav9y/zV2IenmN4e+91 DFM2AuJ8j2RNkSEl7AKTRQoqS9CuBzocn3hYpg4lgv8/ngo42SA0ab/dKXTGtJA1pR0E qOXPHC7dVZxmzw9DeKPald5GMTnvYYhHX4DcXRuCTKnF7S+aix9xNnBP/cCY/qkDdIWU frazj6o0VApCURZpbTXScWp8C8keBIiUCYMn+YrZv/pxt43HrsnDnG5lIMlWyYBCOPZK ZABtX4magrpgkQkZ63wjf9QEn3CgqMHFmMRZURM8RIGcALB6tHTYCr5QnE/q9WQYE9zj uaVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version; bh=vYZYTiGUEfX2oB+FFbFsCLZtWyzF2hWh9sqcGP+Zfsw=; b=rv+sFMvD7pgHWZqzxqYI3Iw+GPf8L9EI/623hh0EYjL4ARYyhUGIZoldwuoPwI3qgr hEB+3qKR7Cmf3wKa31WnoRZLDqpLLtphTin74G2JzY5/+HGrKq1BODqOuPafoPtIGhQu n/RRcK2vnrwYBV51KFcIlKeHCNbD2YkJEFpM1extnVFN+OFr4Q7XMHO636LQL6qILGpt iYkxBjmSGLllT+EOmWG4hMPZmaLr6woO6w5ZgAO33hDYDiERqR5ULI3DF4xF2ia8aVK5 lS66a9puJIp02VIzdR4//7HmPIZ7EFlUikVR/TwseA9GcWlJWOOjr8TVHJHXAeKcxc0O CSJQ== X-Gm-Message-State: AOAM5319+M4wL7Djgg268j12YKa71TNlv77a67bRUXhN4FFrDLQuPqK0 iSiZSmO2x5nJz7PM9MqyHNOU5yoatmjEtQ== X-Google-Smtp-Source: ABdhPJyClXQRQ2nmNROScdqBq60dyMTwBnwANyYx4+zLJNxZmcIIO1K7gykGrxQw4K0SRQ9fK5lOGQ== X-Received: by 2002:a17:902:b08a:b029:d9:eca:7d38 with SMTP id p10-20020a170902b08ab02900d90eca7d38mr14830686plr.72.1606669280480; Sun, 29 Nov 2020 09:01:20 -0800 (PST) Received: from tim-desktop (106-69-115-131.dyn.iinet.net.au. [106.69.115.131]) by smtp.gmail.com with ESMTPSA id y69sm13740617pfb.12.2020.11.29.09.01.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2020 09:01:19 -0800 (PST) References: <87ft4tfgpv.fsf@gmail.com> <874kl9fe7m.fsf@gmail.com> <87wny5dy6j.fsf@gmail.com> <87r1od181i.fsf@gmail.com> <87h7p9135u.fsf@gmail.com> User-agent: mu4e 1.5.7; emacs 27.1.50 From: Tim Cross To: daniela-spit@gmx.it Subject: Re: Adding Org Files to org-agenda-files In-reply-to: Message-ID: <87zh30xfl1.fsf@gmail.com> Date: Mon, 30 Nov 2020 04:01:14 +1100 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=theophilusx@gmail.com; helo=mail-pl1-x636.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: emacs-orgmode@gnu.org, Jean Louis Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.18 X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=IesIbq5i; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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-TUID: gL2tGL4NLFQN daniela-spit@gmx.it writes: >> Sent: Sunday, November 29, 2020 at 5:46 AM >> From: "Jean Louis" >> To: daniela-spit@gmx.it >> Cc: "Org-Mode mailing list" >> Subject: Re: Adding Org Files to org-agenda-files >> >> * daniela-spit@gmx.it [2020-11-29 02:30]: >> > > What you see as a problem some see as a solution. For instance, it depends how many >> > > org-files you want to add to the agenda. Some users including me have 2 >> > > or three files in org-agenda-files so I never interact with this >> > > variable directly. >> > >> > I have many and they change quite frequently, depending on project. >> > So often torture emacs hard. Have sent a bug-report about it. Keen >> > for a change to go through. >> >> You may customize any Emacs variables yourself. Just define your >> agenda files yourself in your init file. Then do: >> >> {M-x customize-variables RET org-agenda-files RET} and erase what you >> find there. >> >> Anything before the `custom' section in your init file will be then >> defined by you and not by the built in system. >> >> In that case you should take care as user over time not to use >> org-agenda-file-to-front command as that would again start adding >> agend files to init file. Then just use your own settings. >> >> As long as you have your own settings hard coded you may erase the >> variable org-agenda-files > > That worries me because I do not want to change the behaviuor of Emacs > for users. Otherwise when people ask for help they will become confused. Just a small clarification on the above directions. If you have *both* a settings in your emacs init file for org-agenda-files using (setq org-agenda-files...) and you have a line in your (custom ...) section, you should remove one of them to avoid confusion. In general, what is in the custom section will take preference as it is usually loaded last. If your going to remove the one in the custom section, run M-x customize-variable org-agenda-files and then select the options under the 'state' button to 'Erase Customisation', don't just erase the values in the 'Value Menu' box. I'm not sure if I would classify the problem you ran into as a bug or user error. Emacs has 2 main ways to customise behaviour. either you can do it manually using things like (setq ...) in your init file, *OR* you can use the customize interface to make the changes using a high level 'widget' base UI. This all works pretty well unless you try to use both methods to customise the same thing. In your case, the correct way to update the org-agenda-files list was to edit your init file, remove the reference to the missing file and then re-evaluae the variable. this is because you have decided to manage that variable yourself using setq. The other alternative is to remove the setq setting from your init file and then set your agenda file list using customize. The critical point is not to use both - one or the other. Many people will use a combination of some things set by hand in their init file and other things set using the customise interface. This is fine but you must ensure you don't use both for the same thing. In your case, because you are not use to configuring Emacs manually, I would strongly recommend you stick to using the customise interface. Later, when your more use to customising Emacs, you can move to doing your customisation in your init file by hand (if you want/need to - many never do and just use the customisation interface). The customisation interface is great when your not use to Elisp and don't yet know how to re-evaluate expressions etc. I know lots of users where the only thing in their init file is the custom section. All of their customisation is done using the custom interface and they are never required to write a single line of elisp. The org-agenda-files variable is also a little more complicated than most configuration variables because org allows you to add/remove files from that list interactively as well. For these interactive changes to persist across sessions, Emacs has to store them somewhere and it uses the custom section of your init file to do this. It cannot update your manual setting with setq because that would require parsing and modifying user controlled/written configuration code, which can be very complicated and could be spread over many different files (some people with large complex manual configurations will break them up into separate files and include them using (reqire...) or load. This makes updating such settings very dangerous. On the other hand, the custom section is managed by Emacs and not modified by hand, so it can store the updated list in that section safely, which means the changes will persist across sessions. for this reason, I would recommend using custom to set/modify your agenda file list and copletely delete the (setq org-agenda-files...) from your init file. You might still consider how this works to be a bug because the way it works is confusing. However, it is very difficult for Emacs to deal with the situation where you have both manual configuration and custom section configuration for the same thing. Emacs does what I think is the sane things - gives priority to the custom section (actually, this can also be changed, but lets not go down another rabbit hole). -- Tim Cross