From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.help Subject: Re: openwith-mode opens attachments through message-send-and-exit Date: Tue, 11 Aug 2009 17:35:14 +0200 Message-ID: References: <87tz0gb1ur.fsf@marauder.physik.uni-ulm.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250005360 10950 80.91.229.12 (11 Aug 2009 15:42:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Aug 2009 15:42:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 11 17:42:33 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MatUb-0005jp-KZ for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Aug 2009 17:42:33 +0200 Original-Received: from localhost ([127.0.0.1]:45157 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MatUY-0008JF-Kv for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Aug 2009 11:42:26 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-2.dfn.de!news.dfn.de!newscore.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail Original-Newsgroups: gnu.emacs.help Cancel-Lock: sha1:DJCSqz1qWW/4T+GapXCrB0CO/LI= Original-Lines: 28 Original-NNTP-Posting-Host: news-access-from.tuwien.ac.at Original-X-Trace: 1250004914 tunews.univie.ac.at 11868 192.35.241.118 Original-X-Complaints-To: abuse@tuwien.ac.at Original-Xref: news.stanford.edu gnu.emacs.help:171877 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67049 Archived-At: Reiner Steib 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.