Gnus development mailing list
 help / color / mirror / Atom feed
* message-cite-function: message-cite-original-without-signature?
@ 2005-10-20 14:58 Reiner Steib
  2005-10-20 15:47 ` Romain Francoise
  0 siblings, 1 reply; 15+ messages in thread
From: Reiner Steib @ 2005-10-20 14:58 UTC (permalink / raw)


Hi,

wouldn't it make sense to change the _default_ of
`message-cite-function' to `message-cite-original-without-signature'?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: message-cite-function: message-cite-original-without-signature?
  2005-10-20 14:58 message-cite-function: message-cite-original-without-signature? Reiner Steib
@ 2005-10-20 15:47 ` Romain Francoise
  2006-04-13  8:11   ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 15+ messages in thread
From: Romain Francoise @ 2005-10-20 15:47 UTC (permalink / raw)


Reiner Steib <reinersteib+gmane@imap.cc> writes:

> wouldn't it make sense to change the _default_ of
> `message-cite-function' to `message-cite-original-without-signature'?

I'd rather not change it -- some inexperienced people sometimes
inadvertently use a signature marker in the body of their messages to
separate paragraphs.

Also, some users don't like the feature.  I know for a fact that Larsi
himself kills signatures manually.  :-)

-- 
Romain Francoise <romain@orebokech.com> | I've become someone else's
it's a miracle -- http://orebokech.com/ | nightmare...



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

* Re: message-cite-function: message-cite-original-without-signature?
  2005-10-20 15:47 ` Romain Francoise
@ 2006-04-13  8:11   ` Lars Magne Ingebrigtsen
  2006-04-13 11:46     ` Reiner Steib
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Magne Ingebrigtsen @ 2006-04-13  8:11 UTC (permalink / raw)


Romain Francoise <romain@orebokech.com> writes:

> Reiner Steib <reinersteib+gmane@imap.cc> writes:
>
>> wouldn't it make sense to change the _default_ of
>> `message-cite-function' to `message-cite-original-without-signature'?
>
> I'd rather not change it -- some inexperienced people sometimes
> inadvertently use a signature marker in the body of their messages to
> separate paragraphs.

Well, hitting `undo' would reveal the removed signature, so perhaps
it's a good idea...

> Also, some users don't like the feature.  I know for a fact that Larsi
> himself kills signatures manually.  :-)

I do.  :-)  But for 95% of the messages I respond to, I just mark the
section I want to answer and then hit `C-c C-v', so the point is
mostly moot for me.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Re: message-cite-function: message-cite-original-without-signature?
  2006-04-13  8:11   ` Lars Magne Ingebrigtsen
@ 2006-04-13 11:46     ` Reiner Steib
  2006-04-13 11:57       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 15+ messages in thread
From: Reiner Steib @ 2006-04-13 11:46 UTC (permalink / raw)


On Thu, Apr 13 2006, Lars Magne Ingebrigtsen wrote:

> Romain Francoise <romain@orebokech.com> writes:
>
>> Reiner Steib <reinersteib+gmane@imap.cc> writes:
>>
>>> wouldn't it make sense to change the _default_ of
>>> `message-cite-function' to `message-cite-original-without-signature'?
>>
>> I'd rather not change it -- some inexperienced people sometimes
>> inadvertently use a signature marker in the body of their messages to
>> separate paragraphs.
>
> Well, hitting `undo' would reveal the removed signature, so perhaps
> it's a good idea...

It doesn't for me.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: message-cite-function: message-cite-original-without-signature?
  2006-04-13 11:46     ` Reiner Steib
@ 2006-04-13 11:57       ` Lars Magne Ingebrigtsen
  2006-04-13 12:55         ` Reiner Steib
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Magne Ingebrigtsen @ 2006-04-13 11:57 UTC (permalink / raw)


Reiner Steib <reinersteib+gmane@imap.cc> writes:

>> Well, hitting `undo' would reveal the removed signature, so perhaps
>> it's a good idea...
>
> It doesn't for me.

Perhaps Message should set an undo-boundary before removing the
signature? 

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Re: message-cite-function: message-cite-original-without-signature?
  2006-04-13 11:57       ` Lars Magne Ingebrigtsen
@ 2006-04-13 12:55         ` Reiner Steib
  2006-04-13 13:36           ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 15+ messages in thread
From: Reiner Steib @ 2006-04-13 12:55 UTC (permalink / raw)


On Thu, Apr 13 2006, Lars Magne Ingebrigtsen wrote:

> Reiner Steib <reinersteib+gmane@imap.cc> writes:
>
>>> Well, hitting `undo' would reveal the removed signature, so perhaps
>>> it's a good idea...
>>
>> It doesn't for me.

