all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Ctl-E doesn't go to end of line?
@ 2011-05-17 23:00 Mark S.
  2011-05-18  0:32 ` Bernt Hansen
  2011-05-18  2:30 ` Memnon Anon
  0 siblings, 2 replies; 10+ messages in thread
From: Mark S. @ 2011-05-17 23:00 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

In org-mode, Ctl-E is bound to org-end-of-line. However, this doesn't appear to take you to the actual end of line as it does in the regular modes. Instead, it appears to take you out to the default line fill -- even if your specified line fill is much shorter or much longer than the default.

This is annoying, since my fingers are already typing ahead, and sometimes I lose stuff just because the cursor didn't go to the real end of line.

Is this the desired behavior? And how can I change it to the expected "true" end of line?

Thanks!
Mark
Org-mode 7.5
Emacs 23.2.1 (i386-mingw-nt5.1.2600)
Windows XP

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

* Re: Ctl-E doesn't go to end of line?
  2011-05-17 23:00 Ctl-E doesn't go to end of line? Mark S.
@ 2011-05-18  0:32 ` Bernt Hansen
  2011-05-18  1:26   ` Mark S.
  2011-05-18  2:30 ` Memnon Anon
  1 sibling, 1 reply; 10+ messages in thread
From: Bernt Hansen @ 2011-05-18  0:32 UTC (permalink / raw)
  To: Mark S.; +Cc: emacs-orgmode

"Mark S." <throaway@yahoo.com> writes:

> Hello,
>
> In org-mode, Ctl-E is bound to org-end-of-line. However, this doesn't
> appear to take you to the actual end of line as it does in the regular
> modes. Instead, it appears to take you out to the default line fill --
> even if your specified line fill is much shorter or much longer than
> the default.
>
> This is annoying, since my fingers are already typing ahead, and
> sometimes I lose stuff just because the cursor didn't go to the real
> end of line.
>
> Is this the desired behavior? And how can I change it to the expected "true" end of line?

Hi Mark,

Look at org-special-ctrl-a/e.

-Bernt

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

* Re: Ctl-E doesn't go to end of line?
  2011-05-18  0:32 ` Bernt Hansen
@ 2011-05-18  1:26   ` Mark S.
  2011-05-18  1:39     ` Bernt Hansen
  0 siblings, 1 reply; 10+ messages in thread
From: Mark S. @ 2011-05-18  1:26 UTC (permalink / raw)
  To: emacs-orgmode

Hi Bernt,

Thanks for pointing that out.

However, I'm not on an item line nor a header line, so those settings should not apply. But even when I changed my line to an item, and then tried the settings "t" and "reversed", it still wouldn't hop to the end of the line in one go. In fact, if the line is long enough, I may have to hit Ctl-E several times. So is something broken, or is there some other incantation? 

Thanks,
Mark

--- On Tue, 5/17/11, Bernt Hansen <bernt@norang.ca> wrote:

> From: Bernt Hansen <bernt@norang.ca>
> Subject: Re: [O] Ctl-E doesn't go to end of line?
> To: "Mark S." <throaway@yahoo.com>
> Cc: emacs-orgmode@gnu.org
> Date: Tuesday, May 17, 2011, 5:32 PM
> "Mark S." <throaway@yahoo.com>
> writes:
> 
> > Hello,
> >
> > In org-mode, Ctl-E is bound to org-end-of-line.
> However, this doesn't
> > appear to take you to the actual end of line as it
> does in the regular
> > modes. Instead, it appears to take you out to the
> default line fill --
> > even if your specified line fill is much shorter or
> much longer than
> > the default.
> >
> > This is annoying, since my fingers are already typing
> ahead, and
> > sometimes I lose stuff just because the cursor didn't
> go to the real
> > end of line.
> >
> > Is this the desired behavior? And how can I change it
> to the expected "true" end of line?
> 
> Hi Mark,
> 
> Look at org-special-ctrl-a/e.
> 
> -Bernt
> 
> 

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

