unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Filling a string?
Date: Fri, 17 Jul 2015 12:58:22 +0200	[thread overview]
Message-ID: <87fv4n8301.fsf@gnu.org> (raw)
In-Reply-To: <moafi2$ocm$1@ger.gmane.org> (Vaidheeswaran C.'s message of "Fri,  17 Jul 2015 14:19:19 +0530")

Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com> writes:

>>> > so I want part of the buffer to have wrapped lines (preferably at
>>> > word boundaries), and part to have not (like having
>>> > toggle-truncate lines only for a region).  I suspect this is not
>>> > possible
>> Can't you just insert unwrapped lines and use `fill-region' on the
>> parts you want to have wrapped?
>
> I have a feeling that he wants the "fill" to be "soft" on certain
> paragraphs of his choosing.  The only mode that I know of where in
> Emacs "persists" text properties is "Enriched Mode".
>
>     (info "(emacs) Hard and Soft Newlines")
>
> In other words, the user wants to configure right/left margins and
> importantly the width of the text area on per-paragraph basis. In the
> actual file, a paragraph will have no newline at all howsoever it may
> be displayed.

Ah, ok.  I think it's possible, too.  There are left-margin and
right-margin text properties.

,----[ (info "(elisp)Format Properties") ]
| These text properties affect the behavior of the fill commands.  They
| are used for representing formatted text.  *Note Filling::, and *note
| Margins::.
| 
| [...]
| 
| ‘right-margin’
|      This property specifies an extra right margin for filling this part
|      of the text.
| 
| ‘left-margin’
|      This property specifies an extra left margin for filling this part
|      of the text.
`----

So possibly adding these properties to some paragraphs in your buffer +
`visual-line-mode' might do the trick.

Bye,
Tassilo



  reply	other threads:[~2015-07-17 10:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17  7:06 Filling a string? Marcin Borkowski
2015-07-17  8:11 ` Tassilo Horn
2015-07-17  8:49   ` Vaidheeswaran C
2015-07-17 10:58     ` Tassilo Horn [this message]
2015-07-17 12:14       ` Tassilo Horn
2015-07-17 23:42 ` Emanuel Berg
     [not found] <mailman.7037.1437116822.904.help-gnu-emacs@gnu.org>
2015-07-17  7:26 ` Pascal J. Bourguignon

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87fv4n8301.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=vaidheeswaran.chinnaraju@gmail.com \
    /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.
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).