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 8064191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:17:59+00:00 2026-06-05T11:17:59+00:00

Specifically this problem arises when working in LaTeX (auctex) for me, but I think

  • 0

Specifically this problem arises when working in LaTeX (auctex) for me, but I think it must have a general emacs solution.

To every doc.tex file, I have an associated and oft-edited doc.sty file in the same folder.

Is there a way that whenever I open the doc.tex file I can have emacs open the doc.sty file in that folder? I’m not proficient at all in elisp, so something very simple—it doesn’t need to be robust code: it can work on the assumption that both files are named doc.* and that both exist.

  • 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-06-05T11:18:03+00:00Added an answer on June 5, 2026 at 11:18 am

    Take a look at the commentary for:
    M-x find-library RET find-file RET

    It’s not precisely what you asked for, but it is a built-in solution for opening related files. Just bind a key to ff-find-other-file (or ff-find-related-file if you prefer that alias), and you can switch back and forth between the two files easily.

    In particular, see:

    • C-hv ff-other-file-alist RET
    • C-hv ff-search-directories RET

    So something like this:

    (add-hook 'latex-mode-hook 'my-latex-mode-hook)
    
    (defun my-latex-mode-hook ()
      "My LaTeX customisations."
      (setq ff-search-directories '(".")
            ff-other-file-alist  '(("\\.tex$" (".sty"))
                                   ("\\.sty$" (".tex"))))
      (local-set-key (kbd "C-c f") 'ff-find-other-file))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This problem arises in synchronization of arrays (ordered sets) of objects. Specifically, consider an
I have tried to google for hints on this problem but haven't found anyone
(This question specifically in C#, but applies generally to .NET) I have a largish
I am having a problem with this specifically on macs, and most recently I
I'm running in to the same problem this individual has . Specifically, I'm trying
This is specifically related to the Google App Engine Memcache API, but I'm sure
I've asked this before for Java , but this applies specifically to J2ME. Is
I have a problem making the link between the underlying socket (in this case,
I have finished the majority of my application that I am working on, but
I am wondering how you would approach this problem I have two Taxrates that

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.