unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20959: Switching script mode to rpm puts nonsense on the first line
@ 2015-07-02  9:39 Petr Hracek
  2015-07-02 15:53 ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Hracek @ 2015-07-02  9:39 UTC (permalink / raw)
  To: 20959

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?

Whole RedHat bugzilla is here 
https://bugzilla.redhat.com/show_bug.cgi?id=1030391

-- 
Petr Hracek
Software Engineer
Developer Experience
Red Hat, Inc
Mob: +420777056169
email: phracek@redhat.com






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

* bug#20959: Switching script mode to rpm puts nonsense on the first line
  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
  2021-07-08 14:23   ` Lars Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Glenn Morris @ 2015-07-02 15:53 UTC (permalink / raw)
  To: Petr Hracek; +Cc: 20959

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





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

* bug#20959: Switching script mode to rpm puts nonsense on the first line
  2015-07-02 15:53 ` Glenn Morris
@ 2015-07-17 12:04   ` Petr Hracek
  2021-07-08 14:23   ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Petr Hracek @ 2015-07-17 12:04 UTC (permalink / raw)
  To: 20959

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






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

* bug#20959: Switching script mode to rpm puts nonsense on the first line
  2015-07-02 15:53 ` Glenn Morris
  2015-07-17 12:04   ` Petr Hracek
@ 2021-07-08 14:23   ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-08 14:23 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Petr Hracek, 20959

Glenn Morris <rgm@gnu.org> writes:

> Perhaps C-u M-x sh-set-shell could mean that.

I've now done this in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2021-07-08 14:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-07-08 14:23   ` Lars Ingebrigtsen

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