I get an error when I do `C-/':

| undo-more: Changes to be undone are outside visible portion of buffer

Most probably (I didn't investigate any further) because of...

,----[ (info "(gnus)No Gnus") ]
|    * Changes in Message mode
| [...]
|         * Gnus uses narrowing to hide headers in Message buffers.  The
|           `References' header is hidden by default.  To make all
|           headers visible, use `(setq message-hidden-headers nil)'.
|           *Note Message Headers: (message)Message Headers.
`----

> Perhaps Message should set an undo-boundary before removing the
> signature? 

`message-cite-original-1' already has:

      (when strip-signature
	;; Allow undoing.
	(undo-boundary)

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: message-cite-function: message-cite-original-without-signature?
  2006-04-13 12:55         ` Reiner Steib
@ 2006-04-13 13:36           ` Lars Magne Ingebrigtsen
  2006-04-13 14:45             ` Romain Francoise
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Magne Ingebrigtsen @ 2006-04-13 13:36 UTC (permalink / raw)


Reiner Steib <reinersteib+gmane@imap.cc> writes:

> | undo-more: Changes to be undone are outside visible portion of buffer

Well, that's annoying.  Perhaps the order of the alteration and the
narrowing could be altered...

> `message-cite-original-1' already has:
>
>       (when strip-signature
> 	;; Allow undoing.
> 	(undo-boundary)

Right.  So it's the

  (message-hide-headers)

call in gnus-msg that's the culprit.  Hm....

Could we devise a different way to hide the headers?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Re: message-cite-function: message-cite-original-without-signature?
  2006-04-13 13:36           ` Lars Magne Ingebrigtsen
@ 2006-04-13 14:45             ` Romain Francoise
  2006-04-13 15:26               ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 15+ messages in thread
From: Romain Francoise @ 2006-04-13 14:45 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

>> | undo-more: Changes to be undone are outside visible portion of buffer

> Well, that's annoying.

Whoops, that would be my fault.

Perhaps we could teach undo to widen the buffer prior to undoing?

> Could we devise a different way to hide the headers?

We've been there before...

-- 
Romain Francoise <romain@orebokech.com> | The sea! the sea! the open
it's a miracle -- http://orebokech.com/ | sea! The blue, the fresh, the
                                        | ever free! --Bryan W. Procter



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

* Re: message-cite-function: message-cite-original-without-signature?
  2006-04-13 14:45             ` Romain Francoise
@ 2006-04-13 15:26               ` Lars Magne Ingebrigtsen
  2006-04-13 15:52                 ` Romain Francoise
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Magne Ingebrigtsen @ 2006-04-13 15:26 UTC (permalink / raw)


Romain Francoise <romain@orebokech.com> writes:

> Perhaps we could teach undo to widen the buffer prior to undoing?

I'm not sure that's possible.  Well, it's Emacs; everything is
possible.  But can one have a function run in front of `undo'?  We
don't necessarily know what keystroke the user enters to undo.

>> Could we devise a different way to hide the headers?
>
> We've been there before...

We have.  :-)

I tried poking around a bit to see whether we could just narrow
earlier, but Message calls `widen' a few times during setup.  Of
course, these could probably be removed...

Emacs 22 hasn't come up with any new, spiffy things that could be used
to hide text in a buffer?

(For those who don't remember this discussion from earlier iterations:
We want the text to really be in the buffer, so that autosaving etc
works as normal, but it shouldn't be visible to the user.  Using
invisible text is a possibility, but it has shown itself to be
problematic -- people cut'n'paste the surrounding text, and, whoops,
you have lots of text becoming visible after you've posted the
message.

So we need:

1) text in the buffer (probably)
2) that's invisible, and can't be moved around, or yanked, or the like

Probably.)

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Re: message-cite-function: message-cite-original-without-signature?
  2006-04-13 15:26               ` Lars Magne Ingebrigtsen
@ 2006-04-13 15:52                 ` Romain Francoise
  2006-04-13 16:14                   ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 15+ messages in thread
From: Romain Francoise @ 2006-04-13 15:52 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> I'm not sure that's possible.  Well, it's Emacs; everything is
> possible.  But can one have a function run in front of `undo'?  We
> don't necessarily know what keystroke the user enters to undo.

We could simply remap `undo' to `message-undo' in message-mode-map and
that would catch all possible bindings -- even those set by the user.

See (info "(elisp)Remapping Commands")

-- 
Romain Francoise <romain@orebokech.com> | The sea! the sea! the open
it's a miracle -- http://orebokech.com/ | sea! The blue, the fresh, the
                                        | ever free! --Bryan W. Procter



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

* Re: message-cite-function: message-cite-original-without-signature?
  2006-04-13 15:52                 ` Romain Francoise
@ 2006-04-13 16:14                   ` Lars Magne Ingebrigtsen
  2006-04-13 16:55                     ` Romain Francoise
  2006-04-14 19:45                     ` Miles Bader
  0 siblings, 2 replies; 15+ messages in thread
From: Lars Magne Ingebrigtsen @ 2006-04-13 16:14 UTC (permalink / raw)


Romain Francoise <romain@orebokech.com> writes:

> We could simply remap `undo' to `message-undo' in message-mode-map and
> that would catch all possible bindings -- even those set by the user.

Neat.  That would be a solution, then.  Unless it's annoying to have
`undo' do `widen'.  I mean, it is possible that the user has narrowed
the buffer on her own to do a tricky piece of editing...

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Re: message-cite-function: message-cite-original-without-signature?
  2006-04-13 16:14                   ` Lars Magne Ingebrigtsen
@ 2006-04-13 16:55                     ` Romain Francoise
  2006-04-13 17:03                       ` Lars Magne Ingebrigtsen
  2006-04-14 19:45                     ` Miles Bader
  1 sibling, 1 reply; 15+ messages in thread
From: Romain Francoise @ 2006-04-13 16:55 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Neat.  That would be a solution, then.  Unless it's annoying to have
> `undo' do `widen'.  I mean, it is possible that the user has narrowed
> the buffer on her own to do a tricky piece of editing...

I hadn't thought of that.

But now that I think of it, we could make Gnus set `last-command' to
something recognizable as the last step of preparing the Message buffer,
and make `message-undo' do something special only if the last command
was that command.  That way, calling undo to get the signature back
would work (by widening), and it wouldn't interfere with normal editing.

But if the user does anything in the buffer before calling undo, even
move around, then it doesn't work.

Hmm.

-- 
Romain Francoise <romain@orebokech.com> | The sea! the sea! the open
it's a miracle -- http://orebokech.com/ | sea! The blue, the fresh, the
                                        | ever free! --Bryan W. Procter



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

* Re: message-cite-function: message-cite-original-without-signature?
  2006-04-13 16:55                     ` Romain Francoise
@ 2006-04-13 17:03                       ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Magne Ingebrigtsen @ 2006-04-13 17:03 UTC (permalink / raw)


Romain Francoise <romain@orebokech.com> writes:

> But if the user does anything in the buffer before calling undo, even
> move around, then it doesn't work.

Yeah.  It might take a few keystrokes before the user discovers the
missing signature that the `undo' is supposed to bring back.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Re: message-cite-function: message-cite-original-without-signature?
  2006-04-13 16:14                   ` Lars Magne Ingebrigtsen
  2006-04-13 16:55                     ` Romain Francoise
@ 2006-04-14 19:45                     ` Miles Bader
  2006-04-15  5:39                       ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 15+ messages in thread
From: Miles Bader @ 2006-04-14 19:45 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
>> We could simply remap `undo' to `message-undo' in message-mode-map and
>> that would catch all possible bindings -- even those set by the user.
>
> Neat.  That would be a solution, then.

... unless of course, the user uses some variant, e.g.,
`advertised-undo' (what `C-x u' is bound to)...

In general I think it's a lot safer if you can figure out how to make
the built-in command do the right thing rather than relying on your own
special variant always being invoked (and the closer your variant is to
the real thing, the more confusing the apparent misbehavior is when a
user manages to invoke the wrong one).

[It's not like people follow this rule, but still...]

-Miles
-- 
Love is a snowmobile racing across the tundra.  Suddenly it flips over,
pinning you underneath.  At night the ice weasels come.  --Nietzsche




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

* Re: message-cite-function: message-cite-original-without-signature?
  2006-04-14 19:45                     ` Miles Bader
@ 2006-04-15  5:39                       ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Magne Ingebrigtsen @ 2006-04-15  5:39 UTC (permalink / raw)


Miles Bader <miles@gnu.org> writes:

> In general I think it's a lot safer if you can figure out how to make
> the built-in command do the right thing rather than relying on your own
> special variant always being invoked (and the closer your variant is to
> the real thing, the more confusing the apparent misbehavior is when a
> user manages to invoke the wrong one).

I agree.  The best solution would be to figure out a different
workable method for hiding the headers in the buffer that doesn't
involve narrowing.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

end of thread, other threads:[~2006-04-15  5:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-20 14:58 message-cite-function: message-cite-original-without-signature? Reiner Steib
2005-10-20 15:47 ` Romain Francoise
2006-04-13  8:11   ` Lars Magne Ingebrigtsen
2006-04-13 11:46     ` Reiner Steib
2006-04-13 11:57       ` Lars Magne Ingebrigtsen
2006-04-13 12:55         ` Reiner Steib
2006-04-13 13:36           ` Lars Magne Ingebrigtsen
2006-04-13 14:45             ` Romain Francoise
2006-04-13 15:26               ` Lars Magne Ingebrigtsen
2006-04-13 15:52                 ` Romain Francoise
2006-04-13 16:14                   ` Lars Magne Ingebrigtsen
2006-04-13 16:55                     ` Romain Francoise
2006-04-13 17:03                       ` Lars Magne Ingebrigtsen
2006-04-14 19:45                     ` Miles Bader
2006-04-15  5:39                       ` Lars Magne Ingebrigtsen

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 NNTP newsgroup(s).