* Re: emacs/lisp ChangeLog vc-bzr.el [not found] <E1NHNcZ-0005Lr-Ph@cvs.savannah.gnu.org> @ 2009-12-06 23:12 ` Óscar Fuentes 2009-12-06 23:27 ` Chong Yidong 2009-12-07 7:01 ` David Kastrup 0 siblings, 2 replies; 4+ messages in thread From: Óscar Fuentes @ 2009-12-06 23:12 UTC (permalink / raw) To: Chong Yidong; +Cc: emacs-devel > CVSROOT: /sources/emacs > Module name: emacs > Changes by: Chong Yidong <cyd> 09/12/06 20:22:19 > > Modified files: > lisp : ChangeLog vc-bzr.el > [snip] > Index: vc-bzr.el > =================================================================== > RCS file: /sources/emacs/emacs/lisp/vc-bzr.el,v > retrieving revision 1.89 > retrieving revision 1.90 > diff -u -b -r1.89 -r1.90 > --- vc-bzr.el 3 Dec 2009 08:53:06 -0000 1.89 > +++ vc-bzr.el 6 Dec 2009 20:22:19 -0000 1.90 > @@ -572,8 +572,12 @@ > (inhibit-read-only t)) > (setq string (substring string (match-end 0))) > (unless tag > - (setq tag (propertize rev 'help-echo (concat "Author: " author > - ", date: " date) > + (setq tag > + (propertize > + (concat rev " " (substring author 0 7)) > + 'help-echo (format "Revision: %d, author: %s, date: %s" > + (string-to-number rev) > + author date) > 'mouse-face 'highlight)) > (puthash key tag table)) > (goto-char (process-mark proc)) That change fails on (substring author 0 7) when `author' contains less than 7 characters: error in process filter: concat: Args out of range: "oscar", 0, 7 error in process filter: Args out of range: "oscar", 0, 7 I tried with a kludge: (substring (concat author " ") 0 7) and that fixed the problem. I tried this variation too: (substring author 0 (min 7 (length author))) but the result is not so pretty, as the "author" column has no fixed width anymore. -- Óscar ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs/lisp ChangeLog vc-bzr.el 2009-12-06 23:12 ` emacs/lisp ChangeLog vc-bzr.el Óscar Fuentes @ 2009-12-06 23:27 ` Chong Yidong 2009-12-07 7:01 ` David Kastrup 1 sibling, 0 replies; 4+ messages in thread From: Chong Yidong @ 2009-12-06 23:27 UTC (permalink / raw) To: Óscar Fuentes; +Cc: emacs-devel Óscar Fuentes <ofv@wanadoo.es> writes: > That change fails on (substring author 0 7) when `author' contains less > than 7 characters: > > error in process filter: concat: Args out of range: "oscar", 0, 7 > error in process filter: Args out of range: "oscar", 0, 7 > > I tried with a kludge: > > (substring (concat author " ") 0 7) > > and that fixed the problem. Thanks, I checked that into CVS. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs/lisp ChangeLog vc-bzr.el 2009-12-06 23:12 ` emacs/lisp ChangeLog vc-bzr.el Óscar Fuentes 2009-12-06 23:27 ` Chong Yidong @ 2009-12-07 7:01 ` David Kastrup 2009-12-07 16:18 ` Chong Yidong 1 sibling, 1 reply; 4+ messages in thread From: David Kastrup @ 2009-12-07 7:01 UTC (permalink / raw) To: emacs-devel Óscar Fuentes <ofv@wanadoo.es> writes: > That change fails on (substring author 0 7) when `author' contains less > than 7 characters: > > error in process filter: concat: Args out of range: "oscar", 0, 7 > error in process filter: Args out of range: "oscar", 0, 7 > > I tried with a kludge: > > (substring (concat author " ") 0 7) > > and that fixed the problem. (format "%-7.7s" author) If you put all the rest into the same format string as well, this might look less kludgy. -- David Kastrup ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs/lisp ChangeLog vc-bzr.el 2009-12-07 7:01 ` David Kastrup @ 2009-12-07 16:18 ` Chong Yidong 0 siblings, 0 replies; 4+ messages in thread From: Chong Yidong @ 2009-12-07 16:18 UTC (permalink / raw) To: David Kastrup; +Cc: emacs-devel David Kastrup <dak@gnu.org> writes: > Óscar Fuentes <ofv@wanadoo.es> writes: > >> That change fails on (substring author 0 7) when `author' contains less >> than 7 characters: >> >> error in process filter: concat: Args out of range: "oscar", 0, 7 >> error in process filter: Args out of range: "oscar", 0, 7 >> >> I tried with a kludge: >> >> (substring (concat author " ") 0 7) >> >> and that fixed the problem. > > (format "%-7.7s" author) > > If you put all the rest into the same format string as well, this might > look less kludgy. Good point, thanks. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-07 16:18 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <E1NHNcZ-0005Lr-Ph@cvs.savannah.gnu.org> 2009-12-06 23:12 ` emacs/lisp ChangeLog vc-bzr.el Óscar Fuentes 2009-12-06 23:27 ` Chong Yidong 2009-12-07 7:01 ` David Kastrup 2009-12-07 16:18 ` Chong Yidong
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).