unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* mark-whole-buffer and unnecessary (point) call
@ 2017-01-28  9:37 dptd dptd
  2017-01-28  9:55 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: dptd dptd @ 2017-01-28  9:37 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1268 bytes --]

Hello everyone,
This is my first e-mail to the emacs-devel so I hope my question will not be the stupidest one in this mailing list history. I am an Emacs newbie but I love it. I am also very interested in the lispy languages and this is why I am learning elisp - I want to contribute. I am reading “An Introduction to Programming in Emacs Lisp” and in the section 4.3.1 Body of mark-whole-buffer there is this text:
"I don’t know why the expression in mark-whole-buffer is written (push-mark (point)) and the expression in beginning-of-buffer is written (push-mark). Perhaps whoever wrote the code did not know that the arguments for push-mark are optional and that if push-mark is not passed an argument, the function auto- matically sets mark at the location of point by default.”

I have checked the newest source from the git repo and this (point) call is still there. I removed it, evaluated and checked if the function still works and yes - it works. Is there any reason why this call is still there? I was wondering if I could / should remove it and submit my first change request. However I assume that I do not understand something here because everyone who have read this introduction knows about it.

Thanks in advance!

Best regards,
dptd

[-- Attachment #2: Type: text/html, Size: 1695 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mark-whole-buffer and unnecessary (point) call
  2017-01-28  9:37 mark-whole-buffer and unnecessary (point) call dptd dptd
@ 2017-01-28  9:55 ` Eli Zaretskii
  2017-01-28 10:28   ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2017-01-28  9:55 UTC (permalink / raw)
  To: dptd dptd; +Cc: emacs-devel

> From: dptd dptd <dptdescribe@gmail.com>
> Date: Sat, 28 Jan 2017 11:37:47 +0200
> 
> Hello everyone,
> This is my first e-mail to the emacs-devel so I hope my question will not be the stupidest one in this mailing
> list history. I am an Emacs newbie but I love it. I am also very interested in the lispy languages and this is why
> I am learning elisp - I want to contribute.

Welcome aboard, and thanks in advance!

> I have checked the newest source from the git repo and this (point) call is still there. I removed it, evaluated
> and checked if the function still works and yes - it works. Is there any reason why this call is still there? I was
> wondering if I could / should remove it and submit my first change request. However I assume that I do not
> understand something here because everyone who have read this introduction knows about it.

Searching for "(push-mark (point))" finds 28 hits in the Emacs Lisp
files, so the above is not the only one.

I have no idea why the corresponding authors didn't omit the argument.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mark-whole-buffer and unnecessary (point) call
  2017-01-28  9:55 ` Eli Zaretskii
@ 2017-01-28 10:28   ` Eli Zaretskii
  2017-01-28 10:43     ` dptd dptd
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2017-01-28 10:28 UTC (permalink / raw)
  To: dptdescribe; +Cc: emacs-devel

> Date: Sat, 28 Jan 2017 11:55:47 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> Searching for "(push-mark (point))" finds 28 hits

And 97 hits for "(push-mark)", including 3 in simple.el.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mark-whole-buffer and unnecessary (point) call
  2017-01-28 10:28   ` Eli Zaretskii
@ 2017-01-28 10:43     ` dptd dptd
  2017-01-28 11:37       ` dptd dptd
  0 siblings, 1 reply; 6+ messages in thread
From: dptd dptd @ 2017-01-28 10:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 626 bytes --]


> On 28 Jan 2017, at 12:28, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> Date: Sat, 28 Jan 2017 11:55:47 +0200
>> From: Eli Zaretskii <eliz@gnu.org>
>> Cc: emacs-devel@gnu.org
>> 
>> Searching for "(push-mark (point))" finds 28 hits
> 
> And 97 hits for "(push-mark)", including 3 in simple.el.

Alright so I think I can assume for now that call to (point) is really not needed in such scenarios.
I will unify it in the whole repo and try to send my first patch. We will see what will happen…
If it will be accepted then I will update “An Introduction to Programming in Emacs Lisp” tex file.

Thanks Eli. :)

[-- Attachment #2: Type: text/html, Size: 1378 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mark-whole-buffer and unnecessary (point) call
  2017-01-28 10:43     ` dptd dptd
@ 2017-01-28 11:37       ` dptd dptd
  2017-01-28 13:54         ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: dptd dptd @ 2017-01-28 11:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]


> On 28 Jan 2017, at 12:43, dptd dptd <dptdescribe@gmail.com> wrote:
> 
> 
>> On 28 Jan 2017, at 12:28, Eli Zaretskii <eliz@gnu.org <mailto:eliz@gnu.org>> wrote:
>> 
>>> Date: Sat, 28 Jan 2017 11:55:47 +0200
>>> From: Eli Zaretskii <eliz@gnu.org <mailto:eliz@gnu.org>>
>>> Cc: emacs-devel@gnu.org <mailto:emacs-devel@gnu.org>
>>> 
>>> Searching for "(push-mark (point))" finds 28 hits
>> 
>> And 97 hits for "(push-mark)", including 3 in simple.el.
> 
> Alright so I think I can assume for now that call to (point) is really not needed in such scenarios.
> I will unify it in the whole repo and try to send my first patch. We will see what will happen…
> If it will be accepted then I will update “An Introduction to Programming in Emacs Lisp” tex file.
> 
> Thanks Eli. :)

I have the patch ready. Should I simply send it as a plain text to the emacs-diffs mailing list?
I saw that people there are not writing any comments about the change itself so there is no place for discussion.
Another thing is the copyright assignment. My patch has more than 15 lines of code so as far as I know I need to
do that. I have read in the CONTRIBUTE that emacs-devel can help with that. I have also read on the FSF page
that I should probably contact with the package maintainer. Where can I find any contact information?

Thank you in advance.

Best regards,
dptd

[-- Attachment #2: Type: text/html, Size: 2657 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mark-whole-buffer and unnecessary (point) call
  2017-01-28 11:37       ` dptd dptd
@ 2017-01-28 13:54         ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2017-01-28 13:54 UTC (permalink / raw)
  To: dptd dptd; +Cc: emacs-devel

> From: dptd dptd <dptdescribe@gmail.com>
> Date: Sat, 28 Jan 2017 13:37:20 +0200
> Cc: emacs-devel@gnu.org
> 
> I have the patch ready. Should I simply send it as a plain text to the emacs-diffs mailing list?

No, that list is for the VCS to send commits.  Please send to
bug-gnu-emacs@gnu.org instead, where it will be also recorded in our
issue tracker.

> Another thing is the copyright assignment. My patch has more than 15 lines of code so as far as I know I need
> to
> do that. I have read in the CONTRIBUTE that emacs-devel can help with that. I have also read on the FSF
> page
> that I should probably contact with the package maintainer. Where can I find any contact information?

The relevant people are reading the above-mentioned list, so you don't
need to look for them if you send there.

I will send you the copyright assignment form off-list, so you will be
able to start the legal paperwork rolling.

Thanks.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-28 13:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-28  9:37 mark-whole-buffer and unnecessary (point) call dptd dptd
2017-01-28  9:55 ` Eli Zaretskii
2017-01-28 10:28   ` Eli Zaretskii
2017-01-28 10:43     ` dptd dptd
2017-01-28 11:37       ` dptd dptd
2017-01-28 13:54         ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).