emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Minor gotcha with org-agenda-files
@ 2011-01-22 16:31 Tommy Kelly
  2011-01-22 16:49 ` suvayu ali
  0 siblings, 1 reply; 9+ messages in thread
From: Tommy Kelly @ 2011-01-22 16:31 UTC (permalink / raw)
  To: emacs-orgmode

I just figured out why, despite having a setq in my .emacs, my
org-agenda-files wasn't what I thought it should be.

It's because if you modify that variable using C-c [ or C-c ], then any
explicit setq is rendered obsolete by the custom-set-variables
entry that gets added automatically.

Tell us something we don't know, says y'all, and maybe it's as it should
be. But in that case would it be worth adding a note to the relevant
part of section 10.1 in the manual?

Tommy

P.S. The current online section 10.1 says that C-c [ is bound
to org-agenda-to-front. In fact it appears to be bound to
org-agenda-file-to-front. 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Minor gotcha with org-agenda-files
  2011-01-22 16:31 Minor gotcha with org-agenda-files Tommy Kelly
@ 2011-01-22 16:49 ` suvayu ali
  2011-01-22 17:41   ` Tommy Kelly
  0 siblings, 1 reply; 9+ messages in thread
From: suvayu ali @ 2011-01-22 16:49 UTC (permalink / raw)
  To: Tommy Kelly; +Cc: emacs-orgmode

On Sat, Jan 22, 2011 at 5:31 PM, Tommy Kelly <tommy.kelly@verilab.com> wrote:
> I just figured out why, despite having a setq in my .emacs, my
> org-agenda-files wasn't what I thought it should be.
>
> It's because if you modify that variable using C-c [ or C-c ], then any
> explicit setq is rendered obsolete by the custom-set-variables
> entry that gets added automatically.
>

This is nothing org specific. Its how customise works. This is the
reason people are encouraged to _not_ mix customise with setq. I for
example use customise for everything except org settings.

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Minor gotcha with org-agenda-files
  2011-01-22 16:49 ` suvayu ali
@ 2011-01-22 17:41   ` Tommy Kelly
  2011-01-22 19:59     ` Eric S Fraga
  0 siblings, 1 reply; 9+ messages in thread
From: Tommy Kelly @ 2011-01-22 17:41 UTC (permalink / raw)
  To: emacs-orgmode

suvayu ali <fatkasuvayu+linux@gmail.com> writes:

> On Sat, Jan 22, 2011 at 5:31 PM, Tommy Kelly <tommy.kelly@verilab.com> wrote:
>> I just figured out why, despite having a setq in my .emacs, my
>> org-agenda-files wasn't what I thought it should be.
>>
>> It's because if you modify that variable using C-c [ or C-c ], then any
>> explicit setq is rendered obsolete by the custom-set-variables
>> entry that gets added automatically.
>>
>
> This is nothing org specific. Its how customise works. This is the
> reason people are encouraged to _not_ mix customise with setq. I for
> example use customise for everything except org settings.

Ah but hang on.

