How to bind 'C-u M-x shell' to 'C-c s'? [duplicate]How to apply `call-interactively` to an interactive command that accepts the universal argument?god-mode: swap keys“S” key throws error in Evil mode normal stateIs there a more convenient key binding for RETURN?How to treat keybinding as input to search?Paredit slurp hotkey doesnt workChange key for f90-start-abbrevSetting key problem: save and close just like vimAvoiding overwriting global key bindingsHow to rebind org key sequence e.g., (C-a a m)?How do I add custom hierarchical keybindings?

How can I make my BBEG immortal short of making them a Lich or Vampire?

Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)

Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)

Which models of the Boeing 737 are still in production?

Do VLANs within a subnet need to have their own subnet for router on a stick?

How to say job offer in Mandarin/Cantonese?

How does strength of boric acid solution increase in presence of salicylic acid?

Have astronauts in space suits ever taken selfies? If so, how?

How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?

Show that if two triangles built on parallel lines, with equal bases have the same perimeter only if they are congruent.

How to test if a transaction is standard without spending real money?

Is it important to consider tone, melody, and musical form while writing a song?

The magic money tree problem

Can divisibility rules for digits be generalized to sum of digits

Example of a continuous function that don't have a continuous extension

Smoothness of finite-dimensional functional calculus

Arthur Somervell: 1000 Exercises - Meaning of this notation

"You are your self first supporter", a more proper way to say it

Service Entrance Breakers Rain Shield

Email Account under attack (really) - anything I can do?

Is it possible to do 50 km distance without any previous training?

What does it mean to describe someone as a butt steak?

How to format long polynomial?

Modeling an IPv4 Address



How to bind 'C-u M-x shell' to 'C-c s'? [duplicate]


How to apply `call-interactively` to an interactive command that accepts the universal argument?god-mode: swap keys“S” key throws error in Evil mode normal stateIs there a more convenient key binding for RETURN?How to treat keybinding as input to search?Paredit slurp hotkey doesnt workChange key for f90-start-abbrevSetting key problem: save and close just like vimAvoiding overwriting global key bindingsHow to rebind org key sequence e.g., (C-a a m)?How do I add custom hierarchical keybindings?













4
















This question already has an answer here:



  • How to apply `call-interactively` to an interactive command that accepts the universal argument?

    1 answer



