From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: overzealous file link creation Date: Tue, 11 Aug 2009 17:36:28 -0400 Message-ID: <15551.1250026588@alphaville.usa.hp.com> References: <87ws5aozzv.fsf@stats.ox.ac.uk> Reply-To: nicholas.dokos@hp.com Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Maz2k-0003w2-1t for emacs-orgmode@gnu.org; Tue, 11 Aug 2009 17:38:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Maz2f-0003r3-7V for emacs-orgmode@gnu.org; Tue, 11 Aug 2009 17:38:05 -0400 Received: from [199.232.76.173] (port=49758 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Maz2f-0003qw-18 for emacs-orgmode@gnu.org; Tue, 11 Aug 2009 17:38:01 -0400 Received: from g1t0028.austin.hp.com ([15.216.28.35]:19611) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Maz2e-0004fP-KF for emacs-orgmode@gnu.org; Tue, 11 Aug 2009 17:38:00 -0400 In-Reply-To: Message from Dan Davison of "Tue, 11 Aug 2009 16:29:56 EDT." <87ws5aozzv.fsf@stats.ox.ac.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dan Davison Cc: emacs org-mode mailing list Dan Davison wrote: > Recently I've been randomly losing the string 'file' from all sorts of > documents. Up until now I had no explanation. It's not the sort of > question one wants to ask on public mailing lists. > > OK, so if you call org-cycle "in the vicinity" of a word that starts > with the string 'file', then it eats up 'file' and prompts for link > insertion. This is true in buffers that are not in org-mode or > orgstruct*-mode. (I call org-cycle the whole time in order to use > outline-minor-mode, but o-m-m doesn't have to be turned on to cause > this.) > > Try putting the following fragment into python-mode, and getting rid of > the asterisks. Then org-cycle issued with point at any of the asterisked > locations eats the string 'file' and prompts for a link. > > def f(filepath): > print( > *filepath*)* > * > *def g(arg): > return arg > > This is with latest git. > I cannot reproduce this. I created foo.py with the above contents, deleted the asterisks, saved the file and then tried M-x org-cycle at the various places indicated by the asterisks. In no case does a "file" disappear. At the three places around filepath in function f(), nothing happens. At the beginning of the def g(...), it folds the function (I also tried at the beginning of the definition of f, with the same result). In all of these cases, the buffer does not get modified. The only case where the buffer is modified is at the beginning of the empty line between the functions: I get a tab added (actually a bunch of spaces - not sure whether it makes a difference but I set indent-tabs-mode to nil). I think we need more people to try out the experiment!-) HTH, Nick