How to start emacs in “nothing” mode (`fundamental-mode`)How do I paste code without auto indentationemacs major mode for INF filesMajor mode map in emacsHow to detect mode, then execute?How can I make emacs ignore part of the file name when deciding major mode?Scratch always starts in fundamental modeSet “Edit with Emacs” major mode to markdown-modeAuto enable minor modes in fundamental-modeGit commit uses fundamental mode after magit updateHow to read wikipedia in EmacsSyntax table to match arbitrary forms with regexp

Is "remove commented out code" correct English?

Assassin's bullet with mercury

Plagiarism or not?

Which is the best way to check return result?

How to tell a function to use the default argument values?

Why doesn't using multiple commands with a || or && conditional work?

Is it possible to create a QR code using text?

Extract rows of a table, that include less than x NULLs

Do scales need to be in alphabetical order?

How to show a landlord what we have in savings?

Ambiguity in the definition of entropy

Is it acceptable for a professor to tell male students to not think that they are smarter than female students?

How did the Super Star Destroyer Executor get destroyed exactly?

Determining Impedance With An Antenna Analyzer

Why didn't Miles's spider sense work before?

How dangerous is XSS?

Am I breaking OOP practice with this architecture?

Is there an expression that means doing something right before you will need it rather than doing it in case you might need it?

Should I cover my bicycle overnight while bikepacking?

How to prevent "they're falling in love" trope

Venezuelan girlfriend wants to travel the USA to be with me. What is the process?

Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?

Alternative to sending password over mail?

Why didn't Boeing produce its own regional jet?



How to start emacs in “nothing” mode (`fundamental-mode`)


How do I paste code without auto indentationemacs major mode for INF filesMajor mode map in emacsHow to detect mode, then execute?How can I make emacs ignore part of the file name when deciding major mode?Scratch always starts in fundamental modeSet “Edit with Emacs” major mode to markdown-modeAuto enable minor modes in fundamental-modeGit commit uses fundamental mode after magit updateHow to read wikipedia in EmacsSyntax table to match arbitrary forms with regexp













9















If I type emacs test.sh Emacs insists on putting me in Shell-script mode. Another time I want to edit the file help.txt and then Emacs puts me in Text mode. But sometimes I don't want any of this, especially when I am doing a large paste into Emacs from some other source.



How do I start Emacs in "nothing" mode? No special indenting, spacing, etc., and Emacs simply takes the characters in as they are entered.



UPDATE: Here is an example. Copy the following text to your clipboard, open emacs (even in fundamental mode) and paste.



<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ID="FARM20190311T2248"
Name="https://www.example.com/"
entityID="https://www.example.com/" validUntil="2020-03-11T22:48:12Z"><ds:Signature>
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>


Emacs insists on changing the spacing (even in fundamental mode and using -q) to this:



<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ID="FARM20190311T2248"
Name="https://www.example.com/"
entityID="https://www.example.com/" validUntil="2020-03-11T22:48:12Z"><ds:Signature>
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>


Try the same experiment with vi or nano. Those programs (at least on my computer) do not change the spacing.



I am using GNU Emacs 24.5.1 on Debian stretch.










share|improve this question
























  • "Emacs [24.5.1] insists on changing the spacing (even in fundamental mode and using -q)" -- I cannot reproduce that in Emacs 25.3 or 26.1. Test again with emacs -Q to ensure Debian hasn't installed some site-lisp which is causing this? If that doesn't change things, try a newer version of Emacs?

    – phils
    Mar 30 at 23:53







  • 1





    It sounds like your real question is asked and answered here: emacs.stackexchange.com/questions/28008/…

    – npostavs
    Mar 31 at 2:57















9















If I type emacs test.sh Emacs insists on putting me in Shell-script mode. Another time I want to edit the file help.txt and then Emacs puts me in Text mode. But sometimes I don't want any of this, especially when I am doing a large paste into Emacs from some other source.



How do I start Emacs in "nothing" mode? No special indenting, spacing, etc., and Emacs simply takes the characters in as they are entered.



UPDATE: Here is an example. Copy the following text to your clipboard, open emacs (even in fundamental mode) and paste.



<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ID="FARM20190311T2248"
Name="https://www.example.com/"
entityID="https://www.example.com/" validUntil="2020-03-11T22:48:12Z"><ds:Signature>
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>


Emacs insists on changing the spacing (even in fundamental mode and using -q) to this:



<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ID="FARM20190311T2248"
Name="https://www.example.com/"
entityID="https://www.example.com/" validUntil="2020-03-11T22:48:12Z"><ds:Signature>
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>


Try the same experiment with vi or nano. Those programs (at least on my computer) do not change the spacing.



I am using GNU Emacs 24.5.1 on Debian stretch.










share|improve this question
























  • "Emacs [24.5.1] insists on changing the spacing (even in fundamental mode and using -q)" -- I cannot reproduce that in Emacs 25.3 or 26.1. Test again with emacs -Q to ensure Debian hasn't installed some site-lisp which is causing this? If that doesn't change things, try a newer version of Emacs?

    – phils
    Mar 30 at 23:53







  • 1





    It sounds like your real question is asked and answered here: emacs.stackexchange.com/questions/28008/…

    – npostavs
    Mar 31 at 2:57













9












9








9


3






If I type emacs test.sh Emacs insists on putting me in Shell-script mode. Another time I want to edit the file help.txt and then Emacs puts me in Text mode. But sometimes I don't want any of this, especially when I am doing a large paste into Emacs from some other source.



How do I start Emacs in "nothing" mode? No special indenting, spacing, etc., and Emacs simply takes the characters in as they are entered.



UPDATE: Here is an example. Copy the following text to your clipboard, open emacs (even in fundamental mode) and paste.



<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ID="FARM20190311T2248"
Name="https://www.example.com/"
entityID="https://www.example.com/" validUntil="2020-03-11T22:48:12Z"><ds:Signature>
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>


Emacs insists on changing the spacing (even in fundamental mode and using -q) to this:



<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ID="FARM20190311T2248"
Name="https://www.example.com/"
entityID="https://www.example.com/" validUntil="2020-03-11T22:48:12Z"><ds:Signature>
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>


Try the same experiment with vi or nano. Those programs (at least on my computer) do not change the spacing.



I am using GNU Emacs 24.5.1 on Debian stretch.










share|improve this question
















If I type emacs test.sh Emacs insists on putting me in Shell-script mode. Another time I want to edit the file help.txt and then Emacs puts me in Text mode. But sometimes I don't want any of this, especially when I am doing a large paste into Emacs from some other source.



How do I start Emacs in "nothing" mode? No special indenting, spacing, etc., and Emacs simply takes the characters in as they are entered.



UPDATE: Here is an example. Copy the following text to your clipboard, open emacs (even in fundamental mode) and paste.



<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ID="FARM20190311T2248"
Name="https://www.example.com/"
entityID="https://www.example.com/" validUntil="2020-03-11T22:48:12Z"><ds:Signature>
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>


Emacs insists on changing the spacing (even in fundamental mode and using -q) to this:



<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ID="FARM20190311T2248"
Name="https://www.example.com/"
entityID="https://www.example.com/" validUntil="2020-03-11T22:48:12Z"><ds:Signature>
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>


Try the same experiment with vi or nano. Those programs (at least on my computer) do not change the spacing.



I am using GNU Emacs 24.5.1 on Debian stretch.







major-mode






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 30 at 21:36







rlandster

















asked Mar 28 at 15:36









rlandsterrlandster

1486




1486












  • "Emacs [24.5.1] insists on changing the spacing (even in fundamental mode and using -q)" -- I cannot reproduce that in Emacs 25.3 or 26.1. Test again with emacs -Q to ensure Debian hasn't installed some site-lisp which is causing this? If that doesn't change things, try a newer version of Emacs?

    – phils
    Mar 30 at 23:53







  • 1





    It sounds like your real question is asked and answered here: emacs.stackexchange.com/questions/28008/…

    – npostavs
    Mar 31 at 2:57

















  • "Emacs [24.5.1] insists on changing the spacing (even in fundamental mode and using -q)" -- I cannot reproduce that in Emacs 25.3 or 26.1. Test again with emacs -Q to ensure Debian hasn't installed some site-lisp which is causing this? If that doesn't change things, try a newer version of Emacs?

    – phils
    Mar 30 at 23:53







  • 1





    It sounds like your real question is asked and answered here: emacs.stackexchange.com/questions/28008/…

    – npostavs
    Mar 31 at 2:57
















"Emacs [24.5.1] insists on changing the spacing (even in fundamental mode and using -q)" -- I cannot reproduce that in Emacs 25.3 or 26.1. Test again with emacs -Q to ensure Debian hasn't installed some site-lisp which is causing this? If that doesn't change things, try a newer version of Emacs?

– phils
Mar 30 at 23:53






"Emacs [24.5.1] insists on changing the spacing (even in fundamental mode and using -q)" -- I cannot reproduce that in Emacs 25.3 or 26.1. Test again with emacs -Q to ensure Debian hasn't installed some site-lisp which is causing this? If that doesn't change things, try a newer version of Emacs?

– phils
Mar 30 at 23:53





1




1





It sounds like your real question is asked and answered here: emacs.stackexchange.com/questions/28008/…

– npostavs
Mar 31 at 2:57





It sounds like your real question is asked and answered here: emacs.stackexchange.com/questions/28008/…

– npostavs
Mar 31 at 2:57










3 Answers
3






active

oldest

votes


















15














When you use M-x find-file-literally Emacs will not invoke a mode that is based on the file name. Instead, it uses fundamental-mode as the major mode.



From the command line you can use something like this:



emacs --eval '(find-file-literally "yourfile.ext")'





share|improve this answer

























  • This does not solve my problem. I have clarified the issue with an example.

    – rlandster
    Mar 30 at 21:37


















11














Emacs modes are established for each file you open, so opening Emacs in "nothing mode" doesn't necessarily accomplish what you're after. Each file you open after starting Emacs will get its own mode applied.



You can use the command @clemera provides to open a file in fundamental mode from the command line. You can do the same from an already-running Emacs via M-x find-file-literally. You can "turn-off" the major mode for a file you've already opened by selecting fundamental mode (which is basically "nothing mode"): M-x fundamental-mode






share|improve this answer






























    6














    I'm running:

    GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-08-26, modified by Debian



    $ emacs yourfile.txt --eval '(fundamental-mode)'


    You have to put the --eval after the file name or it appears to set the mode based on the file name.






    share|improve this answer























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "583"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2femacs.stackexchange.com%2fquestions%2f48629%2fhow-to-start-emacs-in-nothing-mode-fundamental-mode%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      15














      When you use M-x find-file-literally Emacs will not invoke a mode that is based on the file name. Instead, it uses fundamental-mode as the major mode.



      From the command line you can use something like this:



      emacs --eval '(find-file-literally "yourfile.ext")'





      share|improve this answer

























      • This does not solve my problem. I have clarified the issue with an example.

        – rlandster
        Mar 30 at 21:37















      15














      When you use M-x find-file-literally Emacs will not invoke a mode that is based on the file name. Instead, it uses fundamental-mode as the major mode.



      From the command line you can use something like this:



      emacs --eval '(find-file-literally "yourfile.ext")'





      share|improve this answer

























      • This does not solve my problem. I have clarified the issue with an example.

        – rlandster
        Mar 30 at 21:37













      15












      15








      15







      When you use M-x find-file-literally Emacs will not invoke a mode that is based on the file name. Instead, it uses fundamental-mode as the major mode.



      From the command line you can use something like this:



      emacs --eval '(find-file-literally "yourfile.ext")'





      share|improve this answer















      When you use M-x find-file-literally Emacs will not invoke a mode that is based on the file name. Instead, it uses fundamental-mode as the major mode.



      From the command line you can use something like this:



      emacs --eval '(find-file-literally "yourfile.ext")'






      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Mar 28 at 22:03









      Drew

      49k463107




      49k463107










      answered Mar 28 at 15:44









      clemeraclemera

      1,875623




      1,875623












      • This does not solve my problem. I have clarified the issue with an example.

        – rlandster
        Mar 30 at 21:37

















      • This does not solve my problem. I have clarified the issue with an example.

        – rlandster
        Mar 30 at 21:37
















      This does not solve my problem. I have clarified the issue with an example.

      – rlandster
      Mar 30 at 21:37





      This does not solve my problem. I have clarified the issue with an example.

      – rlandster
      Mar 30 at 21:37











      11














      Emacs modes are established for each file you open, so opening Emacs in "nothing mode" doesn't necessarily accomplish what you're after. Each file you open after starting Emacs will get its own mode applied.



      You can use the command @clemera provides to open a file in fundamental mode from the command line. You can do the same from an already-running Emacs via M-x find-file-literally. You can "turn-off" the major mode for a file you've already opened by selecting fundamental mode (which is basically "nothing mode"): M-x fundamental-mode






      share|improve this answer



























        11














        Emacs modes are established for each file you open, so opening Emacs in "nothing mode" doesn't necessarily accomplish what you're after. Each file you open after starting Emacs will get its own mode applied.



        You can use the command @clemera provides to open a file in fundamental mode from the command line. You can do the same from an already-running Emacs via M-x find-file-literally. You can "turn-off" the major mode for a file you've already opened by selecting fundamental mode (which is basically "nothing mode"): M-x fundamental-mode






        share|improve this answer

























          11












          11








          11







          Emacs modes are established for each file you open, so opening Emacs in "nothing mode" doesn't necessarily accomplish what you're after. Each file you open after starting Emacs will get its own mode applied.



          You can use the command @clemera provides to open a file in fundamental mode from the command line. You can do the same from an already-running Emacs via M-x find-file-literally. You can "turn-off" the major mode for a file you've already opened by selecting fundamental mode (which is basically "nothing mode"): M-x fundamental-mode






          share|improve this answer













          Emacs modes are established for each file you open, so opening Emacs in "nothing mode" doesn't necessarily accomplish what you're after. Each file you open after starting Emacs will get its own mode applied.



          You can use the command @clemera provides to open a file in fundamental mode from the command line. You can do the same from an already-running Emacs via M-x find-file-literally. You can "turn-off" the major mode for a file you've already opened by selecting fundamental mode (which is basically "nothing mode"): M-x fundamental-mode







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 28 at 19:06









          TylerTyler

          12.3k12355




          12.3k12355





















              6














              I'm running:

              GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-08-26, modified by Debian



              $ emacs yourfile.txt --eval '(fundamental-mode)'


              You have to put the --eval after the file name or it appears to set the mode based on the file name.






              share|improve this answer



























                6














                I'm running:

                GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-08-26, modified by Debian



                $ emacs yourfile.txt --eval '(fundamental-mode)'


                You have to put the --eval after the file name or it appears to set the mode based on the file name.






                share|improve this answer

























                  6












                  6








                  6







                  I'm running:

                  GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-08-26, modified by Debian



                  $ emacs yourfile.txt --eval '(fundamental-mode)'


                  You have to put the --eval after the file name or it appears to set the mode based on the file name.






                  share|improve this answer













                  I'm running:

                  GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-08-26, modified by Debian



                  $ emacs yourfile.txt --eval '(fundamental-mode)'


                  You have to put the --eval after the file name or it appears to set the mode based on the file name.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 28 at 21:58









                  AAAfarmclubAAAfarmclub

                  1613




                  1613



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Emacs Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2femacs.stackexchange.com%2fquestions%2f48629%2fhow-to-start-emacs-in-nothing-mode-fundamental-mode%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Triangular numbers and gcdProving sum of a set is $0 pmod n$ if $n$ is odd, or $fracn2 pmod n$ if $n$ is even?Is greatest common divisor of two numbers really their smallest linear combination?GCD, LCM RelationshipProve a set of nonnegative integers with greatest common divisor 1 and closed under addition has all but finite many nonnegative integers.all pairs of a and b in an equation containing gcdTriangular Numbers Modulo $k$ - Hit All Values?Understanding the Existence and Uniqueness of the GCDGCD and LCM with logical symbolsThe greatest common divisor of two positive integers less than 100 is equal to 3. Their least common multiple is twelve times one of the integers.Suppose that for all integers $x$, $x|a$ and $x|b$ if and only if $x|c$. Then $c = gcd(a,b)$Which is the gcd of 2 numbers which are multiplied and the result is 600000?

                      Ingelân Ynhâld Etymology | Geografy | Skiednis | Polityk en bestjoer | Ekonomy | Demografy | Kultuer | Klimaat | Sjoch ek | Keppelings om utens | Boarnen, noaten en referinsjes Navigaasjemenuwww.gov.ukOffisjele webside fan it regear fan it Feriene KeninkrykOffisjele webside fan it Britske FerkearsburoNederlânsktalige ynformaasje fan it Britske FerkearsburoOffisjele webside fan English Heritage, de organisaasje dy't him ynset foar it behâld fan it Ingelske kultuergoedYnwennertallen fan alle Britske stêden út 'e folkstelling fan 2011Notes en References, op dizze sideEngland

                      Հադիս Բովանդակություն Անվանում և նշանակություն | Դասակարգում | Աղբյուրներ | Նավարկման ցանկ