* Re: Ctl-E doesn't go to end of line?
  2011-05-18  1:26   ` Mark S.
@ 2011-05-18  1:39     ` Bernt Hansen
  2011-05-18  3:40       ` Nick Dokos
  0 siblings, 1 reply; 10+ messages in thread
From: Bernt Hansen @ 2011-05-18  1:39 UTC (permalink / raw)
  To: Mark S.; +Cc: emacs-orgmode

"Mark S." <throaway@yahoo.com> writes:

> Hi Bernt,
>
> Thanks for pointing that out.
>
> However, I'm not on an item line nor a header line, so those settings
> should not apply. But even when I changed my line to an item, and then
> tried the settings "t" and "reversed", it still wouldn't hop to the
> end of the line in one go. In fact, if the line is long enough, I may
> have to hit Ctl-E several times. So is something broken, or is there
> some other incantation?
>

Sorry Mark, I just tried it on a headline only.  C-e invokes
end-of-visual-line and there seems to be no way to turn that off as a
option.

The following patch disables this behaviour permanently but it should
probably be turned into an option in org-mode preserving the current
behaviour as the default.

--8<---------------cut here---------------start------------->8---
	Modified lisp/org.el
diff --git a/lisp/org.el b/lisp/org.el
index 975266c..af57d54 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19495,8 +19495,7 @@ beyond the end of the headline."
 	    (not (org-on-heading-p))
 	    arg)
 	(call-interactively
-	 (cond ((org-bound-and-true-p line-move-visual) 'end-of-visual-line)
-	       ((fboundp 'move-end-of-line) 'move-end-of-line)
+	 (cond ((fboundp 'move-end-of-line) 'move-end-of-line)
 	       (t 'end-of-line)))
       (let ((pos (point)))
 	(beginning-of-line 1)
--8<---------------cut here---------------end--------------->8---

Regards,
Bernt

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

* Re: Ctl-E doesn't go to end of line?
  2011-05-17 23:00 Ctl-E doesn't go to end of line? Mark S.
  2011-05-18  0:32 ` Bernt Hansen
@ 2011-05-18  2:30 ` Memnon Anon
  2011-05-18  3:26   ` Mark S.
  1 sibling, 1 reply; 10+ messages in thread
From: Memnon Anon @ 2011-05-18  2:30 UTC (permalink / raw)
  To: emacs-orgmode

Hi Mark,

"Mark S." <throaway@yahoo.com> writes:

> Hello,
>
> In org-mode, Ctl-E is bound to org-end-of-line. However, this doesn't
> appear to take you to the actual end of line as it does in the regular
> modes. Instead, it appears to take you out to the default line fill --
> even if your specified line fill is much shorter or much longer than
> the default.

Just to be clear: 

a) `C-e' takes you to whatever fill-column is set to globally?

b) And this happens not only on headlines, but also on body lines?

c) And you did not explicitly set any of the org-special-ctrl-xxx
   variables?

afaics, org-end-of-line uses either a) end-of-visual-line, b)
move-end-of-line or c) end-of-line. But none of those seem to have this
effect. ... 

Now I am as curious as you are :).

Memnon

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

* Re: Ctl-E doesn't go to end of line?
  2011-05-18  2:30 ` Memnon Anon
@ 2011-05-18  3:26   ` Mark S.
  0 siblings, 0 replies; 10+ messages in thread
From: Mark S. @ 2011-05-18  3:26 UTC (permalink / raw)
  To: emacs-orgmode, Memnon Anon


--- On Tue, 5/17/11, Memnon Anon <gegendosenfleisch@googlemail.com> wrote:

> From: Memnon Anon <gegendosenfleisch@googlemail.com>
> Subject: Re: [O] Ctl-E doesn't go to end of line?
> To: emacs-orgmode@gnu.org
> Date: Tuesday, May 17, 2011, 7:30 PM
> Hi Mark,
> 
> "Mark S." <throaway@yahoo.com>
> writes:
> 
> > Hello,
> >
> > In org-mode, Ctl-E is bound to org-end-of-line.
> However, this doesn't
> > appear to take you to the actual end of line as it
> does in the regular
> > modes. Instead, it appears to take you out to the
> default line fill --
> > even if your specified line fill is much shorter or
> much longer than
> > the default.
> 
> Just to be clear: 
> 
> a) `C-e' takes you to whatever fill-column is set to
> globally?
> 
> b) And this happens not only on headlines, but also on body
> lines?
> 
> c) And you did not explicitly set any of the
> org-special-ctrl-xxx
>    variables?
> 
> afaics, org-end-of-line uses either a) end-of-visual-line,
> b)
> move-end-of-line or c) end-of-line. But none of those seem
> to have this
> effect. ... 
> 
> Now I am as curious as you are :).
> 
> Memnon
> 


