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