Re: [O] What does the _ in `(defun org-element-section-parser (_) ...)' stands for?
FYI, I found this today: (To silence byte-compiler warnings about unused variables, just use a variable name that start with an underscore. The byte-compiler interprets this as an indication that this is a variable known not to be used.) https://www.gnu.org/software/emacs/manual/html_node/elisp/Using-Lexical-Binding.html John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Thu, Feb 11, 2016 at 12:33 PM, Nick Dokos wrote: > Thorsten Jolitz writes: > > > John Kitchin writes: > > > >> On Wed, Feb 10, 2016 at 3:13 PM, Thorsten Jolitz > >> wrote: > >> > >> #+BEGIN_SRC emacs-lisp > >> (defun my-foo (_) > >> "Hello World. > >> Argument _ unknown argument." > >> (+ 1 1)) > >> #+END_SRC > >> > >> strange. in Emacs 25.1, I am pretty sure I get no errors from > >> checkdoc. > > > > Maybe not so strange, since I'm on: > > > > , > > | GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6) > > | of 2015-09-10 on foutrelis > > ` > > > > And I thought with Archlinux I'm always up-to-date ... > > Unless you build your own from the upstream git repo, you can never be > up to date; even so, it depends on how often you build - I build from > upstream every six months or so and my current version is > > GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.15) of > 2015-08-16 > > It's probably time to rebuild... > > -- > Nick > > >
Re: [O] What does the _ in `(defun org-element-section-parser (_) ...)' stands for?
Thorsten Jolitz writes: > John Kitchin writes: > >> On Wed, Feb 10, 2016 at 3:13 PM, Thorsten Jolitz >> wrote: >> >> #+BEGIN_SRC emacs-lisp >> (defun my-foo (_) >> "Hello World. >> Argument _ unknown argument." >> (+ 1 1)) >> #+END_SRC >> >> strange. in Emacs 25.1, I am pretty sure I get no errors from >> checkdoc. > > Maybe not so strange, since I'm on: > > , > | GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6) > | of 2015-09-10 on foutrelis > ` > > And I thought with Archlinux I'm always up-to-date ... Unless you build your own from the upstream git repo, you can never be up to date; even so, it depends on how often you build - I build from upstream every six months or so and my current version is GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.15) of 2015-08-16 It's probably time to rebuild... -- Nick
Re: [O] What does the _ in `(defun org-element-section-parser (_) ...)' stands for?
There is up to date ... And up to date😉 funnily enough I run a near bleeding edge version of Emacs from home brew and org 8.2.10 from Melpa. On Thursday, February 11, 2016, Thorsten Jolitz wrote: > John Kitchin > writes: > > > On Wed, Feb 10, 2016 at 3:13 PM, Thorsten Jolitz > > > wrote: > > > > #+BEGIN_SRC emacs-lisp > > (defun my-foo (_) > > "Hello World. > > Argument _ unknown argument." > > (+ 1 1)) > > #+END_SRC > > > > strange. in Emacs 25.1, I am pretty sure I get no errors from > > checkdoc. > > Maybe not so strange, since I'm on: > > , > | GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6) > | of 2015-09-10 on foutrelis > ` > > And I thought with Archlinux I'm always up-to-date ... > > -- > cheers, > Thorsten > > > -- John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu
Re: [O] What does the _ in `(defun org-element-section-parser (_) ...)' stands for?
John Kitchin writes: > On Wed, Feb 10, 2016 at 3:13 PM, Thorsten Jolitz > wrote: > > #+BEGIN_SRC emacs-lisp > (defun my-foo (_) > "Hello World. > Argument _ unknown argument." > (+ 1 1)) > #+END_SRC > > strange. in Emacs 25.1, I am pretty sure I get no errors from > checkdoc. Maybe not so strange, since I'm on: , | GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6) | of 2015-09-10 on foutrelis ` And I thought with Archlinux I'm always up-to-date ... -- cheers, Thorsten
Re: [O] What does the _ in `(defun org-element-section-parser (_) ...)' stands for?
On Wed, Feb 10, 2016 at 3:13 PM, Thorsten Jolitz wrote: > #+BEGIN_SRC emacs-lisp > (defun my-foo (_) > "Hello World. > Argument _ unknown argument." > (+ 1 1)) > #+END_SRC > strange. in Emacs 25.1, I am pretty sure I get no errors from checkdoc. John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu
Re: [O] What does the _ in `(defun org-element-section-parser (_) ...)' stands for?
John Kitchin writes: > I guess it is a required signature for the function (i.e. some other > function will call it with some argument), and _ indicates it is not > used in the body. If you were to give it the arg a name, then checkdoc > would complain about it not being in the docstring. Sounds reasonable, thanks for the explanation. But it does not seem to be a true guess, I tried it out with: #+BEGIN_SRC emacs-lisp (defun my-foo (_) "Hello World. Argument _ unknown argument." (+ 1 1)) #+END_SRC and checkdoc asked me to add the "Argument ..." part for "_" to the docstring. I don't remember that I've seen this before, so maybe this is a rather new feature/convention? > Thorsten Jolitz writes: > >> Hi List, >> just out of curiosity, a few functions in org-element.el contain _ in >> their parameter list, but its not used in the body. >> What does it stand for? > > > -- > Professor John Kitchin > Doherty Hall A207F > Department of Chemical Engineering > Carnegie Mellon University > Pittsburgh, PA 15213 > 412-268-7803 > @johnkitchin > http://kitchingroup.cheme.cmu.edu > > -- cheers, Thorsten
Re: [O] What does the _ in `(defun org-element-section-parser (_) ...)' stands for?
I guess it is a required signature for the function (i.e. some other function will call it with some argument), and _ indicates it is not used in the body. If you were to give it the arg a name, then checkdoc would complain about it not being in the docstring. Thorsten Jolitz writes: > Hi List, > just out of curiosity, a few functions in org-element.el contain _ in > their parameter list, but its not used in the body. > What does it stand for? -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu
[O] What does the _ in `(defun org-element-section-parser (_) ...)' stands for?
Hi List, just out of curiosity, a few functions in org-element.el contain _ in their parameter list, but its not used in the body. What does it stand for? -- cheers, Thorsten