Fork me on GitHub
#emacs
<
2017-04-12
>
benedek09:04:40

oi good peeps here. i am happy user of use-package but a bit confused at the same time… i kinda expected it pulling the latest version of packages at startup unless i pin the package to melpa-stable but apparently that is not happening… what am i missing? is there an easy use-package way to achieve this? or is this tangential to use-package?

andrea.crotti09:04:30

I don't think use-package should do that @benedek

andrea.crotti09:04:58

ah no maybe you are right it should do that

benedek09:04:56

yeah it is not exactly obvious…

jfntn12:04:49

I don't think it does that

benedek12:04:20

sad times…

benedek12:04:47

i can of course get this effect by nuking my elpa directory where the packages are stored

benedek12:04:05

and then the next startup will be a big upgrade…

benedek12:04:09

but not really ideal tbh

benedek12:04:51

so is it a bad idea to have such a feature in use-package?

cmack16:04:06

@benedek I don’t understand why you need to nuke elpa. When I want to upgrade, I M-x list-packages then U to mark upgradable packages and then x to execute the upgrade…

cmack16:04:37

I would not like use-package to auto-upgrade, myself, because sometimes I must resist my upgrade desires to avoid risking a breaking change while getting work done.

benedek16:04:27

you are ofc right @cmack that I can upgrade pkgs

benedek16:04:01

I think it would be nice tho to have this feature

benedek16:04:37

the packages I am more worried about I just pin to stable release

benedek16:04:07

but there a certain pkgs I actively develop (around clojure ;) ) which I just want to have the cutting edge even if risky

qqq17:04:35

how do I get search-forward-regexp to palce curosr on START instead of END of match ?

qqq17:04:53

also, what's the inverse of point ? when I want to set the point instead of reading its value

richiardiandrea18:04:41

@qqq you have to use match-beginning after that

dpsutton18:04:31

i think goto-char is what you want to move the point

qqq23:04:20

@richiardiandrea : @dpsutton : ah, thanks, I just used (backward-char (- (match-end 0) (match-beginning 0))

qqq23:04:55

(helm-grep-for (concat "def[^\\s]+ " symbol-under-cursor)) now, this almost works, but sometimes, symbol-under-cursor can have special meaning as a regexp so my question is: how can I change the symbol-under-cursor string to a regexp that only matches the original literla string?

qqq23:04:22

so for example, if symbol-under-cursor is ***, I need it changed to \\*\\*\\*

tanzoniteblack23:04:04

@qqq if you already know the symbol under the cursor, you can use the function http://www.gnu.org/software/emacs/manual/html_node/elisp/Regexp-Functions.html to escape it

qqq23:04:40

@tanzoniteblack : regexp-quote is precisely what I needed; thanks!

tanzoniteblack23:04:42

of course...that's escaping for emacs regexes, which might be a 1-1 match for grep, which might be an issue depending on how helm-grep-for works

qqq23:04:56

yeah, so I'm using helm-ag

qqq23:04:35

I guess I should not use symbol names with weird regexp interpretations

tanzoniteblack23:04:58

I know for grep, you can just use the parameter -F to have it do literal string matches

tanzoniteblack23:04:16

ag probably has something similar, and you might be able to pass extra parameters through somehow?

qqq23:04:03

the problem is I'm building a regexp, where parts of it is a regexp,a nd parts of it needs to be a literal string

qqq23:04:17

so I'm takng the symbol, which I want to quote -- then I want a prefix of def[^\s]*

qqq23:04:29

so I have to output one string, part of which is regex, part of which is quoted