Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6139977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:03:32+00:00 2026-05-23T18:03:32+00:00

I keep auto-fill-mode enabled by default for all LaTeX files. This is usually nice,

  • 0

I keep auto-fill-mode enabled by default for all LaTeX files.

This is usually nice, but occasionally one latex file contains mostly tables and I would like to disable auto-fill-mode whenever I edit that particular file.

Is it possible to specify at the top of a .tex file that I would like it to be the exception?
Alternatively, is it possible to specify in .emacs the paths/names of these files?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:03:33+00:00Added an answer on May 23, 2026 at 6:03 pm

    I like the solution of looking for something in the file to determine whether or not to have autofill.

    If you want to put an identifier at the top, you can use code like this:

    (defun my-auto-fill-disabling-hook ()
      "Check to see if we should disable autofill."
      (save-excursion
        (when (re-search-forward "Some Unique Identifier" 1000 t)
          (auto-fill-mode -1))))
    
    (add-hook 'find-file-hooks 'my-auto-fill-disabling-hook)
    

    And obviously change "Some Unique Identifier" to something reasonable – such as a search for the tables themselves. Then you’d get exactly what you want, LaTeX files with tables wouldn’t be auto-filled.

    Note: @Alex suggested using a file-local variable, but this is a mistake according to the manual itself:

    Often, however, it is a mistake to enable minor modes this way. Most
    minor modes, like Auto Fill mode, represent individual user
    preferences. If you want to use a minor mode, it is better to set up
    major mode hooks with your init file to turn that minor mode on for
    yourself alone (see Init File), instead of using a local variable list
    to impose your taste on everyone.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am wondering whether I should disable emacs auto-fill-mode it or keep it. Why
I have the height of this div set to 100% but content keep overflowing
I am going to attempt to keep this as simple as possible, but the
I keep trying to get rid of this keybinding but setting it to nil
I've got a div that uses overflow:auto to keep the contents inside the div
Keep getting this error after inserting a subdatasheet into a query and trying to
I keep getting tasks that are above my skill level. How can I address this without coming accross as grossly incompetent?
I keep running across this loading image http://georgia.ubuntuforums.com/images/misc/lightbox_progress.gif which seems to have entered into
I keep reading about C99 and C++11 and all these totally sweet things that
I keep getting this error: MySQL said: #1064 - You have an error in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.