all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do?
@ 2022-11-07  6:37 Evan Aad
  2022-11-07 12:44 ` Emanuel Berg
  0 siblings, 1 reply; 15+ messages in thread
From: Evan Aad @ 2022-11-07  6:37 UTC (permalink / raw)
  To: help-gnu-emacs

I have annotated most of the customizations in my .emacs file, but
there are a few I haven't, and I no longer know what they do. I'd like
to run them by you, please.

The first couple of mysterious customizations are the following couple lines:

> (setq-default bidi-paragraph-start-re "^")
> (setq-default bidi-paragraph-separate-re "^")

What do they do?



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

* Re: What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do?
  2022-11-07  6:37 What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do? Evan Aad
@ 2022-11-07 12:44 ` Emanuel Berg
  2022-11-07 13:03   ` Evan Aad
  0 siblings, 1 reply; 15+ messages in thread
From: Emanuel Berg @ 2022-11-07 12:44 UTC (permalink / raw)
  To: help-gnu-emacs

Evan Aad wrote:

> I have annotated most of the customizations in my .emacs
> file, but there are a few I haven't, and I no longer know
> what they do. I'd like to run them by you, please.
>
> The first couple of mysterious customizations are the
> following couple lines:
>
>   (setq-default bidi-paragraph-start-re "^")
>   (setq-default bidi-paragraph-separate-re "^")

It's for so-called bidirectional text, I suppose in practice
Arabic, Farsi, and Hebrew, the way these guys write are just
all over the place :)

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do?
  2022-11-07 12:44 ` Emanuel Berg
@ 2022-11-07 13:03   ` Evan Aad
  2022-11-07 13:12     ` Emanuel Berg
  2022-11-07 13:57     ` Robert Pluim
  0 siblings, 2 replies; 15+ messages in thread
From: Evan Aad @ 2022-11-07 13:03 UTC (permalink / raw)
  To: help-gnu-emacs

Thanks. But what specifically do these lines accomplish?

On Mon, Nov 7, 2022 at 2:52 PM Emanuel Berg wrote:
>
> Evan Aad wrote:
>
> > I have annotated most of the customizations in my .emacs
> > file, but there are a few I haven't, and I no longer know
> > what they do. I'd like to run them by you, please.
> >
> > The first couple of mysterious customizations are the
> > following couple lines:
> >
> >   (setq-default bidi-paragraph-start-re "^")
> >   (setq-default bidi-paragraph-separate-re "^")
>
> It's for so-called bidirectional text, I suppose in practice
> Arabic, Farsi, and Hebrew, the way these guys write are just
> all over the place :)
>
> --
> underground experts united
> https://dataswamp.org/~incal
>
>



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

* Re: What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do?
  2022-11-07 13:03   ` Evan Aad
@ 2022-11-07 13:12     ` Emanuel Berg
  2022-11-07 13:57     ` Robert Pluim
  1 sibling, 0 replies; 15+ messages in thread
From: Emanuel Berg @ 2022-11-07 13:12 UTC (permalink / raw)
  To: help-gnu-emacs

Evan Aad wrote:

> Thanks. But what specifically do these lines accomplish?

C-h v bidi-paragraph-start-re RET

C-h v bidi-paragraph-separate-re RET

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do?
  2022-11-07 13:03   ` Evan Aad
  2022-11-07 13:12     ` Emanuel Berg
@ 2022-11-07 13:57     ` Robert Pluim
  2022-11-08  5:51       ` Evan Aad
  1 sibling, 1 reply; 15+ messages in thread
From: Robert Pluim @ 2022-11-07 13:57 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> On Mon, 7 Nov 2022 15:03:45 +0200, Evan Aad <oddeveneven@gmail.com> said:

    Evan> Thanks. But what specifically do these lines accomplish?

It means that

---------
line1
line2
line3
---------
is treated as 3 separate paragraphs by the bidi code. With the default
values, youʼd have to write

---------
line1

line2

line3
---------

