Re: [ESS] [OT] Enabled a hook and no longer find which

2021-08-03 Thread Dirk Eddelbuettel via ESS-help


On 3 August 2021 at 09:35, Enrico Schumann wrote:
| More wild guesses:
| 
| - maybe some Emacs minor mode does it? Any
|   configuration for gtags-mode?

I use it (via elpa).

But I grep'ed and an ag'ed at length for anything related.
 
| - do you happen to use an Emacs package named ggtags
|   [https://github.com/leoliu/ggtags]? I think it
|   automatically updates tag files per default (see
|   'ggtags-update-on-save')

This is the winning entry :)  After adding

  ;; 2021-08-03  turn off ggtags-update-on-save
  (setq ggtags-update-on-save nil)

it no longer does this.  *Well done* so after it "wasn't me" but just my
recollection that I may have done this.

Many *many* thanks Enrico. Nice detective work there :)

Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] [OT] Enabled a hook and no longer find which

2021-08-03 Thread Enrico Schumann via ESS-help
On Fri, 30 Jul 2021, Dirk Eddelbuettel via ESS-help writes:

> tl;dr: I enabled an action 'on save' and I no longer find where :-/
>
>
> Longer story: I settled upon GNU global and ggtags at some point for a
> (mostly multilingual) system of tags in R and C++ (and some more). So a few
> of source directories have these (ugly names) files GPATH, GTAGS, GRTAGS.
> And at one point I became too clever by half and somehow enabled updating of
> these files for at least some repos. But I no longer remember _how_ I did
> that and can, for the life of me, find any trace in my .emacs (and, older
> story, .elisp/*el) file(s). It is definitely active in ~/git/rcpp and
> ~/git/tiledb-r -- which maybe the two repos in work in the most.
>
> This list has been very kind helpful in the past when I puzzled myself with
> this one true editor.  I suspect I used an ESS hook somewhere.  How would I
> find or debug this?
>
> The net effect seems to be that as soon I save (C-x s) the files GTAGS and
> GRTAGS get updated.  Which I otherwise do via a one-line script setting the
> proper options (as GNU global at some point in the past needed a patch, I
> think that is no longer needed)
> gtags --gtagsconf=/home/edd/.globalrc --gtagslabel=pygments --verbose 
> --statistics "$@"
>
> I have been half-amused by this for a few weeks but I am approaching "white
> flag" territory here on my own workstation: how do I find out how I enabled
> this?  I looked into git commit hooks (nope), GNU global config (nope), and,
> by looking more closely at the timestamps, have to suspect that is from
> Emacs.  But nothing in the Emacs config gives it away. I have a vague memory
> that it went via one of the XDG standard directories
> (~/.config/share/SOMETHING ?) but no mas.  
>
> Dirk, only moderately amuzed by now

More wild guesses:

- maybe some Emacs minor mode does it? Any
  configuration for gtags-mode?

- do you happen to use an Emacs package named ggtags
  [https://github.com/leoliu/ggtags]? I think it
  automatically updates tag files per default (see
  'ggtags-update-on-save')

Good luck.

-- 
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] [OT] Enabled a hook and no longer find which

2021-08-02 Thread Dirk Eddelbuettel via ESS-help


On 2 August 2021 at 21:20, Tyler Smith via ESS-help wrote:
| Can you reproduce the problem after starting Emacs via `emacs -Q`? That would 
confirm the problem is not in your Emacs config. Or confirm that it is, if the 
problem isn't reproduced.

Can confirm. With emacs -Q nothing happens to these tag files.

Idem, if I rename /usr/bin/gtags to /usr/bin/gtagsHIDDEN or alike nothing
happens either.  So I have a trigger somewhere...
 
| If it's not in your config it would have to be in a dir-local or file-local 
variable, or completely outside emacs (can you reproduce by editing files in 
another editor?). 

I looked and looked for dir-local or file-local but nothing either.

| If it is in your config, can you post it somewhere?

I'd rather not. It is a bit of sprawling mess. I guess I have to bite the
bullet, eventually, and re-create on, say, the laptop...

Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] [OT] Enabled a hook and no longer find which

2021-08-02 Thread Tyler Smith via ESS-help
On Mon, Aug 2, 2021, at 6:20 PM, Dirk Eddelbuettel via ESS-help wrote:
> 
> But in one of the instrumented repos, as soon as I updated files src/ the
> files GTAGS and GRTAGS.  

Can you reproduce the problem after starting Emacs via `emacs -Q`? That would 
confirm the problem is not in your Emacs config. Or confirm that it is, if the 
problem isn't reproduced.

If it's not in your config it would have to be in a dir-local or file-local 
variable, or completely outside emacs (can you reproduce by editing files in 
another editor?). 

If it is in your config, can you post it somewhere?


Tyler

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] [OT] Enabled a hook and no longer find which

2021-08-02 Thread Stephen Berman via ESS-help
On Mon, 2 Aug 2021 17:35:09 -0500 Dirk Eddelbuettel via ESS-help 
 wrote:

> On 2 August 2021 at 17:20, Dirk Eddelbuettel via ESS-help wrote:
> |
> | On 2 August 2021 at 23:56, Stephen Berman wrote:
> | | Did you also try the more direct alternative of grepping simply for
> | | "GPATH", "GTAGS", "GRTAGS"?  Presumably whatever function updates these
> | | files has to refer to them, either directly by name or indirectly by a
> | | variable or function that in turn refers to them directly or indirectly.
> | | So it should be possible to find the update function by inspecting all
> | | code that uses these file names (directly or indirectly).
> |
> | They are only written by a tool named gtags which is a binary that comes 
> with
> | GNU global. I even tried to be craft and 'shadow' /usr/bin/gtags with a
> | (name-name) shell script leaving a timestamp in /tmp before calling
> | /usr/bin/gtags but that left no traces either.
> |
> | But in one of the instrumented repos, as soon as I updated files src/ the
> | files GTAGS and GRTAGS.  It works so magically I feel tempted to use the
> | trick for other purposes but I no longer know the trick .
>
> Sorry, missed one part of your question here:  so yes, no trace of either
> gtags or GPATH or GTAGS or GRTAGS in any of the few .el files in my ~ (and as
> an elisp noob I would not write anywhere else).  So still a puzzle.

Maybe you could use gdb with a breakpoint on a suitable function (or
just main()) in gtags.c (assuming you have the source) and try stepping
through the call chain.

Steve Berman

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] [OT] Enabled a hook and no longer find which

2021-08-02 Thread Dirk Eddelbuettel via ESS-help


On 2 August 2021 at 17:20, Dirk Eddelbuettel via ESS-help wrote:
| 
| On 2 August 2021 at 23:56, Stephen Berman wrote:
| | Did you also try the more direct alternative of grepping simply for
| | "GPATH", "GTAGS", "GRTAGS"?  Presumably whatever function updates these
| | files has to refer to them, either directly by name or indirectly by a
| | variable or function that in turn refers to them directly or indirectly.
| | So it should be possible to find the update function by inspecting all
| | code that uses these file names (directly or indirectly).
| 
| They are only written by a tool named gtags which is a binary that comes with
| GNU global. I even tried to be craft and 'shadow' /usr/bin/gtags with a
| (name-name) shell script leaving a timestamp in /tmp before calling
| /usr/bin/gtags but that left no traces either.
| 
| But in one of the instrumented repos, as soon as I updated files src/ the
| files GTAGS and GRTAGS.  It works so magically I feel tempted to use the
| trick for other purposes but I no longer know the trick .

Sorry, missed one part of your question here:  so yes, no trace of either
gtags or GPATH or GTAGS or GRTAGS in any of the few .el files in my ~ (and as
an elisp noob I would not write anywhere else).  So still a puzzle.

Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] [OT] Enabled a hook and no longer find which

2021-08-02 Thread Dirk Eddelbuettel via ESS-help


On 2 August 2021 at 23:56, Stephen Berman wrote:
| Did you also try the more direct alternative of grepping simply for
| "GPATH", "GTAGS", "GRTAGS"?  Presumably whatever function updates these
| files has to refer to them, either directly by name or indirectly by a
| variable or function that in turn refers to them directly or indirectly.
| So it should be possible to find the update function by inspecting all
| code that uses these file names (directly or indirectly).

They are only written by a tool named gtags which is a binary that comes with
GNU global. I even tried to be craft and 'shadow' /usr/bin/gtags with a
(name-name) shell script leaving a timestamp in /tmp before calling
/usr/bin/gtags but that left no traces either.

But in one of the instrumented repos, as soon as I updated files src/ the
files GTAGS and GRTAGS.  It works so magically I feel tempted to use the
trick for other purposes but I no longer know the trick .

Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] [OT] Enabled a hook and no longer find which

2021-08-02 Thread Stephen Berman via ESS-help
On Fri, 30 Jul 2021 12:56:11 -0500 Dirk Eddelbuettel via ESS-help 
 wrote:

> tl;dr: I enabled an action 'on save' and I no longer find where :-/
>
>
> Longer story: I settled upon GNU global and ggtags at some point for a
> (mostly multilingual) system of tags in R and C++ (and some more). So a few
> of source directories have these (ugly names) files GPATH, GTAGS, GRTAGS.
> And at one point I became too clever by half and somehow enabled updating of
> these files for at least some repos. But I no longer remember _how_ I did
> that and can, for the life of me, find any trace in my .emacs (and, older
> story, .elisp/*el) file(s).
[...]

On Fri, 30 Jul 2021 21:39:00 -0500 Dirk Eddelbuettel via ESS-help 
 wrote:

> On 30 July 2021 at 17:27, Tyler Smith via ESS-help wrote:
> | Maybe check the values of before-save-hook and after-save-hook while
> | visiting one of the files this problem applies to? You might find a function
> | name you can grep for in your config.
>
> Yes hooks had come to mind and I tried 'C-h v' and 'C-h f' for a few
> variables and functions. Still no smoking gun.

Did you also try the more direct alternative of grepping simply for
"GPATH", "GTAGS", "GRTAGS"?  Presumably whatever function updates these
files has to refer to them, either directly by name or indirectly by a
variable or function that in turn refers to them directly or indirectly.
So it should be possible to find the update function by inspecting all
code that uses these file names (directly or indirectly).

Steve Berman

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] [OT] Enabled a hook and no longer find which

2021-07-30 Thread Dirk Eddelbuettel via ESS-help


On 30 July 2021 at 21:32, Andreas Leha via ESS-help wrote:
| wild guess:  file/dir local variable?

I considered that too esp as I see it only in some repos. But no repo-local
file I can see or tell (and I know repo layout / files well enough).

On 30 July 2021 at 17:27, Tyler Smith via ESS-help wrote:
| Maybe check the values of before-save-hook and after-save-hook while
| visiting one of the files this problem applies to? You might find a function
| name you can grep for in your config.  

Yes hooks had come to mind and I tried 'C-h v' and 'C-h f' for a few
variables and functions. Still no smoking gun.

| If it's only in certain directories, check if there is a `.dir-locals.el`
| file in that directory (or one of its parents).

'locate' shows that I have a few .dir-locals.el on my machine but they all
come from different upstreams.


Good suggestions, though.  Thank you both.  Still poking, mostly in the dark.

Dirk

--
https://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] [OT] Enabled a hook and no longer find which

2021-07-30 Thread Tyler Smith via ESS-help
On Fri, Jul 30, 2021, at 1:56 PM, Dirk Eddelbuettel via ESS-help wrote:
> 
> tl;dr: I enabled an action 'on save' and I no longer find where :-/

Maybe check the values of before-save-hook and after-save-hook while visiting 
one of the files this problem applies to? You might find a function name you 
can grep for in your config. 

If it's only in certain directories, check if there is a `.dir-locals.el` file 
in that directory (or one of its parents).

Good luck!

Tyler

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] [OT] Enabled a hook and no longer find which

2021-07-30 Thread Andreas Leha via ESS-help
Dirk Eddelbuettel via ESS-help  writes:

> tl;dr: I enabled an action 'on save' and I no longer find where :-/
>
>
> Longer story: I settled upon GNU global and ggtags at some point for a
> (mostly multilingual) system of tags in R and C++ (and some more). So a few
> of source directories have these (ugly names) files GPATH, GTAGS, GRTAGS.
> And at one point I became too clever by half and somehow enabled updating of
> these files for at least some repos. But I no longer remember _how_ I did
> that and can, for the life of me, find any trace in my .emacs (and, older
> story, .elisp/*el) file(s). It is definitely active in ~/git/rcpp and
> ~/git/tiledb-r -- which maybe the two repos in work in the most.
>
> This list has been very kind helpful in the past when I puzzled myself with
> this one true editor.  I suspect I used an ESS hook somewhere.  How would I
> find or debug this?
>
> The net effect seems to be that as soon I save (C-x s) the files GTAGS and
> GRTAGS get updated.  Which I otherwise do via a one-line script setting the
> proper options (as GNU global at some point in the past needed a patch, I
> think that is no longer needed)
> gtags --gtagsconf=/home/edd/.globalrc --gtagslabel=pygments --verbose 
> --statistics "$@"
>
> I have been half-amused by this for a few weeks but I am approaching "white
> flag" territory here on my own workstation: how do I find out how I enabled
> this?  I looked into git commit hooks (nope), GNU global config (nope), and,
> by looking more closely at the timestamps, have to suspect that is from
> Emacs.  But nothing in the Emacs config gives it away. I have a vague memory
> that it went via one of the XDG standard directories
> (~/.config/share/SOMETHING ?) but no mas.  
>
> Dirk, only moderately amuzed by now

wild guess:  file/dir local variable?

Best,
Andreas

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


[ESS] [OT] Enabled a hook and no longer find which

2021-07-30 Thread Dirk Eddelbuettel via ESS-help


tl;dr: I enabled an action 'on save' and I no longer find where :-/


Longer story: I settled upon GNU global and ggtags at some point for a
(mostly multilingual) system of tags in R and C++ (and some more). So a few
of source directories have these (ugly names) files GPATH, GTAGS, GRTAGS.
And at one point I became too clever by half and somehow enabled updating of
these files for at least some repos. But I no longer remember _how_ I did
that and can, for the life of me, find any trace in my .emacs (and, older
story, .elisp/*el) file(s). It is definitely active in ~/git/rcpp and
~/git/tiledb-r -- which maybe the two repos in work in the most.

This list has been very kind helpful in the past when I puzzled myself with
this one true editor.  I suspect I used an ESS hook somewhere.  How would I
find or debug this?

The net effect seems to be that as soon I save (C-x s) the files GTAGS and
GRTAGS get updated.  Which I otherwise do via a one-line script setting the
proper options (as GNU global at some point in the past needed a patch, I
think that is no longer needed)
gtags --gtagsconf=/home/edd/.globalrc --gtagslabel=pygments --verbose 
--statistics "$@"

I have been half-amused by this for a few weeks but I am approaching "white
flag" territory here on my own workstation: how do I find out how I enabled
this?  I looked into git commit hooks (nope), GNU global config (nope), and,
by looking more closely at the timestamps, have to suspect that is from
Emacs.  But nothing in the Emacs config gives it away. I have a vague memory
that it went via one of the XDG standard directories
(~/.config/share/SOMETHING ?) but no mas.  

Dirk, only moderately amuzed by now

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help