LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 03-04-2019, 06:50 AM   #1
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582

Rep: Reputation: 28
emacs - /home/jim prepended to --script=


Hi,

I want to run a script which creates a file and then run an emacs function on it.

emacs is not cooperating.
Code:
#! /bin/bash
#  Script to produce list of all sketchbook/*/*.ino sorted by sketch name

cd ~/Arduino
find . -name *.ino > ~/ino-summary
cd

emacs \
    --batch \
    --no-site-file \
    --script=/home/jim/ino-summary.el \
    --file=/home/jim/ino-summary
Code:
; ino-summary.el
;   currently just a place-holder

(goto-char (point-min))
(insert-char ?#)
(save-buffer)
Running it gives me:
Code:
~ $ ./InoSummary
Cannot open load file: no such file or directory, /home/jim/--script=/home/jim/ino-summary.el
~ $ ls -al *.el
-rw-rw-r-- 1 jim jim 341 Mar  4 20:33 ino-summary.el
Why is /home/jim prepended to --script?
 
Old 03-04-2019, 08:12 AM   #2
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
Then show us your home dir, where the script should be.
 
Old 03-04-2019, 08:27 PM   #3
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582

Original Poster
Rep: Reputation: 28
Code:
~ $ pwd
/home/jim
~ $ ls ino-summary.el 
ino-summary.el
 
Old 03-04-2019, 08:49 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Code:
-rw-rw-r-- 1 jim jim 341 Mar  4 20:33 ino-summary.el
Does that file need to be executable?
 
Old 03-04-2019, 10:21 PM   #5
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582

Original Poster
Rep: Reputation: 28
emacs functions do not need to be marked executable.

I suspect a bug in emacs. Otherwise it is rather odd that a switch with its value would need to be found somewhere in the file system.

Perhaps I should move to an emacs forum.
 
  


Reply



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
How can I get emacs -nw when I call emacs from a terminal but GUI emacs elsewhere? Blackened Justice Linux - Newbie 4 09-08-2011 07:57 AM
Bash script calling makefiles with CFLAGS prepended paulcsf Linux - Software 5 02-06-2010 06:24 PM
LXer: Jim Gray, a genuine guru... LXer Syndicated Linux News 0 05-30-2006 12:33 PM
LXer: Jim Starkey (interbase father) joined MySQL AB LXer Syndicated Linux News 0 02-18-2006 01:01 PM

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

All times are GMT -5. The time now is 07:02 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