unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Teemu Likonen <tlikonen@iki.fi>
To: bug-cc-mode@gnu.org
Cc: bug-gnu-emacs@gnu.org, 1756@emacsbugs.donarmstrong.com
Subject: Re: bug#1756: awk-mode: An empty line is not a paragraph separator (should be)
Date: Wed, 07 Jan 2009 18:32:56 +0200	[thread overview]
Message-ID: <87fxjvt6tj.fsf@iki.fi> (raw)
In-Reply-To: <20090106161541.GB5612@muc.de> (Alan Mackenzie's message of "Tue\, 6 Jan 2009 16\:15\:41 +0000")

Alan Mackenzie (2009-01-06 16:15 +0000) wrote:

>> After "C-c . awk RET" it changes to this:
>
>>     "[ \t]*\\(\\(#+\\)[ \t]*\\)?$\\|^\f"
>                    ^^
>
>> Even though I chose to override the style settings "#*" changes to "#+".
>
> I don't think this is a bug.  You asked for "awk" style to be set on the
> buffer, and this is exactly what you got.

Well, I asked that, but I had also explicitly asked to override style
settings (through the customize interface). My opinion is that the
current behavior is so confusing that it's either a bug or simply wrong
design decision.

I don't mean to complain too loudly, though. See below.

> I am guessing that the cause is in the fine CC Mode manual, [...]

> [...] perhaps it would be better if amended something like this:
>
>     When you initialize the buffer, the settings are made in the
>     following order.  So if you make conflicting settings in several of
>     these ways, the way that takes precedence is the one that appears
>     latest in the list(2):
>
>         Style
>         Top-level command or "customization interface"
>         Hook
>         File Style

>     ---------- Footnotes ----------
>     (2) If you later call `c-set-style' (C-c .), all the style variables
>     will get set to the style you select.
>  
> What do you think?

Well, my real opinion first: User's explicit "override style settings"
setting should just do that: override style settings no matter what
style changes the user does while editing the buffer. For example, user
may want to choose certain custom comment prefix settings and, while
editing the code, she may want to experiment with different style
settings or convert the code from one style to another. Logically, if
she wants to get comment prefix settings from a pre-defined style she
chooses "Use style settings" (c-comment-prefix-regexp). If she wants to
use her own comment prefix she chooses "Override style settings". I
think this is the most intuitive behaviour. Currently user can only
override style settings for the initial style state.

But if you choose to maintain the current behaviour anyway, then I'd say
that the changes you suggested for the documentation are very good. I'd
also suggest to change the documentation of c-comment-prefix-regexp
variable so that it tells how the variable effects in the practice.

Anyway, the empty-line bug is the main thing. If that bug in Awk mode
gets fixed (you already did with that patch) then there shouldn't be
much need for changing comment prefixes in the first place. So I'm
really more on the "thank you" side than on "complaining" side. :-)

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB


  reply	other threads:[~2009-01-07 16:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-01  8:27 bug#1756: awk-mode: An empty line is not a paragraph separator (should be) Teemu Likonen
2009-01-05 16:12 ` Alan Mackenzie
2009-01-05 17:53   ` Teemu Likonen
2009-01-05 18:35 ` Alan Mackenzie
2009-01-05 18:38   ` Teemu Likonen
2009-01-06 16:15     ` Alan Mackenzie
2009-01-07 16:32       ` Teemu Likonen [this message]
2009-01-08 16:25         ` Alan Mackenzie

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=87fxjvt6tj.fsf@iki.fi \
    --to=tlikonen@iki.fi \
    --cc=1756@emacsbugs.donarmstrong.com \
    --cc=bug-cc-mode@gnu.org \
    --cc=bug-gnu-emacs@gnu.org \
    /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 public inbox

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

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).