all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* beginning-on-line oddness
@ 2012-12-24 16:29 Lars Ingebrigtsen
  2012-12-24 16:56 ` Andreas Schwab
  2012-12-24 17:49 ` Eli Zaretskii
  0 siblings, 2 replies; 13+ messages in thread
From: Lars Ingebrigtsen @ 2012-12-24 16:29 UTC (permalink / raw)
  To: emacs-devel

Gnus has a mode where it uses that there "ellipsis" thing to hide
summary lines.

`beginning-of-line' now doesn't move to the beginning of the line, but
to the beginning of one of the hidden lines, apparently.

So I thought this might do the trick:

    (while (not (bolp))
      (forward-line 0))

Nope.

But if I do that, and then do it again, then it works.  That is, if I
let the display loop run a bit, then it gets past the hidden line
ending.  Or something.

The documentation of `beginning-of-line' looks to be written in a
strange, foreign language that I can't make heads or tails of.
"Fields"?  What's a "field"?

So is this a bug or are we now supposed to replace all our
`beginning-of-line' calls with something new that makes point go to the
beginning of the line?
      
-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Lars Magne Ingebrigtsen




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

* Re: beginning-on-line oddness
  2012-12-24 16:29 beginning-on-line oddness Lars Ingebrigtsen
@ 2012-12-24 16:56 ` Andreas Schwab
  2012-12-24 17:05   ` Lars Ingebrigtsen
  2012-12-24 17:49 ` Eli Zaretskii
  1 sibling, 1 reply; 13+ messages in thread
From: Andreas Schwab @ 2012-12-24 16:56 UTC (permalink / raw)
  To: emacs-devel

Lars Ingebrigtsen <larsi@gnus.org> writes:

> "Fields"?  What's a "field"?

Have you considered looking it up in the manual?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

* Re: beginning-on-line oddness
  2012-12-24 16:56 ` Andreas Schwab
@ 2012-12-24 17:05   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 13+ messages in thread
From: Lars Ingebrigtsen @ 2012-12-24 17:05 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: emacs-devel

Andreas Schwab <schwab@linux-m68k.org> writes:

>> "Fields"?  What's a "field"?
>
> Have you considered looking it up in the manual?

I considered it, yes...

-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Lars Magne Ingebrigtsen



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

* Re: beginning-on-line oddness
  2012-12-24 16:29 beginning-on-line oddness Lars Ingebrigtsen
  2012-12-24 16:56 ` Andreas Schwab
@ 2012-12-24 17:49 ` Eli Zaretskii
  2012-12-24 17:56   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2012-12-24 17:49 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Mon, 24 Dec 2012 17:29:07 +0100
> 
> Gnus has a mode where it uses that there "ellipsis" thing to hide
> summary lines.
> 
> `beginning-of-line' now doesn't move to the beginning of the line, but
> to the beginning of one of the hidden lines, apparently.
> 
> So I thought this might do the trick:
> 
>     (while (not (bolp))
>       (forward-line 0))
> 
> Nope.
> 
> But if I do that, and then do it again, then it works.  That is, if I
> let the display loop run a bit, then it gets past the hidden line
> ending.  Or something.
> 
> The documentation of `beginning-of-line' looks to be written in a
> strange, foreign language that I can't make heads or tails of.
> "Fields"?  What's a "field"?
> 
> So is this a bug or are we now supposed to replace all our
> `beginning-of-line' calls with something new that makes point go to the
> beginning of the line?

Hard to tell without a simple reproducible recipe.  (No, I don't use
Gnus.)  Can this be shown in 'emacs -Q"?



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

* Re: beginning-on-line oddness
  2012-12-24 17:49 ` Eli Zaretskii
@ 2012-12-24 17:56   ` Lars Ingebrigtsen
  2012-12-25 17:44     ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Lars Ingebrigtsen @ 2012-12-24 17:56 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> Hard to tell without a simple reproducible recipe.  (No, I don't use
> Gnus.)  Can this be shown in 'emacs -Q"?

Oh, I see that the ellipsis code now uses simple invisible text instead
of the old ... code.

So:

(progn
  (insert "hello")
  (let ((point (point)))
    (insert "\nyes\n")
    (put-text-property point (1- (point)) 'invisible t)
    (forward-char -1)
    (beginning-of-line)))

Except it uses overlays, but that's probably the same thing, I guess...
    
-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Lars Magne Ingebrigtsen



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

* Re: beginning-on-line oddness
  2012-12-24 17:56   ` Lars Ingebrigtsen
@ 2012-12-25 17:44     ` Eli Zaretskii
  2012-12-25 17:51       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2012-12-25 17:44 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org
> Date: Mon, 24 Dec 2012 18:56:16 +0100
> MailScanner-NULL-Check: 1356976580.26901@vutAJ4LqSLKBOyy3rsSRpA
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Hard to tell without a simple reproducible recipe.  (No, I don't use
> > Gnus.)  Can this be shown in 'emacs -Q"?
> 
> Oh, I see that the ellipsis code now uses simple invisible text instead
> of the old ... code.
> 
> So:
> 
> (progn
>   (insert "hello")
>   (let ((point (point)))
>     (insert "\nyes\n")
>     (put-text-property point (1- (point)) 'invisible t)
>     (forward-char -1)
>     (beginning-of-line)))

And the problem is...?



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

* Re: beginning-on-line oddness
  2012-12-25 17:44     ` Eli Zaretskii
@ 2012-12-25 17:51       ` Lars Ingebrigtsen
  2012-12-25 18:44         ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Lars Ingebrigtsen @ 2012-12-25 17:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> And the problem is...?

Personally, I think it would be nice if `beginning-of-line' went to the
beginning of the line.

-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Lars Magne Ingebrigtsen



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

* Re: beginning-on-line oddness
  2012-12-25 17:51       ` Lars Ingebrigtsen
@ 2012-12-25 18:44         ` Eli Zaretskii
  2012-12-26 13:42           ` Lars Ingebrigtsen
  2012-12-26 14:05           ` Ted Zlatanov
  0 siblings, 2 replies; 13+ messages in thread
From: Eli Zaretskii @ 2012-12-25 18:44 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org
> Date: Tue, 25 Dec 2012 18:51:14 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > And the problem is...?
> 
> Personally, I think it would be nice if `beginning-of-line' went to the
> beginning of the line.

Got it.  You need to use '(move-beginning-of-line 1)', which considers
display lines.  By contrast, 'beginning-of-line' moves by text lines
in logical order, which is not what you want.



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

* Re: beginning-on-line oddness
  2012-12-25 18:44         ` Eli Zaretskii
@ 2012-12-26 13:42           ` Lars Ingebrigtsen
  2012-12-26 14:05           ` Ted Zlatanov
  1 sibling, 0 replies; 13+ messages in thread
From: Lars Ingebrigtsen @ 2012-12-26 13:42 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> Got it.  You need to use '(move-beginning-of-line 1)', which considers
> display lines.  By contrast, 'beginning-of-line' moves by text lines
> in logical order, which is not what you want.

Ah, right.  I assumed that `move-beginning-of-line' wasn't supposed to
be used by code directly, for some reason or other...

-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Lars Magne Ingebrigtsen



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

* Re: beginning-on-line oddness
  2012-12-25 18:44         ` Eli Zaretskii
  2012-12-26 13:42           ` Lars Ingebrigtsen
@ 2012-12-26 14:05           ` Ted Zlatanov
  2012-12-26 19:10             ` Eli Zaretskii
  1 sibling, 1 reply; 13+ messages in thread
From: Ted Zlatanov @ 2012-12-26 14:05 UTC (permalink / raw)
  To: emacs-devel

On Tue, 25 Dec 2012 20:44:46 +0200 Eli Zaretskii <eliz@gnu.org> wrote: 

>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Cc: emacs-devel@gnu.org
>> Date: Tue, 25 Dec 2012 18:51:14 +0100
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> > And the problem is...?
>> 
>> Personally, I think it would be nice if `beginning-of-line' went to the
>> beginning of the line.

EZ> Got it.  You need to use '(move-beginning-of-line 1)', which considers
EZ> display lines.  By contrast, 'beginning-of-line' moves by text lines
EZ> in logical order, which is not what you want.

Can this please be xref-ed in the `beginning-of-line' docstring?

Ted




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

* Re: beginning-on-line oddness
  2012-12-26 14:05           ` Ted Zlatanov
@ 2012-12-26 19:10             ` Eli Zaretskii
  2012-12-31 11:31               ` Ted Zlatanov
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2012-12-26 19:10 UTC (permalink / raw)
  To: emacs-devel

> From: Ted Zlatanov <tzz@lifelogs.com>
> Date: Wed, 26 Dec 2012 09:05:38 -0500
> 
> EZ> Got it.  You need to use '(move-beginning-of-line 1)', which considers
> EZ> display lines.  By contrast, 'beginning-of-line' moves by text lines
> EZ> in logical order, which is not what you want.
> 
> Can this please be xref-ed in the `beginning-of-line' docstring?

Don't you have write access?



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

* Re: beginning-on-line oddness
  2012-12-26 19:10             ` Eli Zaretskii
@ 2012-12-31 11:31               ` Ted Zlatanov
  2012-12-31 17:20                 ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Ted Zlatanov @ 2012-12-31 11:31 UTC (permalink / raw)
  To: emacs-devel

On Wed, 26 Dec 2012 21:10:54 +0200 Eli Zaretskii <eliz@gnu.org> wrote: 

>> From: Ted Zlatanov <tzz@lifelogs.com>
>> Date: Wed, 26 Dec 2012 09:05:38 -0500
>> 
EZ> Got it.  You need to use '(move-beginning-of-line 1)', which considers
EZ> display lines.  By contrast, 'beginning-of-line' moves by text lines
EZ> in logical order, which is not what you want.
>> 
>> Can this please be xref-ed in the `beginning-of-line' docstring?

EZ> Don't you have write access?

Yes, thank you for noting that.  I am not familiar, however, with the
changes to `beginning-of-line' you noted above, so I feel I should not
be documenting them.

Ted




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

* Re: beginning-on-line oddness
  2012-12-31 11:31               ` Ted Zlatanov
@ 2012-12-31 17:20                 ` Eli Zaretskii
  0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2012-12-31 17:20 UTC (permalink / raw)
  To: emacs-devel

> From: Ted Zlatanov <tzz@lifelogs.com>
> Date: Mon, 31 Dec 2012 06:31:26 -0500
> 
> On Wed, 26 Dec 2012 21:10:54 +0200 Eli Zaretskii <eliz@gnu.org> wrote: 
> 
> >> From: Ted Zlatanov <tzz@lifelogs.com>
> >> Date: Wed, 26 Dec 2012 09:05:38 -0500
> >> 
> EZ> Got it.  You need to use '(move-beginning-of-line 1)', which considers
> EZ> display lines.  By contrast, 'beginning-of-line' moves by text lines
> EZ> in logical order, which is not what you want.
> >> 
> >> Can this please be xref-ed in the `beginning-of-line' docstring?
> 
> EZ> Don't you have write access?
> 
> Yes, thank you for noting that.  I am not familiar, however, with the
> changes to `beginning-of-line' you noted above, so I feel I should not
> be documenting them.

I was talking about adding a cross-reference to move-beginning-of-line
to the doc string of beginning-of-line, which is what I thought you
were asking for.  (And I'm not aware of any changes done to
'beginning-of-line' lately, FWIW.)



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

end of thread, other threads:[~2012-12-31 17:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-24 16:29 beginning-on-line oddness Lars Ingebrigtsen
2012-12-24 16:56 ` Andreas Schwab
2012-12-24 17:05   ` Lars Ingebrigtsen
2012-12-24 17:49 ` Eli Zaretskii
2012-12-24 17:56   ` Lars Ingebrigtsen
2012-12-25 17:44     ` Eli Zaretskii
2012-12-25 17:51       ` Lars Ingebrigtsen
2012-12-25 18:44         ` Eli Zaretskii
2012-12-26 13:42           ` Lars Ingebrigtsen
2012-12-26 14:05           ` Ted Zlatanov
2012-12-26 19:10             ` Eli Zaretskii
2012-12-31 11:31               ` Ted Zlatanov
2012-12-31 17:20                 ` Eli Zaretskii

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.