First, is it reasonable to consider it obvious (I mean, it wasn't to me)
that using C-c [ invokes customize?

Second, even if it is reasonable, isn't it the case that customize
offers a temporary change of variables? You have to explicitly ask it to
make the change permanent, no?

Overall, it just caught me unawares that C-c [ should write something in
one of my files without even telling me let alone asking me. Maybe it's
just me though. 

Tommy

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: Minor gotcha with org-agenda-files
  2011-01-22 17:41   ` Tommy Kelly
@ 2011-01-22 19:59     ` Eric S Fraga
  2011-01-23  8:15       ` suvayu ali
  0 siblings, 1 reply; 9+ messages in thread
From: Eric S Fraga @ 2011-01-22 19:59 UTC (permalink / raw)
  To: Tommy Kelly; +Cc: emacs-orgmode

Tommy Kelly <tommy.kelly@verilab.com> writes:

> suvayu ali <fatkasuvayu+linux@gmail.com> writes:
>
>> On Sat, Jan 22, 2011 at 5:31 PM, Tommy Kelly <tommy.kelly@verilab.com> wrote:
>>> I just figured out why, despite having a setq in my .emacs, my
>>> org-agenda-files wasn't what I thought it should be.
>>>
>>> It's because if you modify that variable using C-c [ or C-c ], then any
>>> explicit setq is rendered obsolete by the custom-set-variables
>>> entry that gets added automatically.

Yes, this has bitten me a few times.  I sometimes add a file to the
list, temporarily I think, only to have it make a permanent change.  I
*never* remember that this command uses customize to effect the change.

>>
>> This is nothing org specific. Its how customise works. This is the
>> reason people are encouraged to _not_ mix customise with setq. I for
>> example use customise for everything except org settings.
>
> Ah but hang on.
>
> First, is it reasonable to consider it obvious (I mean, it wasn't to me)
> that using C-c [ invokes customize?
>
> Second, even if it is reasonable, isn't it the case that customize
> offers a temporary change of variables? You have to explicitly ask it to
> make the change permanent, no?

It would indeed be friendlier if this were done here as well.

> Overall, it just caught me unawares that C-c [ should write something in
> one of my files without even telling me let alone asking me. Maybe it's
> just me though. 

It's not just you!
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.232.g8d003)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: Minor gotcha with org-agenda-files
  2011-01-22 19:59     ` Eric S Fraga
@ 2011-01-23  8:15       ` suvayu ali
  2011-01-23 10:06         ` Eric S Fraga
  0 siblings, 1 reply; 9+ messages in thread
From: suvayu ali @ 2011-01-23  8:15 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode, Tommy Kelly

Hi Tommy and Eric,

On Sat, Jan 22, 2011 at 8:59 PM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
> Tommy Kelly <tommy.kelly@verilab.com> writes:
>
>> suvayu ali <fatkasuvayu+linux@gmail.com> writes:
>>
>>> This is nothing org specific. Its how customise works. This is the
>>> reason people are encouraged to _not_ mix customise with setq. I for
>>> example use customise for everything except org settings.
>>
>> Ah but hang on.
>>
>> First, is it reasonable to consider it obvious (I mean, it wasn't to me)
>> that using C-c [ invokes customize?
>>
>> Second, even if it is reasonable, isn't it the case that customize
>> offers a temporary change of variables? You have to explicitly ask it to
>> make the change permanent, no?
>
> It would indeed be friendlier if this were done here as well.
>

I am not familiar with how to interface ui with customize so I don't
know whether its possible or not, but there are many instances in
emacs where this is done as standard practice. For example marking
certain file local variables as safe, or turning on some special
behaviour when invoked for the first time (e.g. side scrolling).
However I do recall all of these prompts the user whether they want to
keep the settings temporary or make it permanent. So I would say its a
Request for Feature Enhancement / Bug rather than a mere documentation
bug.

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: Minor gotcha with org-agenda-files
  2011-01-23  8:15       ` suvayu ali
@ 2011-01-23 10:06         ` Eric S Fraga
  2011-01-23 10:53           ` Carsten Dominik
  0 siblings, 1 reply; 9+ messages in thread
From: Eric S Fraga @ 2011-01-23 10:06 UTC (permalink / raw)
  To: suvayu ali; +Cc: emacs-orgmode, Tommy Kelly

suvayu ali <fatkasuvayu+linux@gmail.com> writes:

> Hi Tommy and Eric,
>
> On Sat, Jan 22, 2011 at 8:59 PM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>> Tommy Kelly <tommy.kelly@verilab.com> writes:
>>
>>> suvayu ali <fatkasuvayu+linux@gmail.com> writes:
>>>
>>>> This is nothing org specific. Its how customise works. This is the
>>>> reason people are encouraged to _not_ mix customise with setq. I for
>>>> example use customise for everything except org settings.
>>>
>>> Ah but hang on.
>>>
>>> First, is it reasonable to consider it obvious (I mean, it wasn't to me)
>>> that using C-c [ invokes customize?
>>>
>>> Second, even if it is reasonable, isn't it the case that customize
>>> offers a temporary change of variables? You have to explicitly ask it to
>>> make the change permanent, no?
>>
>> It would indeed be friendlier if this were done here as well.
>>
>
> I am not familiar with how to interface ui with customize so I don't
> know whether its possible or not, but there are many instances in
> emacs where this is done as standard practice. For example marking
> certain file local variables as safe, or turning on some special
> behaviour when invoked for the first time (e.g. side scrolling).
> However I do recall all of these prompts the user whether they want to
> keep the settings temporary or make it permanent. So I would say its a
> Request for Feature Enhancement / Bug rather than a mere documentation
> bug.

Yes, I think this is the key aspect: all other instances of commands in
Emacs modifying the .emacs file, that I am aware of, indicate they are
about to do so although sometimes in a roundabout kind of way
(e.g. "make this change permanent").

So, can we have a feature request for this?  A simple y-or-n-p type
prompt would suffice.

-- 
Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: Minor gotcha with org-agenda-files
  2011-01-23 10:06         ` Eric S Fraga
@ 2011-01-23 10:53           ` Carsten Dominik
  2011-01-23 13:56             ` Bernt Hansen
  0 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2011-01-23 10:53 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode, Tommy Kelly


On Jan 23, 2011, at 11:06 AM, Eric S Fraga wrote:

> suvayu ali <fatkasuvayu+linux@gmail.com> writes:
>
>> Hi Tommy and Eric,
>>
>> On Sat, Jan 22, 2011 at 8:59 PM, Eric S Fraga <e.fraga@ucl.ac.uk>  
>> wrote:
>>> Tommy Kelly <tommy.kelly@verilab.com> writes:
>>>
>>>> suvayu ali <fatkasuvayu+linux@gmail.com> writes:
>>>>
>>>>> This is nothing org specific. Its how customise works. This is the
>>>>> reason people are encouraged to _not_ mix customise with setq. I  
>>>>> for
>>>>> example use customise for everything except org settings.
>>>>
>>>> Ah but hang on.
>>>>
>>>> First, is it reasonable to consider it obvious (I mean, it wasn't  
>>>> to me)
>>>> that using C-c [ invokes customize?
>>>>
>>>> Second, even if it is reasonable, isn't it the case that customize
>>>> offers a temporary change of variables? You have to explicitly  
>>>> ask it to
>>>> make the change permanent, no?
>>>
>>> It would indeed be friendlier if this were done here as well.
>>>
>>
>> I am not familiar with how to interface ui with customize so I don't
>> know whether its possible or not, but there are many instances in
>> emacs where this is done as standard practice. For example marking
>> certain file local variables as safe, or turning on some special
>> behaviour when invoked for the first time (e.g. side scrolling).
>> However I do recall all of these prompts the user whether they want  
>> to
>> keep the settings temporary or make it permanent. So I would say  
>> its a
>> Request for Feature Enhancement / Bug rather than a mere  
>> documentation
>> bug.
>
> Yes, I think this is the key aspect: all other instances of commands  
> in
> Emacs modifying the .emacs file, that I am aware of, indicate they are
> about to do so although sometimes in a roundabout kind of way
> (e.g. "make this change permanent").
>
> So, can we have a feature request for this?  A simple y-or-n-p type
> prompt would suffice.


I can follow the arguments here.  However:

The problem I see is that if you do this command a few
times and reply "n", but then, during the same session,
you add another file and say "y", then also the previous,
supposedly "non-permanent" changes will become permanent
because they are in that same variable org-agenda-files.
To cleanly implement adding files only for a session and to
independently add a file to the permanent set would require
more complex changes to the agenda file list stuff.

What I usually do it I want to work temporarily with a
file is restricting to that file with `C-c C-x <'.  Then I
work only with that file, which is usually good enough
until I switch back to my more permanent list.

If we add a query, but I would like to be able to turn
that query off.

- Carsten

>
> -- 
> Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D)
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Minor gotcha with org-agenda-files
  2011-01-23 10:53           ` Carsten Dominik
@ 2011-01-23 13:56             ` Bernt Hansen
  0 siblings, 0 replies; 9+ messages in thread
From: Bernt Hansen @ 2011-01-23 13:56 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode, Tommy Kelly

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On Jan 23, 2011, at 11:06 AM, Eric S Fraga wrote:
>
>> suvayu ali <fatkasuvayu+linux@gmail.com> writes:
>>
>>> Hi Tommy and Eric,
>>>
>>> On Sat, Jan 22, 2011 at 8:59 PM, Eric S Fraga <e.fraga@ucl.ac.uk>
>>> wrote:
>>>> Tommy Kelly <tommy.kelly@verilab.com> writes:
>>>>
>>>>> suvayu ali <fatkasuvayu+linux@gmail.com> writes:
>>>>>
>>>>>> This is nothing org specific. Its how customise works. This is the
>>>>>> reason people are encouraged to _not_ mix customise with setq. I
>>>>>> for
>>>>>> example use customise for everything except org settings.
>>>>>
>>>>> Ah but hang on.
>>>>>
>>>>> First, is it reasonable to consider it obvious (I mean, it wasn't
>>>>> to me)
>>>>> that using C-c [ invokes customize?
>>>>>
>>>>> Second, even if it is reasonable, isn't it the case that customize
>>>>> offers a temporary change of variables? You have to explicitly
>>>>> ask it to
>>>>> make the change permanent, no?
>>>>
>>>> It would indeed be friendlier if this were done here as well.
>>>>
>>>
>>> I am not familiar with how to interface ui with customize so I don't
>>> know whether its possible or not, but there are many instances in
>>> emacs where this is done as standard practice. For example marking
>>> certain file local variables as safe, or turning on some special
>>> behaviour when invoked for the first time (e.g. side scrolling).
>>> However I do recall all of these prompts the user whether they want
>>> to
>>> keep the settings temporary or make it permanent. So I would say
>>> its a
>>> Request for Feature Enhancement / Bug rather than a mere
>>> documentation
>>> bug.
>>
>> Yes, I think this is the key aspect: all other instances of commands
>> in
>> Emacs modifying the .emacs file, that I am aware of, indicate they are
>> about to do so although sometimes in a roundabout kind of way
>> (e.g. "make this change permanent").
>>
>> So, can we have a feature request for this?  A simple y-or-n-p type
>> prompt would suffice.
>
>
> I can follow the arguments here.  However:
>
> The problem I see is that if you do this command a few
> times and reply "n", but then, during the same session,
> you add another file and say "y", then also the previous,
> supposedly "non-permanent" changes will become permanent
> because they are in that same variable org-agenda-files.
> To cleanly implement adding files only for a session and to
> independently add a file to the permanent set would require
> more complex changes to the agenda file list stuff.
>
> What I usually do it I want to work temporarily with a
> file is restricting to that file with `C-c C-x <'.  Then I
> work only with that file, which is usually good enough
> until I switch back to my more permanent list.
>
> If we add a query, but I would like to be able to turn
> that query off.
>
> - Carsten

I've recently switched to using directories instead of files in my
org-agenda-files.  Using C-[ adds the current file but converts my
existing (few) directories into a list of every org-mode file in those
directories.  This is not the expected behaviour - since now if I add a
new file in one of the directories (that used to be in org-mode-files)
that new file no longer contributes to the agenda.  I have lots of files
in my org-agenda-files (from these directories) and missing one or two
is non-obvious.

I'd like a way to turn off C-c [ and C-c ] so that I can only edit
org-agenda-files only from customize -- this will preserve the
directories I want to include I think.

I'm going to unbind the C-c [ and C-c ] keys in my local setup for now.

-Bernt

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Minor gotcha with org-agenda-files
@ 2011-01-22 16:32 Tommy Kelly
  0 siblings, 0 replies; 9+ messages in thread
From: Tommy Kelly @ 2011-01-22 16:32 UTC (permalink / raw)
  To: emacs-orgmode

I just figured out why, despite having a setq in my .emacs, my
org-agenda-files wasn't what I thought it should be.

It's because if you modify that variable using C-c [ or C-c ], then any
explicit setq is rendered obsolete by the custom-set-variables
entry that gets added automatically.

Tell us something we don't know, says y'all, and maybe it's as it should
be. But in that case would it be worth adding a note to the relevant
part of section 10.1 in the manual?

Tommy

P.S. The current online section 10.1 says that C-c [ is bound
to org-agenda-to-front. In fact it appears to be bound to
org-agenda-file-to-front. 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-01-23 13:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-22 16:31 Minor gotcha with org-agenda-files Tommy Kelly
2011-01-22 16:49 ` suvayu ali
2011-01-22 17:41   ` Tommy Kelly
2011-01-22 19:59     ` Eric S Fraga
2011-01-23  8:15       ` suvayu ali
2011-01-23 10:06         ` Eric S Fraga
2011-01-23 10:53           ` Carsten Dominik
2011-01-23 13:56             ` Bernt Hansen
2011-01-22 16:32 Tommy Kelly

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).