LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-15-2016, 10:32 PM   #1
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,953

Rep: Reputation: 270Reputation: 270Reputation: 270
How do I get emacs to indent for tab AND respect tab to demarcate paragraphs


In emacs 24.3 and earlier, I could choose to indent for tabs at the beginning of a line and use paragraph-indent-minor mode to make fill respect a tab as the beginning of a paragraph (instead of whitespace to be eliminated).

Beginning in 24.4 I couldn't. When package 24.3 no longer ran with updated libraries I built my own version of 24.3. Now I can no longer build it, so I'm trying to figure out how to make current emacs do what I want.

I can make emacs always-indent on startup with tab-always-indent in .emacs, but it doesn't start in parindent mode, I have to turn it on, which is a bore, *and* turns off tabs making indents.

How can I make emacs start in parindent mode and indent for tab?
 
Old 10-16-2016, 06:28 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Can't you turn on paragraph-indent--mode in a text-mode-hook?
 
Old 10-17-2016, 09:13 AM   #3
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,953

Original Poster
Rep: Reputation: 270Reputation: 270Reputation: 270
Quote:
Originally Posted by smallpond View Post
Can't you turn on paragraph-indent--mode in a text-mode-hook?
I can't find 'text-mode-hook' in 'info emacs' or when I search help when in emacs.

In fundamental mode tab indents ('cause I have 'tab-always-indent' on) but when I switch to (or start up in) a paragraph-indent mode it doesn't. Before version 24.4 it did.

I hoped to find it in one of the 'el's (e.g., text-mode.el or indent.el) but substituting 24.3's 'el's made no difference.
 
Old 10-17-2016, 11:39 AM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
If I have read the Emacs manual correctly, you should set Paragraph-Indent Text mode instead of the usual Text mode.
Then set the buffer option [Save for Future Sessions] to have the option on startup.
See sections 51.1.3 Changing a Variable and 51.1.4 Saving Customizations of the Emacs manual.
 
Old 10-18-2016, 11:37 AM   #5
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,953

Original Poster
Rep: Reputation: 270Reputation: 270Reputation: 270
Quote:
Originally Posted by bigrigdriver View Post
you should set Paragraph-Indent Text mode instead of the usual Text mode.
I do, and wrote that I do.


Quote:
Originally Posted by bigrigdriver View Post
Then set the buffer option [Save for Future Sessions] to have the option on startup.
I edit $HOME/.emacs. Beginning with 24.4 emacs no longer respects tab-always-indent in text modes. It respects it in fundamental mode (and C and HTML), but fundamental mode does not treat indentation as the beginning of a paragraph.

Last edited by RandomTroll; 10-18-2016 at 11:53 AM. Reason: fix mistake
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
create multi-tab ods from tab delimited files schneidz Programming 5 07-24-2017 11:06 AM
key tab permits the indent in python3 abd_bela Programming 3 08-18-2015 02:38 PM
[SOLVED] Remove Double tab indent on vim d4nt3 Linux - Software 1 04-09-2013 09:46 PM
do you use tab or the spacebar to indent? newbiesforever General 12 05-23-2010 11:06 PM
How to set tab in Emacs? Mathsniper Linux - Software 2 06-14-2005 11:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration