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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:36:55+00:00 2026-05-31T15:36:55+00:00

The problem is when file path is pretty long each time I save it,

  • 0

The problem is when file path is pretty long each time I save it, minibuffer height grows and basically immediately shrinks. Kind of annoying because happens so often.

So I want to either shorten (basename?) the “wrote: …” message or make default (starting) minibuffer height of 2 lines. Or maybe enable truncation in minibuffer only but that’s not really good.

Is there a way?

  • 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-31T15:36:56+00:00Added an answer on May 31, 2026 at 3:36 pm

    Edit: I just noticed the message-truncate-lines variable and, unlike resize-mini-windows and max-mini-window-height, I can actually make this one behave the way I want:

    (defadvice save-buffer (around my-save-mini-window-size)
      "Don't increase the size of the echo area if the path of the file being saved is too long to show on one line."
      (let ((message-truncate-lines t))
        ad-do-it))
    (ad-activate 'save-buffer)
    

    original answer follows (and I’m interested to know why setting the other variables with similar advice doesn’t have the desired effect, if anyone can elaborate on that?)

    I think messing with the message itself is going to be pretty hairy (and in any case a bad idea). write-region (in fileio.c) does say of its arguments If VISIT is neither t nor nil nor a string, that means do not display the "Wrote file" message, but I strongly doubt that enforcing that would be sensible.

    I think the only sane approach is to prevent the minibuffer from resizing regardless of the message length. The following will do this, but for more situations than just saving a file:

    (setq resize-mini-windows nil)
    

    My normal approach here would be to write some around advice for the function we’re interested in (I was thinking save-buffer), to temporarily set that value, but for whatever reason that’s not having the desired effect.

    Similarly with using before-save-hook and after-save-hook to set and restore it.

    There’s also the max-mini-window-height variable, but that appears to be subject to the same issue when attempting to set it temporarily.

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

Sidebar

Related Questions

I have a problem with my path. Say I have a PHP file in
For some reason one installation of Moodle 1.9.3+ has a problem that file.php returns
I am having a problem with SWF File. I have a SWF File on
I have a problem downloading particular file types by WebClient. So there are no
I'm able to connect to and read an excel file no problem. But when
Problem description: Read an xml file, traverse to a particular node (element), if it
Problem: I've a huge raw text file (assume of 3gig), I need to go
The problem is only happening with one file when I try to do a
I have a problem with a simple included file. The file being included is
This problem occurs when I try to hide a file in my directory with

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.