Hello Memnon,

'b' & 'c' are true on my system. On 'a', I don't know how org-mode is setting the distance. It seems to get stuck on some arbitrary number. For instance, it was at 106. Then I rebooted emacs and now its at 80 followed by jumps of 40. Changing the fill position doesn't seem to change the point to which it jumps. 

Basically, I would like it to either (1) jump to the end of the line just like in ordinary emacs or (2) behave predictably, so that I can get to the end in two key sequences. Currently it does neither.

Thanks,
Mark 

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

* Re: Ctl-E doesn't go to end of line?
  2011-05-18  1:39     ` Bernt Hansen
@ 2011-05-18  3:40       ` Nick Dokos
  2011-05-18  3:45         ` Bernt Hansen
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2011-05-18  3:40 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode, nicholas.dokos, Mark S.

Bernt Hansen <bernt@norang.ca> wrote:

> "Mark S." <throaway@yahoo.com> writes:
> 
> > Hi Bernt,
> >
> > Thanks for pointing that out.
> >
> > However, I'm not on an item line nor a header line, so those settings
> > should not apply. But even when I changed my line to an item, and then
> > tried the settings "t" and "reversed", it still wouldn't hop to the
> > end of the line in one go. In fact, if the line is long enough, I may
> > have to hit Ctl-E several times. So is something broken, or is there
> > some other incantation?
> >
> 
> Sorry Mark, I just tried it on a headline only.  C-e invokes
> end-of-visual-line and there seems to be no way to turn that off as a
> option.
> 
> The following patch disables this behaviour permanently but it should
> probably be turned into an option in org-mode preserving the current
> behaviour as the default.
> 
> 	Modified lisp/org.el
> diff --git a/lisp/org.el b/lisp/org.el
> index 975266c..af57d54 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -19495,8 +19495,7 @@ beyond the end of the headline."
>  	    (not (org-on-heading-p))
>  	    arg)
>  	(call-interactively
> -	 (cond ((org-bound-and-true-p line-move-visual) 'end-of-visual-line)
> -	       ((fboundp 'move-end-of-line) 'move-end-of-line)
> +	 (cond ((fboundp 'move-end-of-line) 'move-end-of-line)
>  	       (t 'end-of-line)))
>        (let ((pos (point)))
>  	(beginning-of-line 1)
> 

Isn't this the same as setting line-move-visual to nil? Just pretend
it's an org-mode option.

Nick

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

* Re: Ctl-E doesn't go to end of line?
  2011-05-18  3:40       ` Nick Dokos
@ 2011-05-18  3:45         ` Bernt Hansen
  2011-05-18  4:58           ` Nick Dokos
  0 siblings, 1 reply; 10+ messages in thread
From: Bernt Hansen @ 2011-05-18  3:45 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, Mark S.

Nick Dokos <nicholas.dokos@hp.com> writes:

