From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Petr Hracek Newsgroups: gmane.emacs.bugs Subject: bug#20959: Switching script mode to rpm puts nonsense on the first line Date: Fri, 17 Jul 2015 14:04:01 +0200 Message-ID: <55A8EF31.7020401@redhat.com> References: <559506C3.9070806@redhat.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1437134726 17914 80.91.229.3 (17 Jul 2015 12:05:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Jul 2015 12:05:26 +0000 (UTC) To: 20959@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 17 14:05:15 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZG4O7-0006UQ-BM for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Jul 2015 14:05:11 +0200 Original-Received: from localhost ([::1]:44453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZG4O6-0001Xa-J7 for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Jul 2015 08:05:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZG4O3-0001XU-3D for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2015 08:05:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZG4Nz-0005uA-2K for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2015 08:05:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZG4Ny-0005tB-Vk for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2015 08:05:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZG4Ny-0005kW-Cn for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2015 08:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Petr Hracek Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jul 2015 12:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20959-submit@debbugs.gnu.org id=B20959.143713464822036 (code B ref 20959); Fri, 17 Jul 2015 12:05:02 +0000 Original-Received: (at 20959) by debbugs.gnu.org; 17 Jul 2015 12:04:08 +0000 Original-Received: from localhost ([127.0.0.1]:51791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZG4N6-0005jL-5N for submit@debbugs.gnu.org; Fri, 17 Jul 2015 08:04:08 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:38372) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZG4N2-0005jB-Uj for 20959@debbugs.gnu.org; Fri, 17 Jul 2015 08:04:05 -0400 Original-Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 11B388F30C for <20959@debbugs.gnu.org>; Fri, 17 Jul 2015 12:04:02 +0000 (UTC) Original-Received: from [10.40.200.38] (ovpn-200-38.brq.redhat.com [10.40.200.38]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6HC41ts031849 for <20959@debbugs.gnu.org>; Fri, 17 Jul 2015 08:04:02 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:105005 Archived-At: On 07/02/2015 05:53 PM, Glenn Morris wrote: > Petr Hracek wrote: > >> Reproducer is: >> 1) shell-script-mode >> 2) 'sh-set-shell' 'rpm' >> >> then on the first line is #!/usr/bin/rpm which doe not make sense. >> https://bugzilla.redhat.com/show_bug.cgi?id=1030391#c6 >> >> Did you discover it? > That's what the command is documented to do. > > I assume it's being called for the effect of "switching the buffer to > the rpm dialect of sh-mode". To do that, you can call it like > > M-: (sh-set-shell "rpm" nil nil) > > (which isn't much more typing). > > Perhaps C-u M-x sh-set-shell could mean that. > > The alternative would be a hard-coded list of interpreters that aren't > really shells (I think rpm is the only one sh-mode handles?). Yeah hard-coded list of interpreters that aren't really shells would be great. -- Petr Hracek Software Engineer Developer Experience Red Hat, Inc Mob: +420777056169 email: phracek@redhat.com