emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ben Alexander <bva@alexanderonline.org>
To: Avdi Grimm <avdi@avdi.org>
Cc: emacs-orgmode Org-Mode <emacs-orgmode@gnu.org>
Subject: Re: How you can help
Date: Fri, 24 Oct 2008 19:33:02 +0100	[thread overview]
Message-ID: <4A07BAD9-7045-4A42-BEAE-CD67DD491E61@alexanderonline.org> (raw)
In-Reply-To: <ecbcf0fb0810230942v5aa8f67cp7938138f0437bac7@mail.gmail.com>


On 2008-Oct-23, at 17:42, Avdi Grimm wrote:

>
> If someone would be so kind as to identify a small bug or feature, I
> would be happy to demonstrate this workflow in the form of code, time
> permitting.
>
>

Ok, here's your chance.  This is something that has bothered me for  
quite some time, but I've never been able to reliably reproduce the  
problem.  And it's such a small issue.

Sometimes, when it looks like my cursor is at the end of a headline  
and I hit tab, the headline does not cycle.  Normally it does.

It hit me that the point was not on the headline, it only looked like  
it.

So here's the sample test.org file

* First Headline
    Some body text
* Second Headline

(goto-char 17)  ;that's the end of the first line
(org-cycle)

At this point the buffer looks like:
* First Headline...
* Second Headline

(goto-char 25)
(org-cycle)

I think the buffer should look like this

* First Headline
    Some body text
* Second Headline

but it still looks like:

* First Headline...
* Second Headline


* ABOUT THIS BEHAVIOR
I should be honest here.  This may not be a bug.

As I created this test data, it became a bit more clear that exactly  
where the cursor is matters a lot here.  I *promise* that I've seen  
this behavior even when the cursor shows up before the ellipses, but  
in the test case I set up here, I could not make that happen.  I also  
found that if I used the key-chord M-x goto-char <RETURN> 25,  
everything worked fine.  The cursor stayed in front of the ellipses  
and the tab key worked. But when I used M-: (goto-char 25) the cursor  
moved to the same line as the ellipses, but after them. and the <TAB>  
key stopped 'working'.

I finally figured this out while playing with git.  I switched  
branches at the command line and needed to perform a 'revert-buffer'.   
This left the cursor before the ellipses, but unable to properly (org- 
cycle) using the <TAB> key.

More experimenting.... I *think* the revert-buffer command tries to  
keep point close to the same place, and the org buffer had automatic  
folding.  The bad thing about this for me is that I'll hit the <TAB>  
key four times trying to make sure it's not just an empty tree.   
Meanwhile, (org-cycle) has indented the first line of the body, but  
hasn't shown me the text I'm changing.  Then I get confused about why  
the buffer needs saving, probably 10 minutes later when I've forgotten  
all about hitting the tab key.

But I'm way out of my depth to try to understand the relationship  
between (revert-buffer) (org-cycle) the arrow keys, and all.  I just  
hit M-< or S-<TAB> and try again. Or C-a, which sometimes works.   
Sometimes I grab the mouse as a last resort.

* ABOUT TESTING ISSUES
Just from this example, I'm eager to understand:

1. How can we differentiate between where the cursor appears and the  
value of point
2. How can we tell what the users sees on the screen versus what the  
buffer contains

So the value of a testing framework is that this: if I'm going to  
announce to the world that I can't get something to work, (like the  
tab key), I'm going to make darn sure it's a real problem.  I'm going  
to spend the time to create a small sample file, that reliable creates  
the problem, and I'm going to try a few different scenarios.   But if  
I start to get lost or confused about which settings I've fiddled with  
or what is supposed to happen, I'll wander away from the problem and I  
won't submit the bug.  We all lose in that scenario.  But if the  
testing framework exists, and it is lightweight enough for novice  
emacs users (advanced enough to use M-x but not advanced enough to  
read lisp) then maybe I would have used it for this example.


-Ben

  parent reply	other threads:[~2008-10-24 18:33 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-23 12:04 How you can help Ben Alexander
2008-10-23 13:43 ` Bernt Hansen
2008-10-23 15:04   ` Sebastian Rose
2008-10-23 15:49     ` Richard Riley
2008-10-23 16:22       ` Ben Alexander
2008-10-23 17:02       ` Sebastian Rose
2008-10-24 12:13         ` Richard Riley
2008-10-24 15:39           ` Sebastian Rose
2008-10-24 16:27           ` Manish
2008-10-24 18:41             ` Avdi Grimm
2008-10-23 19:13       ` Avdi Grimm
2008-10-24 12:19         ` Richard Riley
2008-10-23 16:19     ` Bernt Hansen
2008-10-24  5:05       ` Carsten Dominik
2008-10-23 17:01   ` Jason F. McBrayer
2008-10-23 23:46     ` Eric Schulte
2008-10-23 14:20 ` Sebastian Rose
2008-10-23 14:50   ` Manish
2008-10-23 15:46     ` Eric Schulte
2008-10-23 16:18       ` Avdi Grimm
2008-10-23 14:55   ` Ben Alexander
2008-10-23 16:26     ` Sebastian Rose
2008-10-23 16:42       ` Avdi Grimm
2008-10-23 17:33         ` Sebastian Rose
2008-10-23 19:10           ` Avdi Grimm
2008-10-24 21:09           ` Tom Breton (Tehom)
2008-10-24 18:33         ` Ben Alexander [this message]
2008-10-24 18:44           ` Avdi Grimm
2008-10-24 19:02             ` Jeff Mickey
2008-10-26 19:49             ` org-cycle broken when cursor is at ellipses Ben Alexander
2008-10-26 21:31               ` Cameron Horsburgh
2008-10-27  8:47                 ` Carsten Dominik
2008-10-27  8:47               ` Carsten Dominik
     [not found]       ` <D43ED86C-EFD4-4BA8-8528-4F82DB11D625@alexanderonline.org>
2008-10-23 17:12         ` How you can help Sebastian Rose
2008-10-23 15:08 ` Sebastian Rose
     [not found] <E1Kt27M-0008Tx-0J@box188.bluehost.com>
2008-10-23 16:11 ` Robert Goldman
  -- strict thread matches above, loose matches on Subject: below --
2008-10-23  7:35 Carsten Dominik
2008-10-23  8:12 ` Manish
2008-10-23  9:24 ` Sebastian Rose
2008-10-23 10:28   ` Sebastian Rose
2008-10-23 15:23 ` Russell Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A07BAD9-7045-4A42-BEAE-CD67DD491E61@alexanderonline.org \
    --to=bva@alexanderonline.org \
    --cc=avdi@avdi.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).