> Bernt Hansen <bernt@norang.ca> wrote:
>
>> "Mark S." <throaway@yahoo.com> writes:
>> 
>> > Hi Bernt,
>> >
>> > Thanks for pointing that out.
>> >
>> > However, I'm not on an item line nor a header line, so those settings
>> > should not apply. But even when I changed my line to an item, and then
>> > tried the settings "t" and "reversed", it still wouldn't hop to the
>> > end of the line in one go. In fact, if the line is long enough, I may
>> > have to hit Ctl-E several times. So is something broken, or is there
>> > some other incantation?
>> >
>> 
>> Sorry Mark, I just tried it on a headline only.  C-e invokes
>> end-of-visual-line and there seems to be no way to turn that off as a
>> option.
>> 
>> The following patch disables this behaviour permanently but it should
>> probably be turned into an option in org-mode preserving the current
>> behaviour as the default.
>> 
>> 	Modified lisp/org.el
>> diff --git a/lisp/org.el b/lisp/org.el
>> index 975266c..af57d54 100644
>> --- a/lisp/org.el
>> +++ b/lisp/org.el
>> @@ -19495,8 +19495,7 @@ beyond the end of the headline."
>>  	    (not (org-on-heading-p))
>>  	    arg)
>>  	(call-interactively
>> -	 (cond ((org-bound-and-true-p line-move-visual) 'end-of-visual-line)
>> -	       ((fboundp 'move-end-of-line) 'move-end-of-line)
>> +	 (cond ((fboundp 'move-end-of-line) 'move-end-of-line)
>>  	       (t 'end-of-line)))
>>        (let ((pos (point)))
>>  	(beginning-of-line 1)
>> 
>
> Isn't this the same as setting line-move-visual to nil? Just pretend
> it's an org-mode option.

Could be :)  I didn't find any details about that var when I looked at
the docstrings for the functions involved.

Thanks for pointing that out.

-Bernt

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

* Re: Ctl-E doesn't go to end of line?
  2011-05-18  3:45         ` Bernt Hansen
@ 2011-05-18  4:58           ` Nick Dokos
  2011-05-18 12:32             ` Mark S.
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2011-05-18  4:58 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Mark S., nicholas.dokos, emacs-orgmode

Bernt Hansen <bernt@norang.ca> wrote:

> > Isn't this the same as setting line-move-visual to nil? Just pretend
> > it's an org-mode option.
> 
> Could be :)  I didn't find any details about that var when I looked at
> the docstrings for the functions involved.
> 

There's some documentation about it in the Emacs manual, section 7.2,
"Changing the location of point". It seems harmless to set it to nil
(restores emacs 23 default behavior wrt long lines) and it's probably
going to solve Mark's problem.

Nick

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

* Re: Ctl-E doesn't go to end of line?
  2011-05-18  4:58           ` Nick Dokos
@ 2011-05-18 12:32             ` Mark S.
  0 siblings, 0 replies; 10+ messages in thread
From: Mark S. @ 2011-05-18 12:32 UTC (permalink / raw)
  To: emacs-orgmode

Thanks Nick & Bernt,

Setting 'line-move-visual' to nil does seem to fix things. But org-special-ctl-a/e was good to know about too, since I don't mind if org doesn't go all the way to the end on a line that is a header with tags.

Thanks again!
Mark  



--- On Tue, 5/17/11, Nick Dokos <nicholas.dokos@hp.com> wrote:

> From: Nick Dokos <nicholas.dokos@hp.com>
> Subject: Re: [O] Ctl-E doesn't go to end of line?
> To: "Bernt Hansen" <bernt@norang.ca>
> Cc: emacs-orgmode@gnu.org, "Mark S." <throaway@yahoo.com>, nicholas.dokos@hp.com
> Date: Tuesday, May 17, 2011, 9:58 PM
> Bernt Hansen <bernt@norang.ca>
> wrote:
> 
> > > Isn't this the same as setting line-move-visual
> to nil? Just pretend
> > > it's an org-mode option.
> > 
> > Could be :)  I didn't find any details about that
> var when I looked at
> > the docstrings for the functions involved.
> > 
> 
> There's some documentation about it in the Emacs manual,
> section 7.2,
> "Changing the location of point". It seems harmless to set
> it to nil
> (restores emacs 23 default behavior wrt long lines) and
> it's probably
> going to solve Mark's problem.
> 
> Nick
> 
> 
>

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

end of thread, other threads:[~2011-05-18 12:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-17 23:00 Ctl-E doesn't go to end of line? Mark S.
2011-05-18  0:32 ` Bernt Hansen
2011-05-18  1:26   ` Mark S.
2011-05-18  1:39     ` Bernt Hansen
2011-05-18  3:40       ` Nick Dokos
2011-05-18  3:45         ` Bernt Hansen
2011-05-18  4:58           ` Nick Dokos
2011-05-18 12:32             ` Mark S.
2011-05-18  2:30 ` Memnon Anon
2011-05-18  3:26   ` Mark S.

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.