From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: overzealous file link creation Date: Wed, 12 Aug 2009 10:32:28 +0200 Message-ID: References: <87ws5aozzv.fsf@stats.ox.ac.uk> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mb9GA-0000ii-J6 for emacs-orgmode@gnu.org; Wed, 12 Aug 2009 04:32:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mb9G4-0000fx-U8 for emacs-orgmode@gnu.org; Wed, 12 Aug 2009 04:32:38 -0400 Received: from [199.232.76.173] (port=43973 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mb9G4-0000fp-Mh for emacs-orgmode@gnu.org; Wed, 12 Aug 2009 04:32:32 -0400 Received: from mx20.gnu.org ([199.232.41.8]:3038) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mb9G4-0007vO-5X for emacs-orgmode@gnu.org; Wed, 12 Aug 2009 04:32:32 -0400 Received: from ey-out-1920.google.com ([74.125.78.145]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mb9G3-00035G-3O for emacs-orgmode@gnu.org; Wed, 12 Aug 2009 04:32:31 -0400 Received: by ey-out-1920.google.com with SMTP id 5so23eyb.24 for ; Wed, 12 Aug 2009 01:32:30 -0700 (PDT) In-Reply-To: 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: Manish Cc: Dan Davison , emacs org-mode mailing list On Aug 12, 2009, at 9:52 AM, Manish wrote: > On Wed, Aug 12, 2009 at 1:59 AM, 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. >> >> --8<---------------cut here---------------start------------->8--- >> def f(filepath): >> print( >> *filepath*)* >> * >> *def g(arg): >> return arg >> --8<---------------cut here---------------end--------------->8--- >> >> This is with latest git. > > Tried the test with following text with numbers removed. > > --8<---------------cut here---------------start------------->8--- > def f(filepath): > print( > 1filepath2)3 > 4 > 5def g(arg): > return arg > --8<---------------cut here---------------end--------------->8--- > > With buffer in python mode, I executed org-cycle at the positions > marked with > numbers and got the results below: > > at 1,2,3: nothing happens > at 4: inserts a tab (four spaces in my case) > at 5: eats the line with "return arg" (also can not revert this change > with undo.) Hi Manish, the line is not eaten, it is hidden by outline. However, since you have not turned on outline-minor-mode, you do not see the ellipsis. A TAB is inserted because in places where org-cycle cannot do anything, it emulates TAB. I guess I should refactor org-cycle into a function that does only cycling, and one that does all the rest... - Carsten > > The buffer "looks" as if it ends at "def g(arg):" line but when I > tried to > paste the resultant buffer with "return arg" removed, I got the > following > strange result. > > --8<---------------cut here---------------start------------->8--- > def f(filepath): > print( > filepath) > > def g(arg): > return arg > return arg > > return arg > > --8<---------------cut here---------------end--------------->8--- > > I tried it several times, also tried saving the buffer and opening > it in that > other editor as well. > > Tested with git commit 5834ad01b617430c0207627ad425758bcf9b921a of > "Tue Aug 11 16:32:05 2009 +0200" > > -- > Manish > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode