[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] overzealous file link creation

From: Manish
Subject: Re: [Orgmode] overzealous file link creation
Date: Wed, 12 Aug 2009 13:22:10 +0530

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

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

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"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]