Comments (17)
Also, I usually download Emacs from here. In this case there is no binary called emacs. It's called Emacs.
That's a bit odd, but in any case, I have opened #22. Should be easy to implement.
from eless.
I think eval-after-load and string-match would suffice.
You are correct. I have made that change. Please try the latest master.
from eless.
Currently I get an Invalid regex: "Invalid regular expression"
error. But, this is with system emacs 22 (OS X 10.9.5). Not clear what the source is.
I have a more recent version of OS X (well, "macOS") that I will try with later today.
from eless.
Currently I get an Invalid regex: "Invalid regular expression" error.
Let's continue the discussion for this here: #25.
Once just running eless
(not building [Requirements]) works on emacs 23 for you, we can close this issue.
from eless.
@sshaw I'll close this issue (or even you can) once you confirm that eless
runs fine on emacs 22.1.
from eless.
Working here too. Very nice.
One thing I did notice (unrelated) are broken pipe errors from this, which is always ran.
from eless.
One thing I did notice (unrelated) are broken pipe errors from this, which is always ran.
I didn't follow. What do they looks like? How to reproduce?
from eless.
From the eless repo run:
git --no-pager log | ./eless
Then quit and you'll see:
./eless: line 232: echo: write error: Broken pipe
This is because $(echo "${piped_data}" | head -n 10)
will run. Since head
is closing the pipe after 10 lines echo
complains.
Fix is easy:
$(echo "${piped_data}" 2>/dev/null | head -n 10)
But instead of loading a possibly very big string into a variable when piped (and defeating some of the purpose of a pipe), why not just cat
to file immediately? There's no need to do it via echo
later .
Then you can just say $(head -n $tempfile)
from eless.
Then quit and you'll see:
I did as you suggested, hit q
, but I don't see any error.
from eless.
.. no error on both bash and tcsh.
from eless.
This is because
$(echo "$ {piped_data}" | head -n 10) will run. Since head is closing the pipe after 10 lines echo complains.
That shouldn't get executed under normal conditions.. gets executed only if -D
switch is used.
So I tried using the -D
switch, but even then.. no error.
from eless.
It does get executed. The string is interpolated which runs the subshell. This is then passed to debug
which only chooses to print if -D
was given.
GNU/Linux has different versions of head
and Bash so this can be why you're not seeing the error.
from eless.
It does get executed. The string is interpolated which runs the subshell. This is then passed to debug which only chooses to print if -D was given.
Ah, ok. Also the GNU/BSD issue is still not gone :P
Your suggestion makes a lot of sense.. will work on fixing this. Thanks!
from eless.
why not just cat to file immediately
I have never used cat
to assign to file. What's the syntax? SO doesn't help.
$(cat) > "${piped_data_file}"
doesn't work.
UPDATE
It's the first time I am using the below syntax and it works!
cat > "${piped_data_file}"
from eless.
I have this fix on https://github.com/kaushalmodi/eless/tree/direct-cat-to-tempfile branch.. but make test
freezes locally for me with that commit, though your git log example works.
Update: Fixed it locally. Update coming soon.
from eless.
Test the master now.
from eless.
from eless.
Related Issues (20)
- Get emacs binary name from an env var HOT 2
- Replace sed -r s/foo/bar/I with BSD compatible equivalent HOT 2
- Fix building using "make all" on macOS HOT 12
- Invalid regex: "Invalid regular expression" error on macOS HOT 15
- Test various eless usage scenarios on Travis
- man pages are not readable on macOS HOT 79
- Support Perl man pages HOT 2
- Default theme HOT 2
- Installation instructions HOT 17
- View multiple files in sequence with eless HOT 1
- Document how markdown-mode can be installed to use eless as CLI md viewer
- man page with colors HOT 18
- Make the test for info .. | eless work on Travis HOT 3
- Customize faces HOT 3
- `make install` fails without meaningful error message if makeinfo is not installed HOT 2
- Error when filename has parentheses HOT 3
- Reconsider emacs dependency for brew formula HOT 3
- How can I use eless in vterm? HOT 1
- passing updated man page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eless.