* Fire defun by typing keyword @ 2013-10-30 2:38 Emanuel Berg 2013-10-30 3:05 ` Stefan Monnier ` (2 more replies) 0 siblings, 3 replies; 28+ messages in thread From: Emanuel Berg @ 2013-10-30 2:38 UTC (permalink / raw) To: help-gnu-emacs Is it possible to fire off a defun by typing a specific keyword? Sort of like the way abbrev works? For example, I have a defun like this (defun date () (interactive) (insert-shell-command "my_date") ) where "my_date" is a script to format output from /bin/date. Now, my idea is to hook it to a keyword, say "thedate". Again, it would work just as abbrev, only instead of a table lookup and replace, it would trigger a defun. -- Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu underground experts united: http://user.it.uu.se/~embe8573 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-10-30 2:38 Fire defun by typing keyword Emanuel Berg @ 2013-10-30 3:05 ` Stefan Monnier 2013-10-30 3:23 ` Kevin Rodgers [not found] ` <mailman.4950.1383102623.10748.help-gnu-emacs@gnu.org> 2 siblings, 0 replies; 28+ messages in thread From: Stefan Monnier @ 2013-10-30 3:05 UTC (permalink / raw) To: help-gnu-emacs > Again, it would work just as abbrev, only instead of a > table lookup and replace, it would trigger a defun. An abbrev can have a "hook", which is indeed a function that gets called after inserting the expansion. So, you can do the above with an abbrev like ("mydate" "" date) -- Stefan ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-10-30 2:38 Fire defun by typing keyword Emanuel Berg 2013-10-30 3:05 ` Stefan Monnier @ 2013-10-30 3:23 ` Kevin Rodgers [not found] ` <mailman.4950.1383102623.10748.help-gnu-emacs@gnu.org> 2 siblings, 0 replies; 28+ messages in thread From: Kevin Rodgers @ 2013-10-30 3:23 UTC (permalink / raw) To: help-gnu-emacs On 10/29/13 8:38 PM, Emanuel Berg wrote: > Is it possible to fire off a defun by typing a specific > keyword? Sort of like the way abbrev works? > > For example, I have a defun like this > > (defun date () > (interactive) > (insert-shell-command "my_date") ) > > where "my_date" is a script to format output from > /bin/date. > > Now, my idea is to hook it to a keyword, say "thedate". > > Again, it would work just as abbrev, only instead of a > table lookup and replace, it would trigger a defun. I'd start with `C-h f abbrev-expand-functions' -- Kevin Rodgers Denver, Colorado, USA ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <mailman.4950.1383102623.10748.help-gnu-emacs@gnu.org>]
* Re: Fire defun by typing keyword [not found] ` <mailman.4950.1383102623.10748.help-gnu-emacs@gnu.org> @ 2013-11-01 18:58 ` Emanuel Berg 2013-11-05 2:50 ` Emanuel Berg 1 sibling, 0 replies; 28+ messages in thread From: Emanuel Berg @ 2013-11-01 18:58 UTC (permalink / raw) To: help-gnu-emacs Stefan Monnier <monnier@iro.umontreal.ca> writes: >> Again, it would work just as abbrev, only instead of >> a table lookup and replace, it would trigger a defun. > > An abbrev can have a "hook", which is indeed a > function that gets called after inserting the > expansion. So, you can do the above with an abbrev > like > > ("mydate" "" date) Cool! I took a break from "dead-serious hacking" a couple of days and solved this problem with the help of the idle timer you told me about earlier. This "solution" is not one I would recommend to anyone, but it was interesting to see that the idle timer indeed worked exactly as expected. (defun word-to-defun (word) (if (string= word "thedate") (progn (backward-kill-word 1) (date)) )) (defun read-last-word () (save-excursion (backward-word) (string-make-multibyte (thing-at-point 'word)) )) (defun read-trigger-last-word () (interactive) (word-to-defun (read-last-word)) ) (run-with-idle-timer 1 t 'read-trigger-last-word) -- Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu underground experts united: http://user.it.uu.se/~embe8573 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword [not found] ` <mailman.4950.1383102623.10748.help-gnu-emacs@gnu.org> 2013-11-01 18:58 ` Emanuel Berg @ 2013-11-05 2:50 ` Emanuel Berg 2013-11-05 21:12 ` Kai Großjohann [not found] ` <mailman.5372.1383685981.10748.help-gnu-emacs@gnu.org> 1 sibling, 2 replies; 28+ messages in thread From: Emanuel Berg @ 2013-11-05 2:50 UTC (permalink / raw) To: help-gnu-emacs Stefan Monnier <monnier@iro.umontreal.ca> writes: >> Again, it would work just as abbrev, only instead of >> a table lookup and replace, it would trigger a defun. > > An abbrev can have a "hook", which is indeed a > function that gets called after inserting the > expansion. So, you can do the above with an abbrev > like > > ("mydate" "" date) Yes, I can confirm that this works. Setup as just another abbrev (so abbrev mode must be enabled). Also, it is dynamic in the sense that `date' doesn't have to be defined at the time the abbrev is setup; also, if date is changed, this is immediately reflected the next time you type "mydate". So it is the same old super-dynamic dynamigth that you expect from (almost) all Elisping. But, apart from inserting the date, I don't know what to do with this newfound input method. That's always the case with my great ideas, I only find but a few use cases for each... -- Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu underground experts united: http://user.it.uu.se/~embe8573 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-05 2:50 ` Emanuel Berg @ 2013-11-05 21:12 ` Kai Großjohann [not found] ` <mailman.5372.1383685981.10748.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 28+ messages in thread From: Kai Großjohann @ 2013-11-05 21:12 UTC (permalink / raw) To: Emanuel Berg; +Cc: help-gnu-emacs Emanuel Berg wrote: > > But, apart from inserting the date, I don't know what to > do with this newfound input method. That's always the > case with my great ideas, I only find but a few use > cases for each... You could enter the appropriate greeting for the time of day: Good morning, Good afternoon, etc. for (int i=0; i<10; i++) { _ } You could create an abbrev that reads a type (int), a variable (i), an initial value (0), a final value (10), and then produces the above, where _ indicates the position of the cursor. You could create an abbrev that sends the mail your are writing :-) Just some thoughts. Kai ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <mailman.5372.1383685981.10748.help-gnu-emacs@gnu.org>]
* Re: Fire defun by typing keyword [not found] ` <mailman.5372.1383685981.10748.help-gnu-emacs@gnu.org> @ 2013-11-05 22:38 ` Emanuel Berg 2013-11-06 3:37 ` Rustom Mody ` (2 more replies) 0 siblings, 3 replies; 28+ messages in thread From: Emanuel Berg @ 2013-11-05 22:38 UTC (permalink / raw) To: help-gnu-emacs Kai Großjohann <kai.grossjohann@gmx.net> writes: > for (int i=0; i<10; i++) { > _ > } > > You could create an abbrev that reads a type (int), a > variable (i), an initial value (0), a final value > (10), and then produces the above, where _ indicates > the position of the cursor. Wow! I actually had that exact same thought a couple of years ago: http://unix.stackexchange.com/questions/71599 Back then I thought there was basically no thinking at all to programming, it was just a matter of finger habits, eye-hand coordination, eye-brain interpretation (as opposed to the crude "reading"), etc., all physical in one way or another. Typing and everything should be so fast so it could "keep up" with the thinking (which was trivial in a pleasant, not boring, sense). While I still think this aspect is grossly overlooked, I don't think it is "all about that" anymore. I certainly have the time to write a for loop now and then without my mind beaming away in some other direction, hopelessly lost forever after. But it is an amazing thought - imagine to have an entire programming language coded anew like that, with every construct just a short abbrev away. It would make for "parametric" programming if there ever was one. -- Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu underground experts united: http://user.it.uu.se/~embe8573 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-05 22:38 ` Emanuel Berg @ 2013-11-06 3:37 ` Rustom Mody 2013-11-06 22:32 ` Emanuel Berg 2013-11-09 22:26 ` Kai Großjohann [not found] ` <mailman.5668.1384036032.10748.help-gnu-emacs@gnu.org> 2 siblings, 1 reply; 28+ messages in thread From: Rustom Mody @ 2013-11-06 3:37 UTC (permalink / raw) To: help-gnu-emacs On Wednesday, November 6, 2013 4:08:14 AM UTC+5:30, Emanuel Berg wrote: > Kai Großjohann writes: > > for (int i=0; i<10; i++) { > > _ > > } > > You could create an abbrev that reads a type (int), a > > variable (i), an initial value (0), a final value > > (10), and then produces the above, where _ indicates > > the position of the cursor. > Wow! I actually had that exact same thought a couple of > years ago: > http://unix.stackexchange.com/questions/71599 > Back then I thought there was basically no thinking at > all to programming, it was just a matter of finger > habits, eye-hand coordination, eye-brain interpretation > (as opposed to the crude "reading"), etc., all physical > in one way or another. Typing and everything should be > so fast so it could "keep up" with the thinking (which > was trivial in a pleasant, not boring, sense). > While I still think this aspect is grossly overlooked, I > don't think it is "all about that" anymore. I certainly > have the time to write a for loop now and then without > my mind beaming away in some other direction, hopelessly > lost forever after. > But it is an amazing thought - imagine to have an entire > programming language coded anew like that, with every > construct just a short abbrev away. It would make for > "parametric" programming if there ever was one. Well APL was conceived on that basis: every important/core concept was a keystroke away. And Iverson won the Turing award for that: http://www.jdl.ac.cn/turing/pdf/p444-iverson.pdf Modernized version Warning dizziness ahead: http://aplwiki.com/FinnAplIdiomLibrary ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-06 3:37 ` Rustom Mody @ 2013-11-06 22:32 ` Emanuel Berg 2013-11-07 1:16 ` Rustom Mody 0 siblings, 1 reply; 28+ messages in thread From: Emanuel Berg @ 2013-11-06 22:32 UTC (permalink / raw) To: help-gnu-emacs Rustom Mody <rustompmody@gmail.com> writes: > Well APL was conceived on that basis: every > important/core concept was a keystroke away. Cool, never heard of APL! > And Iverson won the Turing award for that: > http://www.jdl.ac.cn/turing/pdf/p444-iverson.pdf Ha ha ha, so now you know who that award really belongs to :D Thanks, get back to you when I've read that article. -- Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu underground experts united: http://user.it.uu.se/~embe8573 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-06 22:32 ` Emanuel Berg @ 2013-11-07 1:16 ` Rustom Mody 2013-11-07 12:07 ` Alan Schmitt 0 siblings, 1 reply; 28+ messages in thread From: Rustom Mody @ 2013-11-07 1:16 UTC (permalink / raw) To: help-gnu-emacs On Thursday, November 7, 2013 4:02:55 AM UTC+5:30, Emanuel Berg wrote: > Rustom Mody writes: > > Well APL was conceived on that basis: every > > important/core concept was a keystroke away. > Cool, never heard of APL! > > And Iverson won the Turing award for that: > > http://www.jdl.ac.cn/turing/pdf/p444-iverson.pdf > Ha ha ha, so now you know who that award really belongs > to :D > Thanks, get back to you when I've read that article. BTW Gnu-Apl has been recently released http://www.gnu.org/software/apl/ Is fun to have at your side and try out the Iverson paper examples Only issue is the keyboard: the site suggests an xmodmap solution -- makes emacs practically unusable. However on modern X-windows something like shell command $ setxkbmap -layout "us,apl" -variant ",sax" -option "grp:alt_shift_toggle" will let you input apl I dont expect you can use it without X!! ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-07 1:16 ` Rustom Mody @ 2013-11-07 12:07 ` Alan Schmitt 2013-11-07 14:31 ` Peter Dyballa ` (2 more replies) 0 siblings, 3 replies; 28+ messages in thread From: Alan Schmitt @ 2013-11-07 12:07 UTC (permalink / raw) To: help-gnu-emacs Rustom Mody <rustompmody@gmail.com> writes: > Only issue is the keyboard: the site suggests an xmodmap solution -- makes emacs > practically unusable. > > However on modern X-windows something like shell command > $ setxkbmap -layout "us,apl" -variant ",sax" -option "grp:alt_shift_toggle" > will let you input apl > > I dont expect you can use it without X!! Is there way to try it with emacs on OS X? Thanks, Alan ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-07 12:07 ` Alan Schmitt @ 2013-11-07 14:31 ` Peter Dyballa 2013-11-07 14:47 ` Rustom Mody [not found] ` <mailman.5488.1383834710.10748.help-gnu-emacs@gnu.org> 2 siblings, 0 replies; 28+ messages in thread From: Peter Dyballa @ 2013-11-07 14:31 UTC (permalink / raw) To: Alan Schmitt; +Cc: help-gnu-emacs Am 07.11.2013 um 13:07 schrieb Alan Schmitt: > Is there way to try it with emacs on OS X? Sure! Just install X11 or XQuartz (http://xquartz.macosforge.org/landing/)! -- Greetings Pete Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. – Albert Einstein ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-07 12:07 ` Alan Schmitt 2013-11-07 14:31 ` Peter Dyballa @ 2013-11-07 14:47 ` Rustom Mody 2013-11-07 16:21 ` Peter Dyballa ` (2 more replies) [not found] ` <mailman.5488.1383834710.10748.help-gnu-emacs@gnu.org> 2 siblings, 3 replies; 28+ messages in thread From: Rustom Mody @ 2013-11-07 14:47 UTC (permalink / raw) To: help-gnu-emacs On Thursday, November 7, 2013 5:37:42 PM UTC+5:30, Alan Schmitt wrote: > Rustom Mody writes: > > Only issue is the keyboard: the site suggests an xmodmap solution -- makes emacs > > practically unusable. > > However on modern X-windows something like shell command > > $ setxkbmap -layout "us,apl" -variant ",sax" -option "grp:alt_shift_toggle" > > will let you input apl > > I dont expect you can use it without X!! > Is there way to try it with emacs on OS X? Hi Alan I believe that it compiles on Unix-ish systems so it should run on mac. I have of course no first hand experience. The other question is about input method. I see http://forums.macrumors.com/showthread.php?t=1468922 that setxkbmap has disappeared from mac :-( So we will need to look for an emacs (rather than window-system) solution. As it happens I asked on emacs-devel list http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00365.html and a long thread evolved in which among others David de la Harpe Golden gave a first cut at an emacs input method http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00513.html Its really in hacked-up stage as of now and I am travelling so cant see it through to something more polished for a few weeks. Still if it works please let me know If I were trying, Id try to first start apl in emacs with something like eshell. Then use David's input method. Rusi ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-07 14:47 ` Rustom Mody @ 2013-11-07 16:21 ` Peter Dyballa [not found] ` <mailman.5498.1383841291.10748.help-gnu-emacs@gnu.org> 2013-11-08 12:14 ` Alan Schmitt 2 siblings, 0 replies; 28+ messages in thread From: Peter Dyballa @ 2013-11-07 16:21 UTC (permalink / raw) To: Rustom Mody; +Cc: help-gnu-emacs Am 07.11.2013 um 15:47 schrieb Rustom Mody: > I see > http://forums.macrumors.com/showthread.php?t=1468922 > that setxkbmap has disappeared from mac :-( Nonsense. X11 was never part of Mac OS X. It was always an add-on, like Xcode. Once X11 is installed, setxkbmap is installed. (And of course it has no effect on Mac OS X applications.) -- Greetings Pete Some day we may discover how to make magnets that can point in any direction. ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <mailman.5498.1383841291.10748.help-gnu-emacs@gnu.org>]
* Re: Fire defun by typing keyword [not found] ` <mailman.5498.1383841291.10748.help-gnu-emacs@gnu.org> @ 2013-11-07 16:31 ` Rustom Mody 2013-11-07 19:49 ` Emanuel Berg 0 siblings, 1 reply; 28+ messages in thread From: Rustom Mody @ 2013-11-07 16:31 UTC (permalink / raw) To: help-gnu-emacs On Thursday, November 7, 2013 9:51:14 PM UTC+5:30, Peter Dyballa wrote: > Am 07.11.2013 um 15:47 schrieb Rustom Mody: > > I see > > http://forums.macrumors.com/showthread.php?t=1468922 > > that setxkbmap has disappeared from mac :-( > Nonsense. X11 was never part of Mac OS X. It was always an add-on, > like Xcode. Once X11 is installed, setxkbmap is installed. (And of > course it has no effect on Mac OS X applications.) Im sure you are right :-) (Having never used a mac) ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-07 16:31 ` Rustom Mody @ 2013-11-07 19:49 ` Emanuel Berg 2013-11-08 2:27 ` Rustom Mody 0 siblings, 1 reply; 28+ messages in thread From: Emanuel Berg @ 2013-11-07 19:49 UTC (permalink / raw) To: help-gnu-emacs Rustom Mody <rustompmody@gmail.com> writes: > (Having never used a mac) Isn't there a rule against this kind of shameless boasting? :) Soon, perhaps there wont be X on Linux boxes either. I heard Ubuntu is working on their own window system, and Kubuntu (which uses KDE instead of GNOME) is switching to Wayland. I hope Debian sticks with X. If they don't, I'm forking the distro into Xebian, while also rewriting xterm, urxvt, xclip, etc., into xebian-terminal, xebian-screenshot, and so on. Not because there is anything wrong with those applications, but I have to do it anyway to enforce consistent "look and feel". You better believe it! -- Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu underground experts united: http://user.it.uu.se/~embe8573 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-07 19:49 ` Emanuel Berg @ 2013-11-08 2:27 ` Rustom Mody 2013-11-08 9:45 ` Peter Dyballa ` (2 more replies) 0 siblings, 3 replies; 28+ messages in thread From: Rustom Mody @ 2013-11-08 2:27 UTC (permalink / raw) To: help-gnu-emacs On Friday, November 8, 2013 1:19:44 AM UTC+5:30, Emanuel Berg wrote: > Rustom Mody writes: > > (Having never used a mac) > Isn't there a rule against this kind of shameless > boasting? :) > Soon, perhaps there wont be X on Linux boxes either. I > heard Ubuntu is working on their own window system, and > Kubuntu (which uses KDE instead of GNOME) is switching > to Wayland. > I hope Debian sticks with X. If they don't, I'm forking > the distro into Xebian, while also rewriting xterm, > urxvt, xclip, etc., into xebian-terminal, > xebian-screenshot, and so on. Not because there is > anything wrong with those applications, but I have to do > it anyway to enforce consistent "look and feel". You > better believe it! Yeah I am (one of the many) fed up with gnome trying to look-n-feel like a cheap button phone without the buttons. Been using xfce on my debian box and whatever ubuntu gives there -- not satisfactory... As I wrote in http://blog.languager.org/2011/02/cs-education-is-fat-and-weak-2.html all desktops are converging to mac/windows and since windows-8 is more half-assed than ever, all the other players are scrambling to 'keep-up'! ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-08 2:27 ` Rustom Mody @ 2013-11-08 9:45 ` Peter Dyballa 2013-11-09 1:14 ` Emanuel Berg 2013-11-11 17:50 ` Emanuel Berg 2 siblings, 0 replies; 28+ messages in thread From: Peter Dyballa @ 2013-11-08 9:45 UTC (permalink / raw) To: Rustom Mody; +Cc: help-gnu-emacs Am 08.11.2013 um 03:27 schrieb Rustom Mody: > Been using xfce on my debian box and whatever ubuntu gives there -- > not satisfactory... Maybe it's time to unearth OpenLook/OpenWindows from Solaris… (version 1.0 appeared 1989, OpenWindows 3.x and OpenLook Virtual Windows Manager five or six years later were very useful stuff) -- Greetings Pete Claiming that the Macintosh is inferior to Windows because most people use Windows, is like saying that all other restaurants serve food that is inferior to McDonald's. ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-08 2:27 ` Rustom Mody 2013-11-08 9:45 ` Peter Dyballa @ 2013-11-09 1:14 ` Emanuel Berg 2013-11-09 21:24 ` John Bokma 2013-11-11 17:50 ` Emanuel Berg 2 siblings, 1 reply; 28+ messages in thread From: Emanuel Berg @ 2013-11-09 1:14 UTC (permalink / raw) To: help-gnu-emacs Rustom Mody <rustompmody@gmail.com> writes: > Yeah I am (one of the many) fed up with gnome trying > to look-n-feel like a cheap button phone without the > buttons. I once went to the bathhouse, and in the associated shop, I asked the shopkeeper what the difference was between the expensive and the cheap goggles. Withouth hesitating an instant, the answer came from the holser: "The wrapping." Programming should be about applications that don't exist, but, if they *did* exist, would make for better lives for more people. But, if, for example, you are very much into e-mailing - and there are already so many e-mail clients! That's OK, because none of them is perfect. It is just easy to put your efforts into one of them, namely the one you yourself use. "Look and feel" is just the final polish on the top surface. If configuration is possible, as it always is for any good application, it could be left entirely to the user. "Look and feel" should *never* be the purpose or reason for programming - of many unpleasant words to describe that, "absurd" is the most pleasant. Reinvention of the (blue) wheel is reinvention of the (red) wheel. -- Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu underground experts united: http://user.it.uu.se/~embe8573 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-09 1:14 ` Emanuel Berg @ 2013-11-09 21:24 ` John Bokma 2013-11-09 21:59 ` Emanuel Berg 2013-11-09 22:14 ` Emanuel Berg 0 siblings, 2 replies; 28+ messages in thread From: John Bokma @ 2013-11-09 21:24 UTC (permalink / raw) To: help-gnu-emacs Emanuel Berg <embe8573@student.uu.se> writes: > "Look and feel" is just the final polish on the top > surface. You're severely mistaken. > If configuration is possible, as it always is > for any good application, it could be left entirely to > the user. A lot of users, including me, prefer that things mostly out-of-the box. I work as a programmer and really prefer to avoid having to tinker each and every piece of software (or hardware) I use. > "Look and feel" should *never* be the purpose or reason > for programming Same mistake as above. There is a huge difference between a well-researched user interface and one tinkered together by a programmer to scratch his own itch. I've read quite a bit about UI design and I still make mistakes because I think too often like a programmer (or: from a testing point of view). Luckily, my customers have no problem correcting me, and often I think: "Should've thought about that". A good user interface is one that doesn't need to be configured most of the time and doesn't get in the way. That requires research and testing. And of course such a user interface needs to be programmed. Maybe you mean "eye candy"? Still, an application that looks good gives me pleasure to work with. So in my case I prefer some eye candy. For example, "syntax highlighting" was, in my experience, frowned upon years back; eyecandy, pointless, etc. But I prefer it, and I think it makes me more productive. > - of many unpleasant words to describe > that, "absurd" is the most pleasant. Reinvention of the > (blue) wheel is reinvention of the (red) wheel. Our eyes are more sensitive to red, so a red wheel is more visible in the dark. Also, you don't want to drive in a car with the "reinvented" wheels of the 18th century, let alone with the original invention... -- John Bokma j3b Blog: http://johnbokma.com/ Perl Consultancy: http://castleamber.com/ Perl for books: http://johnbokma.com/perl/help-in-exchange-for-books.html ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-09 21:24 ` John Bokma @ 2013-11-09 21:59 ` Emanuel Berg 2013-11-09 22:14 ` Emanuel Berg 1 sibling, 0 replies; 28+ messages in thread From: Emanuel Berg @ 2013-11-09 21:59 UTC (permalink / raw) To: help-gnu-emacs John Bokma <john@castleamber.com> writes: >> "Look and feel" is just the final polish on the top >> surface. > > You're severely mistaken. Yes, out of context the above might be read as "UIs aren't important". Of course they are. They are very important. That is not the point. The point is if you are into UI design and programming, you should do that by designing and programming... <drumroll> UIs! - *not* do it all over (including all underlying software below the UI), time and again! To what degree that actually happens I don't know but with all those <system>-terminal, <system>-screenshot, etc., around, one is getting suspicious to say the least. >> If configuration is possible, as it always is for any >> good application, it could be left entirely to the >> user. > > A lot of users, including me, prefer that things mostly > out-of-the box. I think that is the completely wrong attitude. It doesn't matter what state you prefer your software to be in, if it is incomplete, you must fix it, if it has shortcomings (as you experience it), you must tweak, configure, etc. Just using stuff as they are, discarding them when they don't meet your expectations, and so on, will *never* bring about any deep knowledge. This will make you a consumer, not a producer. >> "Look and feel" should *never* be the purpose or >> reason for programming > > Same mistake as above. There is a huge difference > between a well-researched user interface and one > tinkered together by a programmer to scratch his own > itch. I've read quite a bit about UI design and I still > make mistakes because I think too often like a > programmer (or: from a testing point of view). No, it is you who are making a mistake. I didn't spent hundreds of hours configuring my applications because I thought interfaces weren't of value. On the contrary, if it weren't for Emacs' configurability, and my own humble efforts, I wouldn't be able to use a computer *at all*. A couple of years ago, my eyes and fingers were in such a state I thought about giving up computing altogether. The Linux VTs, zsh, Emacs, Gnus, and again my own humble efforts changed all that. So I know of the value of interfaces, and that is not what I'm speaking of above. > A good user interface is one that doesn't need to be > configured You should always and everywhere be able to configure *everything*! > Maybe you mean "eye candy"? Still, an application that > looks good gives me pleasure to work with. So in my > case I prefer some eye candy. For example, "syntax > highlighting" was, in my experience, frowned upon years > back; eyecandy, pointless, etc. But I prefer it, and I > think it makes me more productive. Yes, again you misread me (that interfaces aren't important). If you are interested in UI programming, check out my home page [1] and especially my degree work (the chapter "Editor Looks") and the home page on Emacs and Gnus. There are lots of screenshots, too. >> - of many unpleasant words to describe that, "absurd" >> is the most pleasant. Reinvention of the (blue) wheel >> is reinvention of the (red) wheel. > > Our eyes are more sensitive to red, so a red wheel is > more visible in the dark. Yes, that's beside the point, but it is interesting nonetheless. In the degree paper I mentioned, there is a discussion what emotional things colors do communicate (in the context of syntax highlighting). If you read it, please mail me... > Also, you don't want to drive in a car with the > "reinvented" wheels of the 18th century, let alone > with the original invention... That is not reinvention, that is *development*: extending, adapting... I'm not opposed to that, at all. [1] http://user.it.uu.se/~embe8573 -- Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu underground experts united: http://user.it.uu.se/~embe8573 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-09 21:24 ` John Bokma 2013-11-09 21:59 ` Emanuel Berg @ 2013-11-09 22:14 ` Emanuel Berg 1 sibling, 0 replies; 28+ messages in thread From: Emanuel Berg @ 2013-11-09 22:14 UTC (permalink / raw) To: help-gnu-emacs John Bokma <john@castleamber.com> writes: > Maybe you mean "eye candy"? Still, an application that > looks good gives me pleasure to work with. So in my > case I prefer some eye candy. For example, "syntax > highlighting" was, in my experience, frowned upon > years back; eyecandy, pointless, etc. But I prefer it, > and I think it makes me more productive. I forgot to mention, if you are into syntax highlighting, you might check out this project - a major mode for the fpscalc tool - as font lock was a big part of that project. http://user.it.uu.se/~embe8573/fps/ -- Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu underground experts united: http://user.it.uu.se/~embe8573 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-08 2:27 ` Rustom Mody 2013-11-08 9:45 ` Peter Dyballa 2013-11-09 1:14 ` Emanuel Berg @ 2013-11-11 17:50 ` Emanuel Berg 2 siblings, 0 replies; 28+ messages in thread From: Emanuel Berg @ 2013-11-11 17:50 UTC (permalink / raw) To: help-gnu-emacs I went to the public library today and read the current issue of "Linux Magazine", in which there is a small piece on this. Apparently, the Ubuntu people have been working on Mir as a replacement for X, mostly because they need it for the smartphone version of Ubuntu. For the laptop version, they will include a script that assesses the hardware: if it is deemed sufficient, Mir will run, and otherwise, X will run (so X will still be provided, and with XMir in between). So, in all fairness, Ubuntu did *not* drop X because of "look and feel" hysteria. They dropped it because it wasn't good enough for smartphones, and then they wanted it on laptops as well to get consistency. This is of course only mildly better than my first assessment. I don't think the other distros eventually will use Mir, so it would still have been best to just improve X (or Wayland), of course in collaboration with Debian, and all other distros that uses X (and indeed even the BSD people, perhaps!). -- Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu underground experts united: http://user.it.uu.se/~embe8573 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-07 14:47 ` Rustom Mody 2013-11-07 16:21 ` Peter Dyballa [not found] ` <mailman.5498.1383841291.10748.help-gnu-emacs@gnu.org> @ 2013-11-08 12:14 ` Alan Schmitt 2 siblings, 0 replies; 28+ messages in thread From: Alan Schmitt @ 2013-11-08 12:14 UTC (permalink / raw) To: help-gnu-emacs Hi Rusi, Rustom Mody <rustompmody@gmail.com> writes: > I believe that it compiles on Unix-ish systems so it should run on > mac. I have of course no first hand experience. It seems to be working, and there is a request to put it in homebrew, so it should be very easy to install soon (https://github.com/mxcl/homebrew/issues/24046). > The other question is about input method. > I see > http://forums.macrumors.com/showthread.php?t=1468922 > that setxkbmap has disappeared from mac :-( > > So we will need to look for an emacs (rather than window-system) > solution. This would be my preferred approach. > As it happens I asked on emacs-devel list > http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00365.html > and a long thread evolved in which among others David de la Harpe > Golden gave a first cut at an emacs input method > http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00513.html > > Its really in hacked-up stage as of now and I am travelling so cant > see it through to something more polished for a few weeks. > > Still if it works please let me know > If I were trying, Id try to first start apl in emacs with something > like eshell. Then use David's input method. I will have a look at this thread, and if things work I will report here. Thanks again, Alan ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <mailman.5488.1383834710.10748.help-gnu-emacs@gnu.org>]
* Re: Fire defun by typing keyword [not found] ` <mailman.5488.1383834710.10748.help-gnu-emacs@gnu.org> @ 2013-11-08 12:13 ` Alan Schmitt 2013-11-08 12:30 ` Peter Dyballa 0 siblings, 1 reply; 28+ messages in thread From: Alan Schmitt @ 2013-11-08 12:13 UTC (permalink / raw) To: help-gnu-emacs Peter Dyballa <Peter_Dyballa@Web.DE> writes: > Am 07.11.2013 um 13:07 schrieb Alan Schmitt: > >> Is there way to try it with emacs on OS X? > > Sure! Just install X11 or XQuartz (http://xquartz.macosforge.org/landing/)! Thank you for the suggestion (I already have xquartz installed), but I'd rather not install and launch a second version of emacs. Alan ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-08 12:13 ` Alan Schmitt @ 2013-11-08 12:30 ` Peter Dyballa 0 siblings, 0 replies; 28+ messages in thread From: Peter Dyballa @ 2013-11-08 12:30 UTC (permalink / raw) To: Alan Schmitt; +Cc: help-gnu-emacs Am 08.11.2013 um 13:13 schrieb Alan Schmitt: > I'd rather not install and launch a second version of emacs. Which first and second version do you mean? I myself also like a third (NS variant) and a fourth ("AppKit" variant) version… (And never use what Apple put into Mac OS X under the name "emacs".) -- Greetings Pete We have to expect it, otherwise we would be surprised. ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: Fire defun by typing keyword 2013-11-05 22:38 ` Emanuel Berg 2013-11-06 3:37 ` Rustom Mody @ 2013-11-09 22:26 ` Kai Großjohann [not found] ` <mailman.5668.1384036032.10748.help-gnu-emacs@gnu.org> 2 siblings, 0 replies; 28+ messages in thread From: Kai Großjohann @ 2013-11-09 22:26 UTC (permalink / raw) To: Emanuel Berg; +Cc: help-gnu-emacs Emanuel Berg wrote: > > While I still think this aspect is grossly overlooked, I > don't think it is "all about that" anymore. I certainly > have the time to write a for loop now and then without > my mind beaming away in some other direction, hopelessly > lost forever after. I don't think it's "grossly overlooked". In Java, verbosity is so bad that a lot of tooling has sprung up around helping with this kind of thing. I guess every Java "IDE" allows you to add a member to a class and then auto-create getter and setter for it. And Eclipse at least has this template for a for loop that does just what I suggested. I think it's a matter of the amount of verbosity. In Java, it never bothered me to write a for loop, so I didn't use IDE support for that. But I've used IDE support more than once for getters and setters :-( I wonder how the Ada community approaches this aspect. Kai ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <mailman.5668.1384036032.10748.help-gnu-emacs@gnu.org>]
* Re: Fire defun by typing keyword [not found] ` <mailman.5668.1384036032.10748.help-gnu-emacs@gnu.org> @ 2013-11-09 23:45 ` Emanuel Berg 0 siblings, 0 replies; 28+ messages in thread From: Emanuel Berg @ 2013-11-09 23:45 UTC (permalink / raw) To: help-gnu-emacs Kai Großjohann <kai.grossjohann@gmx.net> writes: >> While I still think this aspect is grossly >> overlooked, I don't think it is "all about that" >> anymore. I certainly have the time to write a for >> loop now and then without my mind beaming away in >> some other direction, hopelessly lost forever after. > > I don't think it's "grossly overlooked". In Java, > verbosity is so bad that a lot of tooling has sprung > up around helping with this kind of thing. I guess > every Java "IDE" allows you to add a member to a class > and then auto-create getter and setter for it. And > Eclipse at least has this template for a for loop that > does just what I suggested. No, I know there are so called "template facilities" like yasnippet and the like. But such expansion of course is only a (possible) part of the whole physical dimension to programming. I think it is *very* overlooked. I have read countless of books on programming telling me the workings of the for loop, how many bits an integer allocates in memory, all that stuff. But I have very seldom read about eyes, fingers (muscle memory/finger habits), posture, colors, faces, window positioning, shortcuts (*short* shortcuts: few letters, and not having to reach, around the "asdf" and "jkl;" keys), never "looking down", using the US layout, using the compose key, using Emacs, (not) using the mouse, not having a blinking cursor, mastering cursor movements, all that stuff. Not to mention the *mental* stuff, that is interwoven in all of that (and get "produced" in turn) in a complicated way, but also brings its own herbs to the druid's potion. And then the cycle begins anew (I don't pretend to understand it but I understand it enough to know it is there - that it is never mentioned is because it is *difficult*). I think that the mental-physical side is a *huge* part of being productive with the computer, and I am surprised they don't write about it. In a book on carpentry, they tell you how to hold the hammer. In a book on boxing, they tell you how to stand before you punch. But in books on programming, you get the for loop and everything else you have to figure out yourself. Not good! -- Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu underground experts united: http://user.it.uu.se/~embe8573 ^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2013-11-11 17:50 UTC | newest] Thread overview: 28+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-10-30 2:38 Fire defun by typing keyword Emanuel Berg 2013-10-30 3:05 ` Stefan Monnier 2013-10-30 3:23 ` Kevin Rodgers [not found] ` <mailman.4950.1383102623.10748.help-gnu-emacs@gnu.org> 2013-11-01 18:58 ` Emanuel Berg 2013-11-05 2:50 ` Emanuel Berg 2013-11-05 21:12 ` Kai Großjohann [not found] ` <mailman.5372.1383685981.10748.help-gnu-emacs@gnu.org> 2013-11-05 22:38 ` Emanuel Berg 2013-11-06 3:37 ` Rustom Mody 2013-11-06 22:32 ` Emanuel Berg 2013-11-07 1:16 ` Rustom Mody 2013-11-07 12:07 ` Alan Schmitt 2013-11-07 14:31 ` Peter Dyballa 2013-11-07 14:47 ` Rustom Mody 2013-11-07 16:21 ` Peter Dyballa [not found] ` <mailman.5498.1383841291.10748.help-gnu-emacs@gnu.org> 2013-11-07 16:31 ` Rustom Mody 2013-11-07 19:49 ` Emanuel Berg 2013-11-08 2:27 ` Rustom Mody 2013-11-08 9:45 ` Peter Dyballa 2013-11-09 1:14 ` Emanuel Berg 2013-11-09 21:24 ` John Bokma 2013-11-09 21:59 ` Emanuel Berg 2013-11-09 22:14 ` Emanuel Berg 2013-11-11 17:50 ` Emanuel Berg 2013-11-08 12:14 ` Alan Schmitt [not found] ` <mailman.5488.1383834710.10748.help-gnu-emacs@gnu.org> 2013-11-08 12:13 ` Alan Schmitt 2013-11-08 12:30 ` Peter Dyballa 2013-11-09 22:26 ` Kai Großjohann [not found] ` <mailman.5668.1384036032.10748.help-gnu-emacs@gnu.org> 2013-11-09 23:45 ` Emanuel Berg
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).