unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* openwith-mode opens attachments through message-send-and-exit
@ 2009-08-08 18:46 Sven Bretfeld
  0 siblings, 0 replies; 6+ messages in thread
From: Sven Bretfeld @ 2009-08-08 18:46 UTC (permalink / raw)
  To: help-gnu-emacs

Hello all

This can't be a feature, can it?

When trying to send a message containing an attachment, the message will
not be send, but the attached file is "send" to an external program
instead while openwith-mode (or sex-mode) is active as a global minor
mode.

How can I switch off openwith-mode while writing a message? A mode-hook?
How can I secure that the mode is switched on again, after the message
is sent?

And more important, why is such a hook not part of these packages?

Thanks,

Sven




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

* Re: openwith-mode opens attachments through message-send-and-exit
       [not found] <mailman.4209.1249757205.2239.help-gnu-emacs@gnu.org>
@ 2009-08-08 22:36 ` Markus Triska
  2009-08-09 12:09   ` Sven Bretfeld
       [not found]   ` <mailman.4231.1249819762.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Markus Triska @ 2009-08-08 22:36 UTC (permalink / raw)
  To: help-gnu-emacs

"Sven Bretfeld" <sven.bretfeld@gmx.ch> writes:

> How can I switch off openwith-mode while writing a message?

This in your .emacs makes openwith-mode work with attachments in Gnus:

(require 'mm-util)
(add-to-list 'mm-inhibit-file-name-handlers 'openwith-file-handler)


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

* Re: openwith-mode opens attachments through message-send-and-exit
  2009-08-08 22:36 ` Markus Triska
@ 2009-08-09 12:09   ` Sven Bretfeld
       [not found]   ` <mailman.4231.1249819762.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Sven Bretfeld @ 2009-08-09 12:09 UTC (permalink / raw)
  To: help-gnu-emacs

Hello Markus

Markus Triska <markus.triska@gmx.at> writes:

> "Sven Bretfeld" <sven.bretfeld@gmx.ch> writes:
>
>> How can I switch off openwith-mode while writing a message?
>
> This in your .emacs makes openwith-mode work with attachments in Gnus:
>
> (require 'mm-util)
> (add-to-list 'mm-inhibit-file-name-handlers 'openwith-file-handler)

That's working. Thx. Is it a bug that deserves to be reported?

Greetings,

Sven

-- 
Sven Bretfeld
      \ CEntrum für
CERES  \ REligionswissenschaftliche
________\_Studien__________________
Ruhr-Universität Bochum
Universitätsstraße 150
D-44780 Bochum
http://www.ruhr-uni-bochum.de/relwiss/Lehrstuhl/Mitarbeitende/Bretfeld.html




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

* Re: openwith-mode opens attachments through message-send-and-exit
       [not found]   ` <mailman.4231.1249819762.2239.help-gnu-emacs@gnu.org>
@ 2009-08-09 13:22     ` Markus Triska
  2009-08-10  6:49       ` Reiner Steib
  0 siblings, 1 reply; 6+ messages in thread
From: Markus Triska @ 2009-08-09 13:22 UTC (permalink / raw)
  To: help-gnu-emacs

"Sven Bretfeld" <sven.bretfeld@gmx.ch> writes:

> That's working. Thx. Is it a bug that deserves to be reported?

In my opinion, it's worth making mm-inhibit-file-name-handlers a bit
more "official", for example, making it work with M-x customize-variable
etc. There is not much that openwith-mode can do in this case, because
it typically cannot tell the context in which it is used.


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

* Re: openwith-mode opens attachments through message-send-and-exit
  2009-08-09 13:22     ` Markus Triska
@ 2009-08-10  6:49       ` Reiner Steib
  2009-08-11 15:35         ` Markus Triska
  0 siblings, 1 reply; 6+ messages in thread
From: Reiner Steib @ 2009-08-10  6:49 UTC (permalink / raw)
  To: help-gnu-emacs

On Sun, Aug 09 2009, Markus Triska wrote:

> In my opinion, it's worth making mm-inhibit-file-name-handlers a bit
> more "official", for example, making it work with M-x customize-variable
> etc. 

What is unofficial about a defvar?  Until yesterday, I didn't even
know it exists, so I guess it's not something a user typically wants
to set (via customize).

> There is not much that openwith-mode can do in this case, because it
> typically cannot tell the context in which it is used.

You can add something like ...

(eval-after-load "mm-util"
  '(add-to-list 'mm-inhibit-file-name-handlers 'openwith-file-handler))

BTW, a very quick glance over `openwith.el' suggest that parts of it
do the same as `gnus-dired.el' (`gnus-dired-find-file-mailcap').
Instead of `openwith-associations' should use mailcap.el instead of
re-inventing yet another mailcap list.

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


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

* Re: openwith-mode opens attachments through message-send-and-exit
  2009-08-10  6:49       ` Reiner Steib
@ 2009-08-11 15:35         ` Markus Triska
  0 siblings, 0 replies; 6+ messages in thread
From: Markus Triska @ 2009-08-11 15:35 UTC (permalink / raw)
  To: help-gnu-emacs

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

>> There is not much that openwith-mode can do in this case, because it
>> typically cannot tell the context in which it is used.
>
> You can add something like ...
>
> (eval-after-load "mm-util"
>   '(add-to-list 'mm-inhibit-file-name-handlers 'openwith-file-handler))

See D.1 Emacs Lisp Coding Conventions:

   * Avoid using `eval-after-load' in libraries and packages (*note
     Hooks for Loading::).  This feature is meant for personal
     customizations; using it in a Lisp program is unclean, because it
     modifies the behavior of another Lisp file in a way that's not
     visible in that file.  This is an obstacle for debugging, much
     like advising a function in the other package.

and from 15.10 Hooks for Loading:

      But it is OK to use `eval-after-load' in your personal
   customizations if you don't feel they must meet the design standards
   for programs meant for wider use.

Thus, I recommend to set mm-inhibit-file-name-handlers only in your own
customization file, not in openwith.el, a package meant for wider use.
You can add the code you show to your personal customizations.


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

end of thread, other threads:[~2009-08-11 15:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-08 18:46 openwith-mode opens attachments through message-send-and-exit Sven Bretfeld
     [not found] <mailman.4209.1249757205.2239.help-gnu-emacs@gnu.org>
2009-08-08 22:36 ` Markus Triska
2009-08-09 12:09   ` Sven Bretfeld
     [not found]   ` <mailman.4231.1249819762.2239.help-gnu-emacs@gnu.org>
2009-08-09 13:22     ` Markus Triska
2009-08-10  6:49       ` Reiner Steib
2009-08-11 15:35         ` Markus Triska

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