I would like to define the keybinding C-c s which should start a new shell in the current directory (so C-c s should behave like C-u M-x shell). I know how to define a keybinding based on a function (e.g. (global-set-key (kbd "C-c s") 'shell)), but this problem here is more of the sort "defining a keybinding by another keybinding" (if I try C-h k and then type C-u M-x shell, I get the help for C-u alone (right after typing it)).










share|improve this question















marked as duplicate by Drew, DoMiNeLa10 2 days ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • Even if it is a duplicate, I would have not found it. If I had known universal-prefix-argument, I would have perhaps found it. I think there is value in having a version with C-u... in the title (which is supported by the number of upvotes in the small amount of time). But thanks for creating the link to the other question.

    – Marius Hofert
    yesterday
















4
















This question already has an answer here:



  • How to apply `call-interactively` to an interactive command that accepts the universal argument?

    1 answer



I would like to define the keybinding C-c s which should start a new shell in the current directory (so C-c s should behave like C-u M-x shell). I know how to define a keybinding based on a function (e.g. (global-set-key (kbd "C-c s") 'shell)), but this problem here is more of the sort "defining a keybinding by another keybinding" (if I try C-h k and then type C-u M-x shell, I get the help for C-u alone (right after typing it)).










share|improve this question















marked as duplicate by Drew, DoMiNeLa10 2 days ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • Even if it is a duplicate, I would have not found it. If I had known universal-prefix-argument, I would have perhaps found it. I think there is value in having a version with C-u... in the title (which is supported by the number of upvotes in the small amount of time). But thanks for creating the link to the other question.

    – Marius Hofert
    yesterday














4












4








4









This question already has an answer here:



  • How to apply `call-interactively` to an interactive command that accepts the universal argument?

    1 answer



I would like to define the keybinding C-c s which should start a new shell in the current directory (so C-c s should behave like C-u M-x shell). I know how to define a keybinding based on a function (e.g. (global-set-key (kbd "C-c s") 'shell)), but this problem here is more of the sort "defining a keybinding by another keybinding" (if I try C-h k and then type C-u M-x shell, I get the help for C-u alone (right after typing it)).










share|improve this question

















This question already has an answer here:



  • How to apply `call-interactively` to an interactive command that accepts the universal argument?

    1 answer



I would like to define the keybinding C-c s which should start a new shell in the current directory (so C-c s should behave like C-u M-x shell). I know how to define a keybinding based on a function (e.g. (global-set-key (kbd "C-c s") 'shell)), but this problem here is more of the sort "defining a keybinding by another keybinding" (if I try C-h k and then type C-u M-x shell, I get the help for C-u alone (right after typing it)).





This question already has an answer here:



  • How to apply `call-interactively` to an interactive command that accepts the universal argument?

    1 answer







key-bindings prefix-argument






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago









Drew

49k463108




49k463108










asked Apr 4 at 4:08









Marius HofertMarius Hofert

1545




1545




marked as duplicate by Drew, DoMiNeLa10 2 days ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by Drew, DoMiNeLa10 2 days ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • Even if it is a duplicate, I would have not found it. If I had known universal-prefix-argument, I would have perhaps found it. I think there is value in having a version with C-u... in the title (which is supported by the number of upvotes in the small amount of time). But thanks for creating the link to the other question.

    – Marius Hofert
    yesterday


















  • Even if it is a duplicate, I would have not found it. If I had known universal-prefix-argument, I would have perhaps found it. I think there is value in having a version with C-u... in the title (which is supported by the number of upvotes in the small amount of time). But thanks for creating the link to the other question.

    – Marius Hofert
    yesterday

















Even if it is a duplicate, I would have not found it. If I had known universal-prefix-argument, I would have perhaps found it. I think there is value in having a version with C-u... in the title (which is supported by the number of upvotes in the small amount of time). But thanks for creating the link to the other question.

– Marius Hofert
yesterday






Even if it is a duplicate, I would have not found it. If I had known universal-prefix-argument, I would have perhaps found it. I think there is value in having a version with C-u... in the title (which is supported by the number of upvotes in the small amount of time). But thanks for creating the link to the other question.

– Marius Hofert
yesterday











1 Answer
1






active

oldest

votes


















5














You need to set universal-prefix-argument and call shell interactively:



(global-set-key
(kbd "C-c s")
(lambda ()
(interactive)
(let ((current-prefix-arg '(4)))
(call-interactively #'shell))))





share|improve this answer





























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    5














    You need to set universal-prefix-argument and call shell interactively:



    (global-set-key
    (kbd "C-c s")
    (lambda ()
    (interactive)
    (let ((current-prefix-arg '(4)))
    (call-interactively #'shell))))





    share|improve this answer



























      5














      You need to set universal-prefix-argument and call shell interactively:



      (global-set-key
      (kbd "C-c s")
      (lambda ()
      (interactive)
      (let ((current-prefix-arg '(4)))
      (call-interactively #'shell))))





      share|improve this answer

























        5












        5








        5







        You need to set universal-prefix-argument and call shell interactively:



        (global-set-key
        (kbd "C-c s")
        (lambda ()
        (interactive)
        (let ((current-prefix-arg '(4)))
        (call-interactively #'shell))))





        share|improve this answer













        You need to set universal-prefix-argument and call shell interactively:



        (global-set-key
        (kbd "C-c s")
        (lambda ()
        (interactive)
        (let ((current-prefix-arg '(4)))
        (call-interactively #'shell))))






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 4 at 5:54









        muffinmadmuffinmad

        33112




        33112













            Popular posts from this blog

            getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

            Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

            Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.