Why would you care? Itʼs so that you can have different bidi
directions on different lines without having to separate the
paragraphs with newlines (youʼd probably want to turn on
`visual-line-mode' as well).

Robert
-- 




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

* Re: What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do?
  2022-11-07 13:57     ` Robert Pluim
@ 2022-11-08  5:51       ` Evan Aad
  2022-11-08  6:15         ` Emanuel Berg
  2022-11-08  8:28         ` Robert Pluim
  0 siblings, 2 replies; 15+ messages in thread
From: Evan Aad @ 2022-11-08  5:51 UTC (permalink / raw)
  To: help-gnu-emacs

Thanks, Robert. Why would I probably want to turn on
'visual-line-mode'? What does this mode do?

On Mon, Nov 7, 2022 at 3:58 PM Robert Pluim wrote:
>
> >>>>> On Mon, 7 Nov 2022 15:03:45 +0200, Evan Aad said:
>
>     Evan> Thanks. But what specifically do these lines accomplish?
>
> It means that
>
> ---------
> line1
> line2
> line3
> ---------
> is treated as 3 separate paragraphs by the bidi code. With the default
> values, youʼd have to write
>
> ---------
> line1
>
> line2
>
> line3
> ---------
>
> Why would you care? Itʼs so that you can have different bidi
> directions on different lines without having to separate the
> paragraphs with newlines (youʼd probably want to turn on
> `visual-line-mode' as well).
>
> Robert
> --
>
>



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

* Re: What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do?
  2022-11-08  5:51       ` Evan Aad
@ 2022-11-08  6:15         ` Emanuel Berg
  2022-11-08  8:28         ` Robert Pluim
  1 sibling, 0 replies; 15+ messages in thread
From: Emanuel Berg @ 2022-11-08  6:15 UTC (permalink / raw)
  To: help-gnu-emacs

Evan Aad wrote:

> Why would I probably want to turn on 'visual-line-mode'?
> What does this mode do?

It's the GUI version of line-mode ...

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do?
  2022-11-08  5:51       ` Evan Aad
  2022-11-08  6:15         ` Emanuel Berg
@ 2022-11-08  8:28         ` Robert Pluim
  2022-11-08  9:21           ` Evan Aad
                             ` (2 more replies)
  1 sibling, 3 replies; 15+ messages in thread
From: Robert Pluim @ 2022-11-08  8:28 UTC (permalink / raw)
  To: Evan Aad; +Cc: help-gnu-emacs

>>>>> On Tue, 8 Nov 2022 07:51:15 +0200, Evan Aad <oddeveneven@gmail.com> said:

    Evan> Thanks, Robert. Why would I probably want to turn on
    Evan> 'visual-line-mode'? What does this mode do?

By default, Emacs (visually) truncates lines that are longer than the width of
the window. With `visual-line-mode' turned on, it wraps them (but only
visually). Itʼs a way to get word wrapping without having to insert
newlines or re-wrap paragraphs.

Robert
-- 



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

* Re: What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do?
  2022-11-08  8:28         ` Robert Pluim
@ 2022-11-08  9:21           ` Evan Aad
  2022-11-08 10:44             ` Emanuel Berg
  2022-11-08 12:21           ` Eli Zaretskii
  2022-11-08 22:51           ` Michael Heerdegen
  2 siblings, 1 reply; 15+ messages in thread
From: Evan Aad @ 2022-11-08  9:21 UTC (permalink / raw)
  To: Robert Pluim; +Cc: help-gnu-emacs

OK. Thanks.

You can close this thread with a status of "Answered satisfactorily".

On Tue, Nov 8, 2022 at 10:29 AM Robert Pluim wrote:
>
> >>>>> On Tue, 8 Nov 2022 07:51:15 +0200, Evan Aad said:
>
>     Evan> Thanks, Robert. Why would I probably want to turn on
>     Evan> 'visual-line-mode'? What does this mode do?
>
> By default, Emacs (visually) truncates lines that are longer than the width of
> the window. With `visual-line-mode' turned on, it wraps them (but only
> visually). Itʼs a way to get word wrapping without having to insert
> newlines or re-wrap paragraphs.
>
> Robert
> --



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

* Re: What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do?
  2022-11-08  9:21           ` Evan Aad
@ 2022-11-08 10:44             ` Emanuel Berg
  2022-11-08 11:16               ` Robert Pluim
  0 siblings, 1 reply; 15+ messages in thread
From: Emanuel Berg @ 2022-11-08 10:44 UTC (permalink / raw)
  To: help-gnu-emacs

Evan Aad wrote:

> You can close this thread with a status of "Answered
> satisfactorily".

Excellent! I'll CC this to the maintainer of this thread ...

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do?
  2022-11-08 10:44             ` Emanuel Berg
@ 2022-11-08 11:16               ` Robert Pluim
  0 siblings, 0 replies; 15+ messages in thread
From: Robert Pluim @ 2022-11-08 11:16 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> On Tue, 08 Nov 2022 11:44:06 +0100, Emanuel Berg <incal@dataswamp.org> said:

    Emanuel> Evan Aad wrote:
    >> You can close this thread with a status of "Answered
    >> satisfactorily".

    Emanuel> Excellent! I'll CC this to the maintainer of this thread ...

I prefer to be paid in cash 😜

Robert
-- 



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

* Re: What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do?
  2022-11-08  8:28         ` Robert Pluim
  2022-11-08  9:21           ` Evan Aad
@ 2022-11-08 12:21           ` Eli Zaretskii
  2022-11-08 22:51           ` Michael Heerdegen
  2 siblings, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2022-11-08 12:21 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Robert Pluim <rpluim@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> Date: Tue, 08 Nov 2022 09:28:59 +0100
> 
> By default, Emacs (visually) truncates lines that are longer than the width of
> the window.

Actually, by default Emacs wraps long lines.  It just wraps them
wherever the next character would exceed the window width;
visual-line-mode instead tries to find wrap points between words.



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

* Re: What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do?
  2022-11-08  8:28         ` Robert Pluim
  2022-11-08  9:21           ` Evan Aad
  2022-11-08 12:21           ` Eli Zaretskii
@ 2022-11-08 22:51           ` Michael Heerdegen
  2022-11-09 11:02             ` Evan Aad
  2 siblings, 1 reply; 15+ messages in thread
From: Michael Heerdegen @ 2022-11-08 22:51 UTC (permalink / raw)
  To: help-gnu-emacs

Robert Pluim <rpluim@gmail.com> writes:

> By default, Emacs (visually) truncates lines that are longer than the
> width of
> the window. With `visual-line-mode' turned on, it wraps them (but only
> visually). Itʼs a way to get word wrapping without having to insert
> newlines or re-wrap paragraphs.

Plus "simple editing commands are redefined to act on visual lines, not
logical lines".

Michael.




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

* Re: What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do?
  2022-11-08 22:51           ` Michael Heerdegen
@ 2022-11-09 11:02             ` Evan Aad
  2022-11-09 13:16               ` Robert Pluim
  0 siblings, 1 reply; 15+ messages in thread
From: Evan Aad @ 2022-11-09 11:02 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

> On Wed, Nov 9, 2022 at 12:55 AM Michael Heerdegen wrote:
> Plus "simple editing commands are redefined to act on visual lines, not
> logical lines".

What do I need to add to my .emacs file in order to turn on 'visual-line-mode'?



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

* Re: What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do?
  2022-11-09 11:02             ` Evan Aad
@ 2022-11-09 13:16               ` Robert Pluim
  0 siblings, 0 replies; 15+ messages in thread
From: Robert Pluim @ 2022-11-09 13:16 UTC (permalink / raw)
  To: Evan Aad; +Cc: Michael Heerdegen, help-gnu-emacs

>>>>> On Wed, 9 Nov 2022 13:02:09 +0200, Evan Aad <oddeveneven@gmail.com> said:

    >> On Wed, Nov 9, 2022 at 12:55 AM Michael Heerdegen wrote:
    >> Plus "simple editing commands are redefined to act on visual lines, not
    >> logical lines".

    Evan> What do I need to add to my .emacs file in order to turn on 'visual-line-mode'?

The same as any other minor mode:

(visual-line-mode 1)

Of course, that will only turn it on in the buffer where itʼs called,
so you either need to add that to the appropriate mode hooks, or if
you want it enabled everywhere

(global-visual-line-mode 1)

or 'M-x customize RET global-visual-line-mode RET' and enable and save
it from there.

Robert
-- 



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

end of thread, other threads:[~2022-11-09 13:16 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-07  6:37 What do the "bidi-paragraph-start-re" and "bidi-paragraph-separate-re" do? Evan Aad
2022-11-07 12:44 ` Emanuel Berg
2022-11-07 13:03   ` Evan Aad
2022-11-07 13:12     ` Emanuel Berg
2022-11-07 13:57     ` Robert Pluim
2022-11-08  5:51       ` Evan Aad
2022-11-08  6:15         ` Emanuel Berg
2022-11-08  8:28         ` Robert Pluim
2022-11-08  9:21           ` Evan Aad
2022-11-08 10:44             ` Emanuel Berg
2022-11-08 11:16               ` Robert Pluim
2022-11-08 12:21           ` Eli Zaretskii
2022-11-08 22:51           ` Michael Heerdegen
2022-11-09 11:02             ` Evan Aad
2022-11-09 13:16               ` Robert Pluim

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.