* Emacs C tutorial @ 2014-10-31 21:07 E Sabof 2014-10-31 21:29 ` Eli Zaretskii 2014-11-01 15:25 ` Bruno Félix Rezende Ribeiro 0 siblings, 2 replies; 14+ messages in thread From: E Sabof @ 2014-10-31 21:07 UTC (permalink / raw) To: help-gnu-emacs It occurred to me, that while there are plenty of resources on Emacs Lisp, I never came across a blog post/tutorial about anything C. I have doubts on whether making C changes could become a popular hobby, but I think that if someone wrote some sort of introduction, it would be a large step towards increasing the number of potential contributors. Evgeni ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Emacs C tutorial 2014-10-31 21:07 Emacs C tutorial E Sabof @ 2014-10-31 21:29 ` Eli Zaretskii 2014-10-31 23:50 ` E Sabof [not found] ` <mailman.12491.1414799441.1147.help-gnu-emacs@gnu.org> 2014-11-01 15:25 ` Bruno Félix Rezende Ribeiro 1 sibling, 2 replies; 14+ messages in thread From: Eli Zaretskii @ 2014-10-31 21:29 UTC (permalink / raw) To: E Sabof; +Cc: help-gnu-emacs > From: E Sabof <esabof@gmail.com> > Date: Fri, 31 Oct 2014 21:07:02 +0000 > > It occurred to me, that while there are plenty of resources on Emacs Lisp, I never came across a blog post/tutorial about anything C. I have doubts on whether making C changes could become a popular hobby, but I think that if someone wrote some sort of introduction, it would be a large step towards increasing the number of potential contributors. We put that information in comments. Look up the large commentary blocks, such as the one at the beginning of xdisp.c. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Emacs C tutorial 2014-10-31 21:29 ` Eli Zaretskii @ 2014-10-31 23:50 ` E Sabof 2014-11-01 8:15 ` Eli Zaretskii [not found] ` <mailman.12491.1414799441.1147.help-gnu-emacs@gnu.org> 1 sibling, 1 reply; 14+ messages in thread From: E Sabof @ 2014-10-31 23:50 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs I was thinking something more ABC. Maybe more generic, like things you'd find by searching for "emacs lisp basics". Or perhaps something like https://www.youtube.com/watch?v=XjKtkEMUYGc, which shows from start to finish how to achieve (perhaps not even very useful) results using very easy Emacs Lisp. Evgeni Eli Zaretskii <eliz@gnu.org> writes: >> From: E Sabof <esabof@gmail.com> >> Date: Fri, 31 Oct 2014 21:07:02 +0000 >> >> It occurred to me, that while there are plenty of resources on Emacs Lisp, I never came across a blog post/tutorial about anything C. I have doubts on whether making C changes could become a popular hobby, but I think that if someone wrote some sort of introduction, it would be a large step towards increasing the number of potential contributors. > > We put that information in comments. Look up the large commentary > blocks, such as the one at the beginning of xdisp.c. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Emacs C tutorial 2014-10-31 23:50 ` E Sabof @ 2014-11-01 8:15 ` Eli Zaretskii 2014-11-01 8:53 ` E Sabof 0 siblings, 1 reply; 14+ messages in thread From: Eli Zaretskii @ 2014-11-01 8:15 UTC (permalink / raw) To: help-gnu-emacs > From: E Sabof <esabof@gmail.com> > Cc: help-gnu-emacs@gnu.org > Date: Fri, 31 Oct 2014 23:50:16 +0000 > > I was thinking something more ABC. Maybe more generic, like things you'd find by searching for "emacs lisp basics". Or perhaps something like https://www.youtube.com/watch?v=XjKtkEMUYGc, which shows from start to finish how to achieve (perhaps not even very useful) results using very easy Emacs Lisp. The equivalent for C would be to show how to edit some .c file, and re-build Emacs. Is that what you are looking for? ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Emacs C tutorial 2014-11-01 8:15 ` Eli Zaretskii @ 2014-11-01 8:53 ` E Sabof 2014-11-01 9:22 ` Eli Zaretskii 0 siblings, 1 reply; 14+ messages in thread From: E Sabof @ 2014-11-01 8:53 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs Eli Zaretskii <eliz@gnu.org> writes: > The equivalent for C would be to show how to edit some .c file, and > re-build Emacs. Is that what you are looking for? Yes what to look for when re-building could be interesting (at least to someone who's not a C developer). An idea could be adding some external library, doing some processing, and exposing it to Elisp. Evgeni ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Emacs C tutorial 2014-11-01 8:53 ` E Sabof @ 2014-11-01 9:22 ` Eli Zaretskii 2014-11-01 16:59 ` Aurélien Aptel 0 siblings, 1 reply; 14+ messages in thread From: Eli Zaretskii @ 2014-11-01 9:22 UTC (permalink / raw) To: help-gnu-emacs > From: E Sabof <esabof@gmail.com> > Cc: help-gnu-emacs@gnu.org > Date: Sat, 01 Nov 2014 08:53:17 +0000 > > > The equivalent for C would be to show how to edit some .c file, and > > re-build Emacs. Is that what you are looking for? > > Yes what to look for when re-building could be interesting (at least to someone who's not a C developer). There's nothing interesting to look at, it's just a "normal" build of a C program. The compiler echoes its command lines to compile each file, then the linker its link command line, then you see the list of preloaded Lisp files. That's it. > An idea could be adding some external library, doing some processing, and exposing it to Elisp. Since Emacs currently doesn't support any kind of FFI, this is hardly a tutorial-level stuff. And even if/when we do have FFI, adding a library through it will require good knowledge of how Emacs represents data types internally, so that must be mastered first. Anyway, historically, the best person to add documentation of such kind is someone who is interested in it. Consider this an invitation to start such a tutorial. TIA. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Emacs C tutorial 2014-11-01 9:22 ` Eli Zaretskii @ 2014-11-01 16:59 ` Aurélien Aptel 2014-11-01 17:15 ` Eli Zaretskii 2014-11-01 18:22 ` E Sabof 0 siblings, 2 replies; 14+ messages in thread From: Aurélien Aptel @ 2014-11-01 16:59 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs@gnu.org I started a Hacker Guide to the C code base on the wiki a while ago. If anyone feels like contributing: http://www.emacswiki.org/emacs/HackerGuide I know Eli gave some feedback when I posted it on the list but I can't find his email... ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Emacs C tutorial 2014-11-01 16:59 ` Aurélien Aptel @ 2014-11-01 17:15 ` Eli Zaretskii 2014-11-01 18:22 ` E Sabof 1 sibling, 0 replies; 14+ messages in thread From: Eli Zaretskii @ 2014-11-01 17:15 UTC (permalink / raw) To: help-gnu-emacs > Date: Sat, 1 Nov 2014 17:59:24 +0100 > From: Aurélien Aptel <aurelien.aptel+emacs@gmail.com> > Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org> > > http://www.emacswiki.org/emacs/HackerGuide > > I know Eli gave some feedback when I posted it on the list but I can't > find his email... http://lists.gnu.org/archive/html/help-gnu-emacs/2013-03/msg00006.html ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Emacs C tutorial 2014-11-01 16:59 ` Aurélien Aptel 2014-11-01 17:15 ` Eli Zaretskii @ 2014-11-01 18:22 ` E Sabof 1 sibling, 0 replies; 14+ messages in thread From: E Sabof @ 2014-11-01 18:22 UTC (permalink / raw) To: Aurélien Aptel; +Cc: help-gnu-emacs@gnu.org Aurélien Aptel <aurelien.aptel+emacs@gmail.com> writes: > I started a Hacker Guide to the C code base on the wiki a while ago. > If anyone feels like contributing: > > http://www.emacswiki.org/emacs/HackerGuide This gets pretty close to what I was thinking about. Evgeni ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <mailman.12491.1414799441.1147.help-gnu-emacs@gnu.org>]
* Re: Emacs C tutorial [not found] ` <mailman.12491.1414799441.1147.help-gnu-emacs@gnu.org> @ 2014-11-01 5:17 ` Barry Margolin 0 siblings, 0 replies; 14+ messages in thread From: Barry Margolin @ 2014-11-01 5:17 UTC (permalink / raw) To: help-gnu-emacs In article <mailman.12491.1414799441.1147.help-gnu-emacs@gnu.org>, E Sabof <esabof@gmail.com> wrote: > I was thinking something more ABC. Maybe more generic, like things you'd find > by searching for "emacs lisp basics". Or perhaps something like > https://www.youtube.com/watch?v=XjKtkEMUYGc, which shows from start to finish > how to achieve (perhaps not even very useful) results using very easy Emacs > Lisp. The difference is that almost every Emacs user is likely to make use of Emacs Lisp, to customize their .emacs. This became a little less necessary when M-x customize was created, but still most power Emacs users write some code for things that can't be done by setting variables. Very few Emacs users ever touch the C code. Emacs has been designed so that this mostly just contains basic primitives, not many high-level operations that would need customization. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Emacs C tutorial 2014-10-31 21:07 Emacs C tutorial E Sabof 2014-10-31 21:29 ` Eli Zaretskii @ 2014-11-01 15:25 ` Bruno Félix Rezende Ribeiro 2014-11-01 18:20 ` E Sabof [not found] ` <mailman.12540.1414866048.1147.help-gnu-emacs@gnu.org> 1 sibling, 2 replies; 14+ messages in thread From: Bruno Félix Rezende Ribeiro @ 2014-11-01 15:25 UTC (permalink / raw) To: E Sabof; +Cc: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 689 bytes --] E Sabof wrote: > It occurred to me, that while there are plenty of resources on Emacs > Lisp, I never came across a blog post/tutorial about anything C. I > have doubts on whether making C changes could become a popular hobby, > but I think that if someone wrote some sort of introduction, it would > be a large step towards increasing the number of potential > contributors. > > Evgeni What about (info "(elisp) GNU Emacs Internals")? -- ,= ,-_-. =. Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 473 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Emacs C tutorial 2014-11-01 15:25 ` Bruno Félix Rezende Ribeiro @ 2014-11-01 18:20 ` E Sabof [not found] ` <mailman.12540.1414866048.1147.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 14+ messages in thread From: E Sabof @ 2014-11-01 18:20 UTC (permalink / raw) To: Bruno Félix Rezende Ribeiro; +Cc: help-gnu-emacs Bruno Félix Rezende Ribeiro <oitofelix@gnu.org> writes: > E Sabof wrote: >> It occurred to me, that while there are plenty of resources on Emacs >> Lisp, I never came across a blog post/tutorial about anything C. I >> have doubts on whether making C changes could become a popular hobby, >> but I think that if someone wrote some sort of introduction, it would >> be a large step towards increasing the number of potential >> contributors. >> >> Evgeni > > What about (info "(elisp) GNU Emacs Internals")? It is good material, but I was thinking of something more practical. Evgeni ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <mailman.12540.1414866048.1147.help-gnu-emacs@gnu.org>]
* Re: Emacs C tutorial [not found] ` <mailman.12540.1414866048.1147.help-gnu-emacs@gnu.org> @ 2014-11-07 3:18 ` Emanuel Berg 2014-11-07 7:01 ` Eli Zaretskii 0 siblings, 1 reply; 14+ messages in thread From: Emanuel Berg @ 2014-11-07 3:18 UTC (permalink / raw) To: help-gnu-emacs E Sabof <esabof@gmail.com> writes: > It is good material, but I was thinking of something > more practical. The thing is, C isn't very practical. :) C is great as a system language. It is very low-level (at least nowadays one would say), very fast, very straightforward... And this role, it has in Emacs as well! You should use C for stuff that will be implemented once and then seldom if ever touched. It is not for interactive trial-and-error fine-tuning. Lisp on the other hand is highly interactive, not at all kernel-like and "you should never notice it" bu-hoo arms down. In a way, Lisp is much more playful and alive. And that's why it is much closer to the user and why so many users, eh, use it! So for users to improve Emacs by means of its C is like burning down the house to kill the rats. Not to mention, in practice that would be very unpleasant, having to recompile for every tiny change. For this reason alone, if I were to use C for each change and extention to the Emacs UX, that would make me not do it... -- underground experts united ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Emacs C tutorial 2014-11-07 3:18 ` Emanuel Berg @ 2014-11-07 7:01 ` Eli Zaretskii 0 siblings, 0 replies; 14+ messages in thread From: Eli Zaretskii @ 2014-11-07 7:01 UTC (permalink / raw) To: help-gnu-emacs > From: Emanuel Berg <embe8573@student.uu.se> > Date: Fri, 07 Nov 2014 04:18:42 +0100 > > The thing is, C isn't very practical. :) > > C is great as a system language. It is very low-level > (at least nowadays one would say), very fast, very > straightforward... And this role, it has in Emacs as > well! > > You should use C for stuff that will be implemented > once and then seldom if ever touched. It is not for > interactive trial-and-error fine-tuning. > > Lisp on the other hand is highly interactive, not at > all kernel-like and "you should never notice it" > bu-hoo arms down. In a way, Lisp is much more playful > and alive. And that's why it is much closer to the > user and why so many users, eh, use it! > > So for users to improve Emacs by means of its C is > like burning down the house to kill the rats. Not to > mention, in practice that would be very unpleasant, > having to recompile for every tiny change. For this > reason alone, if I were to use C for each change and > extention to the Emacs UX, that would make me not do > it... Even if all of the above were correct and accurate (which it isn't), someone who wants to add or modify Emacs primitives written in C must work on that level. So knowing where to find the information the OP talked about is still important, and, yes, very practical. ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2014-11-07 7:01 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-10-31 21:07 Emacs C tutorial E Sabof 2014-10-31 21:29 ` Eli Zaretskii 2014-10-31 23:50 ` E Sabof 2014-11-01 8:15 ` Eli Zaretskii 2014-11-01 8:53 ` E Sabof 2014-11-01 9:22 ` Eli Zaretskii 2014-11-01 16:59 ` Aurélien Aptel 2014-11-01 17:15 ` Eli Zaretskii 2014-11-01 18:22 ` E Sabof [not found] ` <mailman.12491.1414799441.1147.help-gnu-emacs@gnu.org> 2014-11-01 5:17 ` Barry Margolin 2014-11-01 15:25 ` Bruno Félix Rezende Ribeiro 2014-11-01 18:20 ` E Sabof [not found] ` <mailman.12540.1414866048.1147.help-gnu-emacs@gnu.org> 2014-11-07 3:18 ` Emanuel Berg 2014-11-07 7:01 ` Eli Zaretskii
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).