* Referencing variables beginning with an asterisk in docstrings broken?
@ 2016-08-25 14:54 Nathanael Schweers
2016-08-28 1:55 ` Stefan Monnier
0 siblings, 1 reply; 10+ messages in thread
From: Nathanael Schweers @ 2016-08-25 14:54 UTC (permalink / raw)
To: help-gnu-emacs
I wanted to include a reference to a global (dynamic) variable in one of
my docstrings. According to the info page “(elisp) Documentation Tips”
one merely has to reference the variable in question between the
quotation marks ‘ and ’.
As far as I can tell so far, this works, as long as the variable does
not start with an asterisk. I.e. ‘varname’ works, so does ‘varname*’,
yet not ‘*varname’. Hence, ‘*varname*’ also does not work.
I’d like to adhere to the Common Lisp convention of naming special
variables in my elisp code, yet if I do so, I cannot seem to reference
them in docstrings.
Is this behaviour a bug?
Best Regards,
Nathanael Schweers
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Referencing variables beginning with an asterisk in docstrings broken?
2016-08-25 14:54 Referencing variables beginning with an asterisk in docstrings broken? Nathanael Schweers
@ 2016-08-28 1:55 ` Stefan Monnier
2016-08-28 15:18 ` GDB GUD Variable Buffer Augusto Fraga Giachero
2016-08-28 23:32 ` Referencing variables beginning with an asterisk in docstrings broken? Nathanael Schweers
0 siblings, 2 replies; 10+ messages in thread
From: Stefan Monnier @ 2016-08-28 1:55 UTC (permalink / raw)
To: help-gnu-emacs
> I’d like to adhere to the Common Lisp convention of naming special
> variables in my elisp code, yet if I do so, I cannot seem to reference
> them in docstrings.
> Is this behaviour a bug?
Probably a bug, but do note that Elisp is not Common-Lisp, so I strongly
recommend you follow the Elisp convention of using a "<pkg>-" prefix
instead of using asterisks for global variables.
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* GDB GUD Variable Buffer
2016-08-28 1:55 ` Stefan Monnier
@ 2016-08-28 15:18 ` Augusto Fraga Giachero
2016-08-28 15:53 ` Eli Zaretskii
2016-08-28 23:32 ` Referencing variables beginning with an asterisk in docstrings broken? Nathanael Schweers
1 sibling, 1 reply; 10+ messages in thread
From: Augusto Fraga Giachero @ 2016-08-28 15:18 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
I'm using the gdb debugger through the Emacs GUD interface and I've
thought that would be better to have a dedicated buffer just to display
all local and global variables. I known that I can use the "display"
command on the gdb shell, but I think a separated buffer would be way
better.
Someone has already done it? If not, can someone please point to where
to tinker with the GUD source code? I have a basic understanding of elisp.
Thanks,
Augusto Fraga Giachero.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: GDB GUD Variable Buffer
2016-08-28 15:18 ` GDB GUD Variable Buffer Augusto Fraga Giachero
@ 2016-08-28 15:53 ` Eli Zaretskii
2016-08-28 16:35 ` Augusto Fraga Giachero
0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2016-08-28 15:53 UTC (permalink / raw)
To: help-gnu-emacs
> From: Augusto Fraga Giachero <augustofg96@gmail.com>
> Date: Sun, 28 Aug 2016 12:18:32 -0300
>
> I'm using the gdb debugger through the Emacs GUD interface and I've
> thought that would be better to have a dedicated buffer just to display
> all local and global variables. I known that I can use the "display"
> command on the gdb shell, but I think a separated buffer would be way
> better.
>
> Someone has already done it? If not, can someone please point to where
> to tinker with the GUD source code? I have a basic understanding of elisp.
Did you try the alternative front-end in gdb-mi.el? It can display
the local variables of the current stack frame in a separate window
(you might need to invoke "M-x gdb-many-windows RET" for it to show).
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: GDB GUD Variable Buffer
2016-08-28 15:53 ` Eli Zaretskii
@ 2016-08-28 16:35 ` Augusto Fraga Giachero
2016-08-28 16:54 ` Eli Zaretskii
0 siblings, 1 reply; 10+ messages in thread
From: Augusto Fraga Giachero @ 2016-08-28 16:35 UTC (permalink / raw)
To: help-gnu-emacs
Oh, I've forgotten the gdb-many-windows mode. Yes, it does show a
variable buffer as I wanted, but it displays too many windows, I'll try
to customize it.
Another question, do you know how to automatically execute an elisp
function right after I close the GUD session? That's because now I need
to kill a gdb server process each time I exit gdb.
Thanks,
Augusto Fraga Giachero.
On 28-08-2016 12:53, Eli Zaretskii wrote:
>> From: Augusto Fraga Giachero <augustofg96@gmail.com>
>> Date: Sun, 28 Aug 2016 12:18:32 -0300
>>
>> I'm using the gdb debugger through the Emacs GUD interface and I've
>> thought that would be better to have a dedicated buffer just to display
>> all local and global variables. I known that I can use the "display"
>> command on the gdb shell, but I think a separated buffer would be way
>> better.
>>
>> Someone has already done it? If not, can someone please point to where
>> to tinker with the GUD source code? I have a basic understanding of elisp.
> Did you try the alternative front-end in gdb-mi.el? It can display
> the local variables of the current stack frame in a separate window
> (you might need to invoke "M-x gdb-many-windows RET" for it to show).
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Referencing variables beginning with an asterisk in docstrings broken?
2016-08-28 1:55 ` Stefan Monnier
2016-08-28 15:18 ` GDB GUD Variable Buffer Augusto Fraga Giachero
@ 2016-08-28 23:32 ` Nathanael Schweers
2016-08-29 0:32 ` Stefan Monnier
1 sibling, 1 reply; 10+ messages in thread
From: Nathanael Schweers @ 2016-08-28 23:32 UTC (permalink / raw)
To: Stefan Monnier; +Cc: help-gnu-emacs
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I’d like to adhere to the Common Lisp convention of naming special
>> variables in my elisp code, yet if I do so, I cannot seem to reference
>> them in docstrings.
>> Is this behaviour a bug?
>
> Probably a bug, but do note that Elisp is not Common-Lisp, so I strongly
> recommend you follow the Elisp convention of using a "<pkg>-" prefix
> instead of using asterisks for global variables.
>
>
> Stefan
>
>
I did both. I also filed a bug, but it seems that this is because of
some heuristic to prevent too many false positives. I guess I’ll either
change my naming, or just live with it. Currently I use
*prefix/public-var*, but I guess prefix/*public-var* might be even
better.
Nathanael
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* Referencing variables beginning with an asterisk in docstrings broken?
@ 2016-08-25 13:56 Nathanael Schweers
2016-08-25 20:19 ` Drew Adams
0 siblings, 1 reply; 10+ messages in thread
From: Nathanael Schweers @ 2016-08-25 13:56 UTC (permalink / raw)
To: help-gnu-emacs
I wanted to include a reference to a global (dynamic) variable in one of
my docstrings. According to the info page “(elisp) Documentation Tips”
one merely has to reference the variable in question between the
quotation marks ‘ and ’.
As far as I can tell so far, this works, as long as the variable does
not start with an asterisk. I.e. ‘varname’ works, so does ‘varname*’,
yet not ‘*varname’. Hence, ‘*varname*’ also does not work.
I’d like to adhere to the Common Lisp convention of naming special
variables in my elisp code, yet if I do so, I cannot seem to reference
them in docstrings.
Is this behaviour a bug?
Best Regards,
Nathanael Schweers
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: Referencing variables beginning with an asterisk in docstrings broken?
2016-08-25 13:56 Nathanael Schweers
@ 2016-08-25 20:19 ` Drew Adams
0 siblings, 0 replies; 10+ messages in thread
From: Drew Adams @ 2016-08-25 20:19 UTC (permalink / raw)
To: Nathanael Schweers, help-gnu-emacs
> I wanted to include a reference to a global (dynamic) variable in one of
> my docstrings. According to the info page “(elisp) Documentation Tips”
> one merely has to reference the variable in question between the
> quotation marks ‘ and ’.
>
> As far as I can tell so far, this works, as long as the variable does
> not start with an asterisk. I.e. ‘varname’ works, so does ‘varname*’,
> yet not ‘*varname’. Hence, ‘*varname*’ also does not work.
>
> I’d like to adhere to the Common Lisp convention of naming special
> variables in my elisp code, yet if I do so, I cannot seem to reference
> them in docstrings.
>
> Is this behaviour a bug?
Sure sounds like a bug to me.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-08-29 0:32 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-25 14:54 Referencing variables beginning with an asterisk in docstrings broken? Nathanael Schweers
2016-08-28 1:55 ` Stefan Monnier
2016-08-28 15:18 ` GDB GUD Variable Buffer Augusto Fraga Giachero
2016-08-28 15:53 ` Eli Zaretskii
2016-08-28 16:35 ` Augusto Fraga Giachero
2016-08-28 16:54 ` Eli Zaretskii
2016-08-28 23:32 ` Referencing variables beginning with an asterisk in docstrings broken? Nathanael Schweers
2016-08-29 0:32 ` Stefan Monnier
-- strict thread matches above, loose matches on Subject: below --
2016-08-25 13:56 Nathanael Schweers
2016-08-25 20:19 ` Drew Adams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).