Gnus development mailing list
 help / color / mirror / Atom feed
* attaching many files
@ 2009-08-20 11:25 Katsumi Yamaoka
  2009-08-20 19:49 ` Reiner Steib
  0 siblings, 1 reply; 7+ messages in thread
From: Katsumi Yamaoka @ 2009-08-20 11:25 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 616 bytes --]

Hi,

When I attach two or more files to a message, I need to type two
`C-n's every time before attaching the next file.  It is because
the `mml-attach-(file|buffer|external)' commands don't move point
after inserting a tag.  I feel it inconvenience.  Furthermore, if
those commands are invoked at the message header, the tag will be
added to the bottom of the body but point stays in the message
header no matter how big the body may be.  WDYT?

It's easy to make those commands move point.  That is to remove
`save-excursion'.  Is it ok?

To try the new behavior without modifying Gnus, use the following
advices:


[-- Attachment #2: Type: application/emacs-lisp, Size: 533 bytes --]

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

* Re: attaching many files
  2009-08-20 11:25 attaching many files Katsumi Yamaoka
@ 2009-08-20 19:49 ` Reiner Steib
  2009-08-20 22:30   ` Katsumi Yamaoka
  0 siblings, 1 reply; 7+ messages in thread
From: Reiner Steib @ 2009-08-20 19:49 UTC (permalink / raw)
  To: ding

On Thu, Aug 20 2009, Katsumi Yamaoka wrote:

> When I attach two or more files to a message, I need to type two
> `C-n's every time before attaching the next file.  It is because
> the `mml-attach-(file|buffer|external)' commands don't move point
> after inserting a tag.  I feel it inconvenience.  Furthermore, if
> those commands are invoked at the message header, the tag will be
> added to the bottom of the body but point stays in the message
> header no matter how big the body may be.  WDYT?

I think the behavior when inside the headers is The Right Thing to do.
When inside the body, point should probably be moved after the closing
mml tag.

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




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

* Re: attaching many files
  2009-08-20 19:49 ` Reiner Steib
@ 2009-08-20 22:30   ` Katsumi Yamaoka
  2009-08-28 10:57     ` Katsumi Yamaoka
  0 siblings, 1 reply; 7+ messages in thread
From: Katsumi Yamaoka @ 2009-08-20 22:30 UTC (permalink / raw)
  To: ding

>>>>> Reiner Steib wrote:
> On Thu, Aug 20 2009, Katsumi Yamaoka wrote:

>> When I attach two or more files to a message, I need to type two
>> `C-n's every time before attaching the next file.  It is because
>> the `mml-attach-(file|buffer|external)' commands don't move point
>> after inserting a tag.  I feel it inconvenience.  Furthermore, if
>> those commands are invoked at the message header, the tag will be
>> added to the bottom of the body but point stays in the message
>> header no matter how big the body may be.  WDYT?

> I think the behavior when inside the headers is The Right Thing to do.

Agreed.  Maybe the bottom of the body is the right place especially
for attachments sent to Windows users.

> When inside the body, point should probably be moved after the closing
> mml tag.

Even when invoking a mml-attach-* command at the message header,
isn't it better to move point to the closing mml tag?  Currently
point stays in the header, so a user may not see the tag is added.

Regards,



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

* Re: attaching many files
  2009-08-20 22:30   ` Katsumi Yamaoka
@ 2009-08-28 10:57     ` Katsumi Yamaoka
  2009-08-28 17:17       ` Reiner Steib
  0 siblings, 1 reply; 7+ messages in thread
From: Katsumi Yamaoka @ 2009-08-28 10:57 UTC (permalink / raw)
  To: ding

>>>>> Katsumi Yamaoka wrote:
>>>>>> Reiner Steib wrote:
>> On Thu, Aug 20 2009, Katsumi Yamaoka wrote:

>>> When I attach two or more files to a message, I need to type two
>>> `C-n's every time before attaching the next file.  It is because
>>> the `mml-attach-(file|buffer|external)' commands don't move point
>>> after inserting a tag.  I feel it inconvenience.  Furthermore, if
>>> those commands are invoked at the message header, the tag will be
>>> added to the bottom of the body but point stays in the message
>>> header no matter how big the body may be.  WDYT?

>> I think the behavior when inside the headers is The Right Thing to do.

> Agreed.  Maybe the bottom of the body is the right place especially
> for attachments sent to Windows users.

>> When inside the body, point should probably be moved after the closing
>> mml tag.

> Even when invoking a mml-attach-* command at the message header,
> isn't it better to move point to the closing mml tag?  Currently
> point stays in the header, so a user may not see the tag is added.

I've made changes in the Gnus trunk so that
the `mml-attach-(file|buffer|external)' commands may move point
to the end of a mml tag.  If it causes any trouble, please let me
know.

Regards,



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

* Re: attaching many files
  2009-08-28 10:57     ` Katsumi Yamaoka
@ 2009-08-28 17:17       ` Reiner Steib
  2009-08-30 22:14         ` Katsumi Yamaoka
  0 siblings, 1 reply; 7+ messages in thread
From: Reiner Steib @ 2009-08-28 17:17 UTC (permalink / raw)
  To: ding

On Fri, Aug 28 2009, Katsumi Yamaoka wrote:

>>>>>> Katsumi Yamaoka wrote:
>>>>>>> Reiner Steib wrote:
>>> I think the behavior when inside the headers is The Right Thing to do.
>
>> Agreed.  Maybe the bottom of the body is the right place especially
>> for attachments sent to Windows users.
>
>>> When inside the body, point should probably be moved after the closing
>>> mml tag.
>
>> Even when invoking a mml-attach-* command at the message header,
>> isn't it better to move point to the closing mml tag?  Currently
>> point stays in the header, so a user may not see the tag is added.
>
> I've made changes in the Gnus trunk so that
> the `mml-attach-(file|buffer|external)' commands may move point
> to the end of a mml tag.  If it causes any trouble, please let me
> know.

I didn't try your code yet, but I still think that point should not
move when inside the headers.  How about printing a message like
"(file|buffer|external file) FOO attached at the end of the message"
in this case and keep save-excursion in that case?

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




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

* Re: attaching many files
  2009-08-28 17:17       ` Reiner Steib
@ 2009-08-30 22:14         ` Katsumi Yamaoka
  2009-09-08  6:46           ` Katsumi Yamaoka
  0 siblings, 1 reply; 7+ messages in thread
From: Katsumi Yamaoka @ 2009-08-30 22:14 UTC (permalink / raw)
  To: ding

>>>>> Reiner Steib wrote:
> On Fri, Aug 28 2009, Katsumi Yamaoka wrote:
[...]
>>> Even when invoking a mml-attach-* command at the message header,
>>> isn't it better to move point to the closing mml tag?  Currently
>>> point stays in the header, so a user may not see the tag is added.
>>
>> I've made changes in the Gnus trunk so that
>> the `mml-attach-(file|buffer|external)' commands may move point
>> to the end of a mml tag.  If it causes any trouble, please let me
>> know.

> I didn't try your code yet, but I still think that point should not
> move when inside the headers.  How about printing a message like
> "(file|buffer|external file) FOO attached at the end of the message"
> in this case and keep save-excursion in that case?

Ok.  I'll do so in the course of today.



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

* Re: attaching many files
  2009-08-30 22:14         ` Katsumi Yamaoka
@ 2009-09-08  6:46           ` Katsumi Yamaoka
  0 siblings, 0 replies; 7+ messages in thread
From: Katsumi Yamaoka @ 2009-09-08  6:46 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

>>>>> Reiner Steib wrote:
>> I didn't try your code yet, but I still think that point should not
>> move when inside the headers.

`C-c C-m m' (mml-insert-multipart) and `C-c C-m p' (mml-insert-part)
insert a MIME tag even in the message header.  Do you have an idea
to fix it?  I vote for stopping it with an error as follows:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1278 bytes --]

