Emacs text mode indent trouble

I use Emacs for writing a lot of plain text (i.e. .txt files) and I'm having a bit of trouble with the text-mode default indent style.
What I want is pretty simple: Tabs should be 2 characters long (but still tabs, not spaces) and inserted whenever I press Tab, regardless of where in the text I am.
I've had no luck in figuring out how to get this behaviour though. I've edited the edit-tab-stops variable to what I want, but the Tab key still seems to be bound to some other command, and tab-stops seems to insert spaces anyway. Any other ideas?

Brilliant, thanks so much!
I bound Tab to tab-to-tab-stop and added a text-mode-hook that defines tab-stop-list to what I want, works like a charm.

Similar Messages

  • Emacs c-mode-hook no longer works?

    I just did a pacman -Syu and c-mode-hook doesn't seem to get triggered anymore in emacs.  I tried adding a hook with just a print statement and it never printed anything.  Did the same for text-mode-hook and it printed out just fine.  I'm using c-mode-common-hook for now as a workaround (which works fine) but I'm curious what happened to c-mode-hook.  It's still documented as being there, I just can't get it to work.  Is anybody else seeing this or is my particular system just insane?
    (I'm using emacs 24.4.1 on x86_64.)

    Just to be clear, you are using Windows 7, right?
    First, restart your PC.
    Next, on the front of the printer: Setup > Network > Restore Network Defaults.
    Next, do NOT use the CD to install the HP software, download and install this: http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=mp-76043-1&cc=us&dlc=en&lc=en&...
    Make sure there is no USB cable connected to the printer when you install the software.  Choose "Wireless" as the installation type when it asks.  Follow the prompts to connect your printer to your network.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • What is difference between TEXT mode and BINARY mode?

    Hi,
              What is difference between TEXT mode and BINARY mode? In TEXT mode what is "ENCODING DEFAULT".
    OPEN DATASET wl_filename FOR INPUT
                              IN TEXT MODE ENCODING DEFAULT.
      OPEN DATASET wl_filename FOR INPUT
                              IN BINARY MODE .

    Hi vishnu,
    1. files like .TXT files are considered to be text,
       and other files like .EXE . DOC etc are binary files.
    2. In text files, after each line, there are two
       internal binary characters
      one for line feed and another one for newline.
    3. But, we don't have any meaning for it,
       when we view such files in notepad, for eg.
       Hence, to only get the understandable content,
       we should open such TXT files, in text mode.
      (we can also open them in binary mode,
      but we will get two extra characters after each line,
       and such two extra characters are meaningless
      for interpreting the text)
    4. In binary mode, each byte by byte is considered,
       without any meaning.
    regards,
    amit m.

  • OPEN DATASET FOR INPUT IN TEXT MODE - linesize issue

    Hi,
    I faced a problem when opened ANSI file with CYRILLIC in ECC 6.0 Unicode system - the system cuts the line to 250 characters. Below is snip of code:
    REPORT  Z_TEST_01 LINE-SIZE 1023.
    DATA:
      file TYPE char40 VALUE 'ansi_file.txt',
      line TYPE char1024, len TYPE i.
    OPEN DATASET file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    WHILE sy-subrc = 0.
          READ DATASET file INTO line ACTUAL LENGTH len.
            WRITE: / len, line.
    ENDWHILE.
    CLOSE DATASET file.
    In this case, variable LEN always get value 250. File-content is correctly converted from ANSI and all CYRILLIC is displayed to the screen. I changed type for LINE - initialy the type was STRING, actially.
    Further, tried to open it in BINARY - like this:
    DATA:
      file TYPE char40 VALUE 'ansi_file.txt',
      line TYPE char1024, len TYPE i.
    FIELD-SYMBOLS <hex_container> TYPE x.
    OPEN DATASET file FOR INPUT IN BINARY MODE.
    ASSIGN line TO <hex_container> CASTING.
    DO.
      READ DATASET file INTO <hex_container>.
      IF sy-subrc = 0.
        WRITE: / line.
      ELSE.
        EXIT.
      ENDIF.
    ENDDO.
    CLOSE DATASET file.
    WRITE: / line.
    In this case I got bigger linesize (obviously 1024), but faced conversion issues - the file contains some CYRILLIC and it is messed. Played for few hours with conversions - using additions: IN LEGACY BINARY MODE... BIG/LITTLE ENDIAN, CODE PAGE... without success. So decided to ask...
    Well, I searched SDN for a similar issue, but didn't found, except this one:
    Re: OPEN DATASET STRING Problem
    Could someone points me what am I doing wrong? How can I read my ANSI file with line-size more than 250 chars? Actually, in my case line size may vary up to 1800 chars. Further, afrer conversion and some validation, I should save it back to the AS.
    Many thans in advance.
    Regards,
    Ivaylo Mutafchiev

    Sorry for the noise - it is not an issue anymore.

  • OPEN DATASET FOR OUTPUT IN LEGACY TEXT MODE not working!

    Hi All,
    I need your expertise to help me with my problem.
    The program passed through the code OPEN DATASET ... FOR OUTPUT IN LEGACY TEXT MODE. Then it gave an error message "Error Accessing File /home/sap/sample.txt".
    I would like to know what are the causes of this error. Please explain to me further why the program gives an error message specified above because I'm not familiar in OPEN DATASET.
    Please reply asap since the issue need to be resolved immediately.
    Thanks in advance,
    Carina

    Hi Carmey,
    The Problem will u need toi get Open Dataset Authorisation from ur Basis Team from the Specified Path.
    Regards,
    Morris Bond.
    Reward Points if Helpful.

  • Problem While reading a file in text mode from Unix in ECC 5.0

    Hi Experts,
    I am working on Unicode Upgrade project of ECC5.0.
    Here i got a problem with reading a file format which it does successfully in 4.6 and not in ECC5.0
    My file format was as follows:
    *4 000001862004060300000010###/#######L##########G/##########G/########
    It was successfully converting corresponding field values in 4.6:
    *4
    00000186
    2004
    06
    03
    00000010
    25
    0
    4
    0
    54.75
    0
    54.75
    0.00
    While i am getting some problem in ECC5.0 during conversion of the above line:
    *4 000001862004060300000010###/#######L##########G/##########G/########
    it was consider in the same # values.
    I have used the following statement to open and read dataset.
    OPEN DATASET i_dsn IN LEGACY TEXT MODE FOR INPUT.
    READ DATASET i_dsn INTO pos_rec.
    Thanks for your help.
    Regards,
    Gopinath Addepalli.

    Hi
          You might be facing this problem because of uni code. So while opening or reading the file, there is a statement call ENCODING. Use that option and keep the code page which you want. Then the problem may be solved.
    Thanks & Regards.
    Harish.

  • Print in text mode to detect escape sequences

    Hello,
    We have got an issu, on our .NET print program using Crystal 12 SP3. The issue has concequences on :
    - Barcode print on matrix printer
    - Barcode print on thermal printer
    - Other commands send to a FAX printer driver
    Using the SDK, the print driver receives print data in graphical print mode, but it has to be text mode for the printer driver to detect the correct escape sequences. The escapes sequences are used by the driver to switch the font or receive a command.
    Is there a way to force the print in text mode ?
    The same report printed from Crystal Reports 2008 SP 3 "works", but not from the .NET sdk.
    Here is a little example. We made a simple Report, containing 2 simple Text Objects :
    Code Barres $ [ /
    +$$;111;6;1;1;0;2 z +
    $$?0h0123456789$$?0/
    We redirected the print driver spool in a file. Here are the outputs :
    Printed from Crystal Report 2008 :
    [0;4 r+<[3;031w[3;032w[7s2CH
    x[1;2xF5-
    JÃ$Code Barres $ [ /
    J-$$$;111;6;1;1;0;2 z
    J$$$?0h0123456789$$?0/@[0;4 r
    Printed from .Net application using Crystal Report 2008 SDK :
    [0;4 r+<[3;031w[3;032w[7s2CH
    x
    JÅ$*'úø u20AC u20AC u20AC u20AC u20AC<|u201Au20ACu20ACu20ACu20ACu20ACu20ACu201A||u201Au20ACu20ACu20ACu20ACu20ACA@u201Aÿu20ACu20ACu20AC|u2019u20ACu20ACu20ACu20ACu20ACu20ACu2018r u20AC u20AC?ÿu20AC @u20AC @u20AC @u20AC @u20AC @u20AC @u20AC u20AC!u20AC u20AC u20AC u20AC u20AC!"ÿu20ACu20ACu20ACu20ACu20ACu20ACÿu20ACu20ACu20ACu20ACu20ACu20ACu20ACu20ACu20ACu20ACÿu20ACu20ACu20ACu20ACu20ACu20ACu20AC|u2019u20ACu20ACu20ACu20ACu20ACu20ACu2018ru20ACÁ! u20AC u20AC u20AC u20AC u20ACŽu201A u201A u0192ààu201A BBD8ÿð@@@`u20AC`u20AC0À
    J-*'7u201A u201A u0192ààu201A BBD8u201A u201A u0192ààu201A BBD8`àu2021u20ACu2021u201Eu20ACu20AC u20AC u20AC u20ACÿu20ACu20ACu20ACu20ACu20ACu20AC u20AC u20AC u20ACÿu20ACu20ACu20ACu20ACu20ACu20AC u20AC u20AC u20ACÿu20ACu20ACu20ACu20ACu20AC`àu2021u20ACu2021u201Eu20ACø>A u20ACu20AC!u20ACAu20ACAu20ACA@Ã@<`àu2021u20ACu2021u201Eu20ACu20AC u20AC u20AC u20ACÿu20ACu20ACu20ACu20ACu20AC`àu2021u20ACu2021u201Eu20ACu20AC u20AC u20AC u20ACÿu20ACu20ACu20ACu20ACu20AC`àu2021u20ACu2021u201Eu20ACü @u20AC@u20AC@u20AC ø`àu2021u20ACu2021u201Eu20ACu20ACu20AC u20AC@u20AC@u20AC@ u20AC@@u20AC@u20ACu20AC!u20ACu20ACu20ACu20ACu20ACu20ACu20AC u20AC@u20ACu20ACu20ACu20ACu20AC
    J*'Tu201A u201A u0192ààu201A BBD8u201A u201A u0192ààu201A BBD8  u20AC 1u20AC Au20AC Au20ACu20ACü @u20AC@u20AC@u20AC ø@u20AC@u20ACÿu20ACu20ACu20ACu20ACu20ACu20ACÿu20ACu20ACu20ACü @u20AC@u20AC@u20AC øu20AC u20AC u20AC u20ACÿu20ACu20ACu20ACu20ACu20ACu20ACu20AC u20AC@u20AC@u20AC@ u20AC@@u20AC@u20ACu20AC!u20ACu20AC u20AC@u20AC@u20ACu20AC@u20ACu20AC@u20ACu20AC!A#xu02C6<u20AC@u20AC@u20ACÿu20ACu20ACu20AC@Au20ACAu20ACAu20ACAu20ACAu0192|ø>A u20ACu20AC!u20ACAu20ACAu20ACA@Ã@<p@@@@@u20AC@8AÀNp>!A@u20ACu20AC@u20ACu20AC@u20ACu20AC@u20ACu20AC@u20ACu20AC!A>u20ACu20AC @u20AC@ u20AC@ u20AC@ u20AC@! Bu0152ðu201A u201A u0192ààu201A BBD8u201A u201A u0192ààu201A BBD8  u20AC 1u20AC Au20AC Au20ACu20ACü @u20AC@u20AC@u20AC ø`u20AC`u20AC0À@[0;4 r
    As you can see above, the characters contained in the report are sent "as this" in the print driver from Crystal Reports 2008. But the pixels represention of the characters are sent from the .Net SDK.

    Hello,
    thank you for your answer.
    I forgot to add the 2008 com+ API output, that is exactly the same as Crystal Report 2008.
    - From Crystal Reports 2008 : WORKS
    - From a program using the 2008 com+ Runtime API : WORKS
    - From a program using the 2008 .Net Runtime API : DON'T WORK
    You wrote that all the runtime print engine sends to the printer is essentially a picture. But It do send text using the com+ API.
    Should I understand : The .Net runtime print engine can't send text ?

  • Open data set from Text mode to Binary mode

    Hello All,
    In a program i am using the command
        OPEN DATASET file FOR OUTPUT IN TEXT MODE
        ENCODING NON-UNICODE IGNORING CONVERSION ERRORS.
    Now i want to change this open data set to binary mode. I mean to change the command like below.
    OPEN DATASET file FOR OUTPUT IN BINARY MODE.
    when i do this. the output in the file is totally changing. I mean previously i have some text now i have some diffrent characters.
    How can i use this command with out change in the output as previous output. Please tell me  the changes and why i have to do.
    OPEN DATASET file FOR OUTPUT IN BINARY MODE.
    Regards,
    Lisa.
    Message was edited by:
            Lisa Roy

    Text Mode means that the records in the file have a carriage return marking the end of each record.
    Binary Mode means the file is a string of data.
    You can't read a text file in BINARY MODE, or a binary file in TEXT MODE.
    If you are changing the mode, then you must be supplied with a file in the new mode.

  • Problem writing file ANSI to UTF-8. OPEN DATASET FOR OUTPUT IN TEXT MODE

    Hello everybody,
    My report needs  to create a file in ANSI so I am using this sentence: * "OPEN DATASET p_dir_a FOR OUTPUT IN TEXT MODE ENCODING DEFAULT."*  almost all charters in the file are well generating excepting for this two: ( Á ) & ( Í ) because SAP assigns the same code to both characters ( Ã? ) = 'xC3'  which is not correct, the right code should be ( Á ) = 'xC1'  ( Í ) = 'xCD' respectively
    from this string = ( ÁÉÍÓÚáéíóúàèìòùÀÈÌÒÙ ) only those two characters are wrong converted.
    Also I tray to catch a conversion error with this sentence:
              TRY.
                TRANSFER <field> TO p_dir_a NO END OF LINE.
              CATCH cx_sy_conversion_codepage.
                MESSAGE 'error' type 'I'.
            ENDTRY.
    but never enters in it.
    Does anyone know where I can configure SAP to SET this value correctly?
    Thanks for your help.

    was a server problem, not SAP

  • How to remove 'Change to Text Mode' link on 'richTextEditor' item

    Hi,
    Now I'm using 'richTextEditor' item on my page. But above it, there is a link named 'Change to Text Mode'. How can I remove it? From profile, if I change the profile, it will be Text Mode only. But I want to use rich text mode, not use text mode. So I want to remove the link 'Change to Text Mode'. But it seems it is with the text box together.
    Please help.
    Regards,
    Eileen

    // Get your bean
    OAMessageRichTextEditorBean bean = (OAMessageRichTextEditorBean)webBean.findChildRecursive("YourMessageRichTextEditorBean");
    // Set to be plain text mode
    bean.setRenderingMode(OAMessageRichTextEditorBean.TEXT_MODE);
    // Remove the "Switch to Rich Text" hyperlink
    bean.setAttributeValue(OAMessageRichTextEditorBean.SWITCH_MODE_HYPERLINK_ATTR, BooleanUtils.getBoolean(false));
    Edited by: asnow_au on Jan 9, 2009 3:37 PM

  • Sender FTP Adapter, text mode should convert source file?

    Hi !
    We have a Unix file system where systems and people drop files to be captured by XI. XI runs also on another Unix system.
    We configured the Sender FTP comm channel from XI to use the TEXT mode, to have converted the captured file to Unix TEXT (eol = 0x0A), no matter the format of the file used to transfer the source file to the XI polling folder.
    But we noticed that TEXT or BINARY modes in sender FTP adapter works all the same, like binary.
    What are we doing wrong?
    Thanks,
    Matias

    No. to see the difference put a gif and give txt in file adapter you will get an error for the same file u use binary it works.
    their is difference b/w these . if you use special characters like european then you need to use UTF-8 or UTF-16 or bigInidan  if it is binary then you output will junk charaters for these sysmobls
    Message was edited by:
            Sreeram Reddy

  • Full Screen Text-Mode on a PC

    I bought a 23" and a 20" Apple Cinema Display. They are outstanding quality; but I don't seem to have a text mode, i.e., when the computer boots, I don't see anything until the gui appears on Windows XP and my FreeBSD boxes.
    Is this normal?

    Hi Bill,
    In my (admittedly limited) experience of PC, my guess would be that this may be due to the fact that these monitors need the graphics drivers to fire up within the OS in order to start functioning.
    When the PC is booting up through the DOS/Bios stage, these drivers have not as yet come on line, so no display will occur. I guess this would be a pain because it makes it difficult for you to F8 to go to the setup, diagnostic and "Safe" modes.
    Not sure how one would go about fixing this, though (sorry!)
    Cheers!
    Karl

  • Open dataset filename for output in text mode encoding default

    Hi,
    When I excute this command I get a sy-subrc = 0, but no file is created. This happens in an ECC 6.0 system. In 4.6C works ok.
    filename has the following structure '
    server\directory\filename'
    What am I doing wrong??
    Thank you very much for your your help.
    Regards.

    Hi,
    Can u tell what syntax u have written for open statement.
    In programs with active Unicode check, you must specify the access type (such as ... FOR INPUT, ... FOR OUTPUT, and so on) and the mode (such as ... IN TEXT MODE, ... IN BINARY MODE, and so on). If the file is opened using ... IN TEXT MODE, you must still use the addition ... ENCODING. If the Unicode check is enabled, it is possible to use file names containing blanks.
    Regards,
    Sruthi

  • BBC News website appears in "text mode"

    The BBC News website has just started appearing in a "text mode". Previously the items were separated and the font was "filled in". Now the articles are all run together and the font appears as an outline.

    The problem seems to have cleared.
    I used System Restore to go back to a point before I had installed a plug in to enable FF to look at a TV web site. No improvement. (See attachment).
    because I had gone back a few days a couple of Win 7 updates had been rremoved. On closing down the pC they were re-installed. Restarting showed no improvement.
    I then started to use IE to browse the web and looked at a couple of sites. Then I went back to FF and the BBC site is running perfectly.

  • OPEN DATASET file FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE

    Hi There,
    I also have the similar issue. I am able to write the data into appliaction server in Chinese Characters using :OPEN DATASET datei FOR OUTPUT IN TEXT MODE ENCODING DEFAULT or OPEN DATASET datei FOR OUTPUT IN TEXT MODE ENCODING UTF-8. But when i save that file into my presentation server manually, all the chinese characters are showing as Junk.
    When i use OPEN DATASET datei FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE, giving runtime error and when i use OPEN DATASET datei FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE IGNORING CONVERSION ERRORS, No error but application server output itself showing as Junk characters.
    Could you please suggest me what you have done?
    Regards,
    Chaitanya A

    Hi,
       Use this
      OPEN DATASET File_path  FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE
      WITH SMART LINEFEED
    it will definitely work.
    Regards,
    Manesh. R

Maybe you are looking for