Skip to main content
11 events
when toggle format what by license comment
Apr 27, 2019 at 18:04 vote accept Phoenix
Apr 27, 2019 at 17:59 history edited cyberbisson CC BY-SA 4.0
Clarification for lexical vs. dynamic binding
Apr 27, 2019 at 17:43 comment added Phoenix Let us continue this discussion in chat.
Apr 27, 2019 at 17:38 comment added cyberbisson Ha! This is because I have lexical-binding set to t. I wonder if adding that to the let expression would do the trick.
Apr 27, 2019 at 17:26 comment added Phoenix With the update I now get Symbol’s value as variable is void: search-text. So search-text is no longer considered a variable and is taken as search term itself.
Apr 27, 2019 at 17:18 history edited cyberbisson CC BY-SA 4.0
Some bug fixes.
Apr 27, 2019 at 17:17 comment added cyberbisson It's an ordering problem. I'll update the code. Basically, the search is running before the buffer loads if you specify the parameter before it on the CLI. We'll delay the execution of the search until emacs fully starts...
Apr 27, 2019 at 17:04 comment added Phoenix Yep. It does. That is why it puzzles me. It highlights the search term in red (as if the word was not found in its entirety). And when I press C-s, it just finds and highlights the word inside the file. The echo area states Overwrapped I-search: <pattern>, however, which is why I tried isearch-backward as I assumed that point was past the word I searched for (but same result there).
Apr 27, 2019 at 16:59 comment added cyberbisson Hmm, I will try some debugging a bit later. Does it show the correct search term when it fails at first?
Apr 27, 2019 at 16:49 comment added Phoenix I tried your solution. After opening the file, it states Failing I-search: <pattern> and remains at the first line. I can, however, just press C-s once without entering <pattern> again and it will find the word immediately. So, it works half way. Not sure why it states initially that it fails though. I tried isearch-backward in case the search was already past the word within the file, but I had the same result when opening again. The function to add this as a command-line switch is absolutely stunning though. Would like to see it work for me.
Apr 27, 2019 at 15:55 history answered cyberbisson CC BY-SA 4.0