--- mml.el~	2009-09-07 08:13:38 +0000
+++ mml.el	2009-09-08 06:44:08 +0000
@@ -1387,20 +1387,23 @@
 		 (file-name-nondirectory file))))))
 
 (defun mml-insert-multipart (&optional type)
-  (interactive (list (completing-read "Multipart type (default mixed): "
-				      '(("mixed") ("alternative") ("digest") ("parallel")
-					("signed") ("encrypted"))
-				      nil nil "mixed")))
+  (interactive (if (message-in-body-p)
+		   (list (completing-read "Multipart type (default mixed): "
+					  '(("mixed") ("alternative")
+					    ("digest") ("parallel")
+					    ("signed") ("encrypted"))
+					  nil nil "mixed"))
+		 (error "Use this command in the message body")))
   (or type
       (setq type "mixed"))
   (mml-insert-empty-tag "multipart" 'type type)
   (forward-line -1))
 
 (defun mml-insert-part (&optional type)
-  (interactive
-   (list (mml-minibuffer-read-type "")))
-  (mml-insert-tag 'part 'type type 'disposition "inline")
-  (forward-line -1))
+  (interactive (if (message-in-body-p)
+		   (list (mml-minibuffer-read-type ""))
+		 (error "Use this command in the message body")))
+  (mml-insert-tag 'part 'type type 'disposition "inline"))
 
 (declare-function message-subscribed-p "message" ())
 (declare-function message-make-mail-followup-to "message"

[-- Attachment #3: Type: text/plain, Size: 104 bytes --]


(I've added another change to `mml-insert-part' so as to make
 point end up at the end of a MIME tag.)

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

end of thread, other threads:[~2009-09-08  6:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-20 11:25 attaching many files Katsumi Yamaoka
2009-08-20 19:49 ` Reiner Steib
2009-08-20 22:30   ` Katsumi Yamaoka
2009-08-28 10:57     ` Katsumi Yamaoka
2009-08-28 17:17       ` Reiner Steib
2009-08-30 22:14         ` Katsumi Yamaoka
2009-09-08  6:46           ` Katsumi Yamaoka

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