unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Petr Hracek <phracek@redhat.com>
To: 20959@debbugs.gnu.org
Subject: bug#20959: Switching script mode to rpm puts nonsense on the first line
Date: Fri, 17 Jul 2015 14:04:01 +0200	[thread overview]
Message-ID: <55A8EF31.7020401@redhat.com> (raw)
In-Reply-To: <efoajusgig.fsf@fencepost.gnu.org>

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






  reply	other threads:[~2015-07-17 12:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02  9:39 bug#20959: Switching script mode to rpm puts nonsense on the first line Petr Hracek
2015-07-02 15:53 ` Glenn Morris
2015-07-17 12:04   ` Petr Hracek [this message]
2021-07-08 14:23   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55A8EF31.7020401@redhat.com \
    --to=phracek@redhat.com \
    --cc=20959@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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