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

  • Home
  • SEARCH
  • 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 3227070
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:31:53+00:00 2026-05-17T16:31:53+00:00

In the current buffer I have a list of file paths (one per line).

  • 0

In the current buffer I have a list of file paths (one per line). I want set “args” to that file list.

How can I do this?
Thanks.

  • 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-17T16:31:54+00:00Added an answer on May 17, 2026 at 4:31 pm
    :execute "args ".join(map(getline(1, line('$')), 'fnameescape(v:val)'))<CR>
    

    Explanation: getline(1, line('$')) will return a list of lines in the current buffer (from the first (1) to the last (line('$')) line, map(getline(1, line('$')), 'fnameescape(v:val)') will escape all filenames in case they contain spaces or other special characters, join(...) will join the resulting list by inserting space between every two list items, then it will passed to an args command by execute.

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

Sidebar

Related Questions

How can I pare down my buffer list to only include buffers that are
I have a buffer open in emacs. I want a function that will return
I have a gVIM script that parses current buffer and offers user to select
If my buffer list looks like this: :ls 1 %a Application/PowerModeServer/test/testTimer.cpp line 1 2
In finding string in the current buffer, I know that we can use C-s
I want to have a keyboard shortcut for comparing the current open buffer with
Alright, I have the following: wchar_t **filePathList; This holds a list of files that
I have one thread, that is sending data stored in a buffer of type
I'm using emacs and I have written a script which uses current-buffer. However the
My MacOS version of Emacs inserts contents of the file into current buffer instead

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.