all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Karl Eichwalder <keichwa@gmx.net>
Subject: Re: No line break within [[foo bar]] (wikipedia)
Date: Sun, 20 Apr 2003 11:35:45 +0200	[thread overview]
Message-ID: <shr87xqzny.fsf@tux.gnu.franken.de> (raw)
In-Reply-To: 84of31ftpb.fsf@lucy.is.informatik.uni-duisburg.de

kai.grossjohann@gmx.net (Kai Großjohann) writes:

Thanks for advise!

> I guess it's obvious how to change the code to look for * or # at
> beginning of line.  So I guess you did that, but it didn't work.
> What exactly did you try, and what happened when you tried it?
>
> (save-excursion
>   (beginning-of-line)
>   (member (char-after (point)) '(?\* ?\#)))
> ...seems to be code that looks whether the line starts with * or #.

I tried serveral way (w/o understanding what I'm actually doing); here
is the last experiment:

(defun fill-list-item-nobreak-p () 
  (save-excursion
    (beginning-of-line)
    (member (char-after (point)) '(?\* ?\#))))

(add-to-list 'fill-nobreak-predicate 'fill-list-item-nobreak-p)

The result is (let's assume the limit is at the word "limit"):

   * this is a very long line, longer than the fill limit

==>

   *
     this is a very long line, longer than the fill
     limit

Thus Emacs will break the line after "* " and that's not what I want.

-- 
                                                         |      ,__o
http://www.gnu.franken.de/ke/                            |    _-\_<,
ke@suse.de (work) / keichwa@gmx.net (home)               |   (*)/'(*)

  reply	other threads:[~2003-04-20  9:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-14 19:04 No line break within [[foo bar]] (wikipedia) Karl Eichwalder
2003-03-15  9:45 ` Kai Großjohann
2003-04-20  4:37 ` Karl Eichwalder
2003-04-20  8:40   ` Kai Großjohann
2003-04-20  9:35     ` Karl Eichwalder [this message]
2003-04-20 13:21       ` Kai Großjohann
2003-04-20 17:15         ` Karl Eichwalder
2003-04-20 16:06   ` Stefan Monnier
2003-04-21  6:49     ` Karl Eichwalder
2003-04-21 13:52       ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=shr87xqzny.fsf@tux.gnu.franken.de \
    --to=keichwa@gmx.net \
    /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 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.