Re: Q: ox-md does not translate link searches to #bookmarks in markdown [9.4.4 (release_9.4.4 @ /snap/emacs/current/usr/share/emacs/27.2/lisp/org/)]
Phil Marneweck writes: > Hi > > Is this by design? > > I expected to following > > [[file:some-file.org::#some-heading][some text]] > > to translate to this > > [some text](some-file.md#some-heading) > > So in org-md-link I would have thought that the default would be more like > this > > (t (if (not desc) (format "<%s>" path) > (format "[%s](%s%s)" desc path (or (org-element-property :search-option > link) "" > > You would of course have to do some sanity checking on search-option to just > take care of id versus headline searches etc. > I'm not sure if this is by design or because of limitations in the markdown dialect used by org mode (see http://daringfireball.net/projects/markdown) or just a bug. My suspicion, after a quick review of the markdown syntax on the daringfireball site is that search links are not supported. This is one of those examples of the problems arising from a format type which does not have a specification. There are numerous different markdown dialects and org had to select one. Problem is, everyone gets use to a particular dialect and then is often disappointed when org's dialect does not match their expectations. One reason we also have the github flavoured markdown exporter. -- Tim Cross
Re: The fate of ditaa.jar (9.4.5.)
TEC writes: > Tim Cross writes: > >> I also had to install textlive, plantuml, graphviz, taskjuggler, >> ledger, sqlite and many other things. > > Perhaps it would be good to make a table of > > | software | needed for | package name | download page | > > and/or prompt users when an action requiring another executable is > undertaken if it isn't found. Useful additional documentation, assuming it can be maintained, is rarely a bad idea. A table on worg (with maybe a link in the manual) which lists all the org (and contrib) features, external dependencies and link to canonical source would probably be a good idea. I find it hard to remember how I worked out all the dependencies as I adopted org as it was so long ago and I was already a heavy user of many of the tools/dependencies of org. This makes it challenging to appreciate how hard it can be for someone knew to org. On the other hand, if we make it overly easy/automatic, we run the risk of disempowering the user and making them more dependent on assistance from others. Finding the right balance between informative and concise is a challenge. If we provide too much information, it can be overwhelming, too little and it can be confusing. I find it harder to write good documentation than good code! -- Tim Cross
Re: [bug?] changed behaviour of column view
Hi Eric, Thanks for those, that is very helpful. Unfortunately, as you can see in the attached screenshot from my system, I can't replicate your issue. Could you send me the output of your confirmation, maybe from M-x org-submit-bug-report? By chance, would the file you're activating column view on be part of org-agenda? Based on your description I doubt it, but just wanted to make sure. Cheers, Nick On Tue, May 11, 2021, at 09:45, Eric S Fraga wrote: > Hi Nicholas, > > On Tuesday, 11 May 2021 at 09:32, Nicholas Savage wrote: > > When I activate column view on Headline, it applies the columns on all > > of the subheadings. Are you not seeing the same thing, or is your use > > case different? Do you have some sort of minimal file you could > > provide to show the bug? > > If point is on the first (top-level) headline, I only get the column > view for that headline and not the subheadings. > > Attached is a small(-ish) file along with a screenshot of what I get. > > The org file consists of the first three papers in a bibliography I have > (which has hundreds of entries). > > If you are seeing something different, maybe I have some setting that is > causing problems although I cannot imagine what that would be. Advice > would be welcome! > > Thank you, > eric > > -- > : Eric S Fraga via Emacs 28.0.50, Org release_9.4.5-534-g8f03cd > > Attachments: > * screendump-20210511144322.png > * bug.org
Re: ob-sql is not finding psql when using direnv+guix
Dear Malcom On Mon, May 10, 2021, at 13:14, Cook, Malcolm wrote: > >I am using Guix with direnv. > > What is your shell? > My shell is bash, originally I was using zsh and I thought that was the problem, so I switched to bash and still not working. > How/When do you "hook direnv into your shell" (https://direnv.net/)? > In the .profile file, at login. > > In an specific folder I am installing and using psql and postgresql using > > direnv+guix as follows: > >use guix --manifest=cdpp-manifest.scm > > > >export PGUSER=food_user > >export PGPASSWORD=some_password > >export PGDATABASE=food > > > >layout postgres > > When are you doing this? > > a) in the "specific folder"'s .envrc file? > b) in an org-mode shell block that you execute prior to the sql block? > c) ?? > > Option (a) > You seem to be following [Per\-project > Postgres](https://jamey.thesharps.us/2019/05/29/per-project-postgres/) > but with guix instead of nix. Nice. > Yep, great post. direnv + guix change the way I develop software, do data science and write lectures and papers. > If you enter the directory and then call emacs, earthing should just > work, no changes neede. > It works for almost everything (sql-buffers, python buffers, etc), except for org-babel sql blocks. I am using EXWM, so emacs is always on. > If you want to tell emacs to adopt the environment established by a > .direnv, you probably want [direnv integration for > emacs\.](https://github.com/wbolster/emacs-direnv) > emacs-direnv was my first choice, but then I changed to envrc (https://github.com/purcell/envrc) . In both I got the error. > I've got to try this! > > Cheers > Please tell me how that works for you Thanks - A > > > > > >Where cdpp-manifest.scm contains the following: > > > >(specifications->manifest > >'("python" > > "python-pandas" > > "python-numpy" > > "python-flask" > > "python-graphene" > > "postgresql" > > "jupyter")) > > > >I am able to use sql-mode and run queries against the database, in order to > >achieve that I am using the following .dir-locals.el > > > >;;; Directory Local Variables > >;;; For more information see (info "(emacs) Directory Variables") > > > > > >((nil . > > ((projectile-project-test-cmd . "pytest --color=no --failed-first > >--maxfail=5"))) > >(python-mode . > > ((python-shell-buffer-name . "Python [CDPP-Inspecciones]"))) > > > >(org-mode . ( > > (indent-tabs-mode . nil) > > (org-src-preserve-indentation . t) > > (org-footnote-auto-adjust . t) > > (org-footnote-auto-label . t) > > (ispell-local-dictionary . "spanish") > > (org-export-allow-bind-keywords . t) > > (org-footnote-define-inline . nil) > > (org-footnote-section . "Footnotes"))) > > > >(sql-mode . ((sql-connection-alist . ((mydb > > (sql-product 'postgres) > > (sql-database "mydb") > > (sql-user "db_user") > > (sql-server (expand-file-name > >".direnv/postgres")) > > (sql-port 5432) > > ) > > ) > > > >But If I try to use an sql org-babel block > > > >#+begin_src sql > >select 1; > >#+end_src > > > >(I am setting the connection variables in a PROPERTY) > > > >I get the error: `psql is not found` > > > > > >I was reading about the variable sql-postgres-program, so if I set the > >following in dir-locals.el > > > >(sql-postgres-program . > >"/gnu/store/f2v92bkx2vfzmkl14qxj3hlmby4dy9x0-profile/bin/psql") > > > >It works (note that psql ONLY lives inside the profile defined by > >direnv+guix), but I don't like the idea of hardcode the path. > > > >Is there a better way? > > > >Ideally I will expect that the org block will read it from the environment, > >but is not working. > > > >Thanks in advance > > >
Re: The fate of ditaa.jar (9.4.5.)
Arthur Miller writes: > Christopher Dimech writes: > >> If org-mode wants to support ditaa, it is a requirement to inform the user >> how to >> get the software and install it. Moving into into a separate repository >> without >> appropriately telling the user introduces the problem that users will miss >> out >> on free software that they would otherwise have used. Using org should not >> be made >> more difficult than it already is. >> > Another problem I didn't mention in previous replay, is that user can > have wrong (outdated) version of Java installed on his/her machine which > might not be compatible with ditaa version org mode ships, which may > introduce further questions and problems. IMO I think it is better to > leave out 3rd party applications and let users install those on their > own. The old version should just keep working. It requires a Java older than Java 8, and Java 8 is available everywhere. For the new releases that is less clear, since ditaa is adding Clojure. I would bundle the old version to keep old documents working (I do not want org-mode to be volatile software[1] that breaks existing documents with an update), but notify the user that a new version exists. [1]: https://stevelosh.com/blog/2012/04/volatile-software/ Best wishes, Arne -- Unpolitisch sein heißt politisch sein ohne es zu merken signature.asc Description: PGP signature
Re: The fate of ditaa.jar (9.4.5.)
TEC writes: > Tim Cross writes: > >> I also had to install textlive, plantuml, graphviz, taskjuggler, >> ledger, sqlite and many other things. > > Perhaps it would be good to make a table of > > | software | needed for | package name | download page | Maybe there could be a hash table where one can register a function with a software, similar to how autoload works. but instead of specifying file where function is found, we could specify a sotware/package name and a link to download/main page? Maybe function level is too granular, maybe per feature level? > and/or prompt users when an action requiring another executable is > undertaken if it isn't found. > I think it's a good idea. A minor mode that can be turned off for experienced users but on by default and maybe with knowledge where to find the required software, i.e. a link that Emacs can open in default a web browser for the user. Ultimate would be to offer a download, but considering all the distros and possible dead links, probably better to go just for download or main page.
Re: The fate of ditaa.jar (9.4.5.)
"Dr. Arne Babenhauserheide" writes: > Java is available in my distribution, ditaa is not. Removing ditaa from > org means that I have to do manual installation and configuration, while > with ditaa bundled, org-mode can simply note that I need java installed. > >> If we bundle it, we also need to ensure it is updated if/when new jar >> versions are released. > > We can do that, but we don’t have to. As long as the bundled jar works, > it is much better than no jar. Depending on what users have on their machines it may not work on their machine. The bundled jar might ask for a version of Java runtime that users does not have. There is no guarantee that every distribution comes with java bundled either. For you it maybe works, for someone else it might generate 1001 question and confusion when things don't work.
Re: The fate of ditaa.jar (9.4.5.)
Christopher Dimech writes: > If org-mode wants to support ditaa, it is a requirement to inform the user > how to > get the software and install it. Moving into into a separate repository > without > appropriately telling the user introduces the problem that users will miss out > on free software that they would otherwise have used. Using org should not > be made > more difficult than it already is. > Another problem I didn't mention in previous replay, is that user can have wrong (outdated) version of Java installed on his/her machine which might not be compatible with ditaa version org mode ships, which may introduce further questions and problems. IMO I think it is better to leave out 3rd party applications and let users install those on their own. >> Sent: Tuesday, May 11, 2021 at 8:49 AM >> From: "Arthur Miller" >> To: "Dr. Arne Babenhauserheide" >> Cc: emacs-orgmode@gnu.org >> Subject: Re: The fate of ditaa.jar (9.4.5.) >> >> "Dr. Arne Babenhauserheide" writes: >> >> > Russell Adams writes: >> > >> >> On Mon, May 10, 2021 at 02:28:57PM +0300, Jarmo Hurri wrote: >> >>> I pulled the latest master and noticed that contrib has been moved into >> >>> a separate repository. I also cloned this contrib repository, but can >> >>> not find the file >> >>> >> >>> scripts/ditaa.jar >> >>> >> >>> in the repo. In fact, there is no directory scripts in the repo. >> >> >> >> I actually never considered this might be packaged with Org. I always >> >> thought I had to install it separately, like my Latex distribution or >> >> PlantUML. >> > >> > Bundling this makes ditaa code blocks just work. Otherwise they won’t >> > work on every org-install. >> >> The user still needs a Java runtime installed on his/her compute, so >> bundling ditaa.jar gives no guarantee at all that ditaa blocks will just >> work on every org-install. >> >> Instead a less informaed user, not used to run java programs, might be >> left with a not working application that fails silently or to the user >> incomprehensible error message. >> >> Better to point user to ditaa's sources/releases and inform it is >> optional with org. That way non-informed user will have to install java >> and ditaa and will at least have an idea where to look when things go wrong. >> >>
Re: [PATCH] Possibility of using alternative separators in macros
Here is the fixed version of the patch. Best regards, Juan Manuel Eric S Fraga writes: > Could you create a new patch so I can try this easily? > > gracias, > eric >From 4aae61c3600fba136dfa101d54011c0aef9169a3 Mon Sep 17 00:00:00 2001 From: Juan Manuel Macías Date: Tue, 11 May 2021 18:41:34 +0200 Subject: [PATCH] Alternative args separator for replacement macros --- lisp/org-element.el | 11 --- lisp/org-macro.el | 9 + 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index a675bf512..da4035689 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -3279,21 +3279,25 @@ CONTENTS is the contents of the object, or nil." "Parse macro at point, if any. When at a macro, return a list whose car is `macro' and cdr -a plist with `:key', `:args', `:begin', `:end', `:value' and +a plist with `:key', `:args', `:begin', `:end', `:sep', `:value' and `:post-blank' as keywords. Otherwise, return nil. Assume point is at the macro." (save-excursion -(when (looking-at "{{{\\([a-zA-Z][-a-zA-Z0-9_]*\\)\\((\\([^\000]*?\\))\\)?}}}") - (let ((begin (point)) +(when (looking-at "{{{\\([a-zA-Z][-a-zA-Z0-9_]*\\)\\([^a-zA-Z\s()]*[^-a-zA-Z0-9_\s]*\\)\\((\\([^\000]*?\\))\\)?}}}") + (let* ((begin (point)) (key (downcase (match-string-no-properties 1))) (value (match-string-no-properties 0)) (post-blank (progn (goto-char (match-end 0)) (skip-chars-forward " \t"))) (end (point)) +(sep (if (not (equal (match-string-no-properties 2) "")) + (match-string-no-properties 2) + ",")) (args (pcase (match-string-no-properties 3) (`nil nil) (a (org-macro-extract-arguments +sep (replace-regexp-in-string "[ \t\r\n]+" " " (org-trim a))) (list 'macro @@ -3302,6 +3306,7 @@ Assume point is at the macro." :args args :begin begin :end end +:sep sep :post-blank post-blank)) (defun org-element-macro-interpreter (macro _) diff --git a/lisp/org-macro.el b/lisp/org-macro.el index 29c403658..e047cd78e 100644 --- a/lisp/org-macro.el +++ b/lisp/org-macro.el @@ -294,20 +294,21 @@ of `org-macro-extract-arguments'." nil t) s) -(defun org-macro-extract-arguments (s) +(defun org-macro-extract-arguments (sep s) "Extract macro arguments from string S. S is a string containing comma separated values properly escaped. -Return a list of arguments, as strings. This is the opposite of +SEP is the character used to separate arguments. Return a list +of arguments, as strings. This is the opposite of `org-macro-escape-arguments'." ;; Do not use `org-split-string' since empty strings are ;; meaningful here. (split-string (replace-regexp-in-string -"\\(*\\)," +(format "\\(*\\)%s" sep) (lambda (str) (let ((len (length (match-string 1 str (concat (make-string (/ len 2) ?\\) - (if (zerop (mod len 2)) "\000" "," + (if (zerop (mod len 2)) "\000" (format "%s" sep) s nil t) "\000")) -- 2.26.0
Re: [PATCH] Possibility of using alternative separators in macros
Hello Eric, It's a typo, sorry: I forgot, when I made the patch, to add the asterisk to the `let' expression in org-element-macro-parser, therefore the `sep' variable was not recognized. The correct function is: (defun org-element-macro-parser () "Parse macro at point, if any. When at a macro, return a list whose car is `macro' and cdr a plist with `:key', `:args', `:begin', `:end', `:value', `:sep' and `:post-blank' as keywords. Otherwise, return nil. Assume point is at the macro." (save-excursion (when (looking-at "{{{\\([a-zA-Z][-a-zA-Z0-9_]*\\)\\([^a-zA-Z\s()]?[^-a-zA-Z0-9_\s]?\\)\\((\\([^\000]*?\\))\\)?}}}") (let* ((begin (point)) ;; < missing asterisk :-( (key (downcase (match-string-no-properties 1))) (value (match-string-no-properties 0)) (post-blank (progn (goto-char (match-end 0)) (skip-chars-forward " \t"))) (end (point)) (sep (if (not (equal (match-string-no-properties 2) "")) (match-string-no-properties 2) ",")) (args (pcase (match-string-no-properties 4) (`nil nil) (a (org-macro-extract-arguments sep (replace-regexp-in-string "[ \t\r\n]+" " " (org-trim a))) (list 'macro (list :key key :value value :args args :begin begin :end end :sep sep :post-blank post-blank)) Eric S Fraga writes: > Hello Juan, > > On Friday, 30 Apr 2021 at 13:26, Juan Manuel Macías wrote: >> Hi all, >> >> I would like to propose (patch attached) the possibility of using an >> alternate character for separate arguments in replacement macros, >> following a suggestion from Nicolas Goaziou in this (closed) thread: >> https://orgmode.org/list/87o8ead42u@nicolasgoaziou.fr/ > > I finally got around to trying this out, applying the patch just now to > the latest org from the git repository. I get the following when I try > to export: > > Debugger entered--Lisp error: (void-variable sep) > org-element-macro-parser() > org-element--object-lex((bold code entity export-snippet > footnote-reference inline-babel-call inline-src-block italic > line-break latex-fragment link macro radio-target statistics-cookie > strike-through subscript superscript target timestamp underline > verbatim)) > org-element-context() > org-macro-replace-all((("date" . "") ("title" . "The title") > ("email" . "") ("author" . "Professor Eric S Fraga") ("lastchange" . > "2021.03.31 15:03") ("calc" . > "@@latex:{\\color{green!50!black}\\texttt{ $1 }}@@") ("cite" . > "[[$2][@@latex:\\vfill\\Citation{$1}@@]]") ("overlay" . > "@@latex:\\begin{textblock}{$4}($2,$3)@@[[file:$1]]@...") ("parameter" > . "src_elisp[:results value raw :var $1=(esf/get-para...") ("constant" > closure (t) ( $1 _) (progn (message "Getting constant > %s" $1) (org-table-get-constant $1))) ("input-file" . "m.org") > ("modification-time" . #f(compiled-function (arg1 arg2 > _) #)) ("keyword" lambda (arg1 _) > (org-macro--find-keyword-value arg1)) ("n" lambda ( arg1 arg2 > _) (org-macro--counter-increment arg1 arg2)) ("property" lambda > (arg1 arg2 _) (org-macro--get-property arg1 arg2)) > ("time" lambda (arg1 _) (format-time-string arg1))) > ("DESCRIPTION" "KEYWORDS" "SUBTITLE" "DATE" "TITLE" "DATE" "AUTHOR")) > org-export-as(latex nil nil nil nil) > org-export-to-buffer(latex "*Org LATEX Export*" nil nil nil nil nil > #f(compiled-function () #)) > org-latex-export-as-latex(nil nil nil nil) > org-export-dispatch(nil) > funcall-interactively(org-export-dispatch nil) > command-execute(org-export-dispatch)
Q: ox-md does not translate link searches to #bookmarks in markdown [9.4.4 (release_9.4.4 @ /snap/emacs/current/usr/share/emacs/27.2/lisp/org/)]
Hi Is this by design? I expected to following [[file:some-file.org::#some-heading][some text]] to translate to this [some text](some-file.md#some-heading) So in org-md-link I would have thought that the default would be more like this (t (if (not desc) (format "<%s>" path) (format "[%s](%s%s)" desc path (or (org-element-property :search-option link) "" You would of course have to do some sanity checking on search-option to just take care of id versus headline searches etc. Regards Phil
Re: Bug: specifying end time of date as +0:20 [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/28.0.50/lisp/org/)]
Nicolas Goaziou writes: > Stephen Eglen writes: > >>> I solved this part on maint branch. >> >> Thank you! > > And I reverted it because the "fix" introduced other issues! I pushed another fix. *crossing fingers* Regards,
Re: Intervals that include day of the week recently causing error in org-agenda
Hello, Justin Silverman writes: > Until yesterday a time stamp of the following form was accepted and > didn't cause problems in org-agenda. > > <2021-04-29 Thu 10:35-11:50> > > However, as of a recent update (that I downloaded yesterday) I notice > that this causes an error > > org-duration-to-minutes: Invalid duration format: #("10:35-11:50" 0 11 > (fontified nil line-prefix #(" " 0 2 (face org-indent)) wrap-prefix > #(" " 0 2 (face org-indent)) org-category "cal-gmail")) > SPC ESC is undefined This was fixed earlier today. You may want to update Org. Regards, -- Nicolas Goaziou
Intervals that include day of the week recently causing error in org-agenda
First -- apologies if duplicate post (I tried to send email with M-X org-submit-bug-report but I don't think it sent and https://updates.orgmode.org/ gives 502 bad gateway so I am not sure I can even check if it sent) Until yesterday a time stamp of the following form was accepted and didn't cause problems in org-agenda. <2021-04-29 Thu 10:35-11:50> However, as of a recent update (that I downloaded yesterday) I notice that this causes an error org-duration-to-minutes: Invalid duration format: #("10:35-11:50" 0 11 (fontified nil line-prefix #(" " 0 2 (face org-indent)) wrap-prefix #(" " 0 2 (face org-indent)) org-category "cal-gmail")) SPC ESC is undefined What fixes this is if I remove the Weekday in the timestamp so it reads: <2021-04-29 10:35-11:50> I would say this is a bug with other libraries (that create timestamps with days of the week, but I notice that base org-mode creates these timestamps (e.g., with C-c C-d 2021-04-29 10:35-11:50 C-c C-c). In other words, if this is the correct new default behavior / formatting requirement for org-agenda then I would expect that the deadline/scheduled/timestamp entering function (sorry not sure of the correct name for things like C-c C-s and C-c C-d) would abide by this convention. That said, I would like the old way that was slightly less rigorous (e.g., allowing days of the week) as some other libraries (e.g., org-gcal) use that format. Thank you! Justin
Re: [bug?] changed behaviour of column view
Hi Nicholas, On Tuesday, 11 May 2021 at 09:32, Nicholas Savage wrote: > When I activate column view on Headline, it applies the columns on all > of the subheadings. Are you not seeing the same thing, or is your use > case different? Do you have some sort of minimal file you could > provide to show the bug? If point is on the first (top-level) headline, I only get the column view for that headline and not the subheadings. Attached is a small(-ish) file along with a screenshot of what I get. The org file consists of the first three papers in a bibliography I have (which has hundreds of entries). If you are seeing something different, maybe I have some setting that is causing problems although I cannot imagine what that would be. Advice would be welcome! Thank you, eric -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4.5-534-g8f03cd #+columns: %30CUSTOM_ID %60TITLE %40AUTHOR * All papers ** The {GNU} version of {T}he {C}ollaborative {I}nternational {D}ictionary of {E}nglish :ATTACH: :PROPERTIES: :TITLE:The {GNU} version of {T}he {C}ollaborative {I}nternational {D}ictionary of {E}nglish :BTYPE:misc :CUSTOM_ID: GCIDE :HOWPUBLISHED: Published on the Internet :NOTE: \url{ftp://ftp.gnu.org/gnu/gcide/} :Attachments: Powell-UnifiedFrameworkStochasticOptimization_Jan292018.pdf :ID: f29925d3-8466-4dd7-9843-31cd66ef885a :END: ** {An Evolutionary Algorithm Based on Minkowski Distance for Many-Objective Optimization} :PROPERTIES: :TITLE: {An Evolutionary Algorithm Based on Minkowski Distance for Many-Objective Optimization} :BTYPE: article :CUSTOM_ID: ISI:00047681112 :AUTHOR: Xu, Hang and Zeng, Wenhua and Zeng, Xiangxiang and Yen, Gary G. :JOURNAL:{IEEE TRANSACTIONS ON CYBERNETICS} :YEAR: {2019} :VOLUME: {49} :NUMBER: {11} :PAGES: {3968-3979} :MONTH: {NOV} :ABSTRACT: {The existing multiobjective evolutionary algorithms (EAs) based on nondominated sorting may encounter serious difficulties in tackling many-objective optimization problems (MaOPs), because the number of nondominated solutions increases exponentially with the number of objectives, leading to a severe loss of selection pressure. To address this problem, some existing many-objective EAs (MaOEAs) adopt Euclidean or Manhattan distance to estimate the convergence of each solution during the environmental selection process. Nevertheless, either Euclidean or Manhattan distance is a special case of Minkowski distance with the order P = 2 or P = 1, respectively. Thus, it is natural to adopt Minkowski distance for convergence estimation, in order to cover various types of Pareto fronts (PFs) with different concavity-convexity degrees. In this paper, a Minkowski distance-based EA is proposed to solve MaOPs. In the proposed algorithm, first, the concavity-convexity degree of the approximate PF, denoted by the value of P, is dynamically estimated. Subsequently, the Minkowski distance of order P is used to estimate the convergence of each solution. Finally, the optimal solutions are selected by a comprehensive method, based on both convergence and diversity. In the experiments, the proposed algorithm is compared with five state-of-the-art MaOEAs on some widely used benchmark problems. Moreover, the modified versions for two compared algorithms, integrated with the proposed P-estimation method and the Minkowski distance, are also designed and analyzed. Empirical results show that the proposed algorithm is very competitive against other MaOEAs for solving MaOPs, and two modified compared algorithms are generally more effective than their predecessors.} :PUBLISHER: {IEEE-INST ELECTRICAL ELECTRONICS ENGINEERS INC} :ADDRESS:{445 HOES LANE, PISCATAWAY, NJ 08855-4141 USA} :LANGUAGE: {English} :AFFILIATION: {Zeng, XX (Reprint Author), Xiamen Univ, Sch Informat Sci \& Engn, Xiamen 361005, Fujian, Peoples R China. Yen, GG (Reprint Author), Oklahoma State Univ, Sch Elect \& Comp Engn, Stillwater, OK 74078 USA. Xu, Hang, Putian Univ, Sch Informat Engn, Putian 351100, Peoples R China. Xu, Hang; Zeng, Wenhua, Xiamen Univ, Sch Software, Xiamen 361005, Fujian, Peoples R China. Zeng, Xiangxiang, Xiamen Univ, Sch Informat Sci \& Engn, Xiamen 361005, Fujian, Peoples R China. Yen, Gary G., Oklahoma State Univ, Sch Elect \& Comp Engn, Stillwater, OK 74078 USA.} :DOI:{10.1109/TCYB.2018.2856208} :ISSN: {2168-2267} :EISSN: {2168-2275} :KEYWORDS: {Concavity-convexity degree; convergence estimation; evolutionary algorithm (EA); many-objective optimization; Minkowski distance} :KEYWORDS-PLUS: {NONDOMINATED SORTING APPROACH; BOUNDARY INTERSECTION; SELECTION; PERFORMANCE; MOEA/D; CONVERGENCE; DIVERSITY; DOMINANCE} :RESEARCH-AREAS: {Automation \& Control Systems; Computer Science} :WEB-OF-SCIENCE-CATEGORIES: {Automation \& Control Systems; Computer Science, Artificial Intelligence; Computer Science, Cybernetics} :AUTHOR-EMAIL: {hangxu...@hotmail.com whz...@xmu.edu.cn xz...@xmu.edu.cn
Re: [bug?] changed behaviour of column view
I believe this would have been some of my commits. That change would not have been intended, so I believe this is a bug. I just tried it out, I have column view applied to something like this: * Headline ** subheading ** subheading ** subheading ** subheading When I activate column view on Headline, it applies the columns on all of the subheadings. Are you not seeing the same thing, or is your use case different? Do you have some sort of minimal file you could provide to show the bug? On Tue, May 11, 2021, at 09:24, Eric S Fraga wrote: > Hello all, > > Until recently, I was able to ask for a column view of a headline with > the column view being applied to each and all of the (visible) > subheadings. Now, I can only do either the top heading itself or > individual subheadings, not all of them. > > I note that there have been changes to org-colview.el in the past week > or two so maybe something has changed that affects this? Was the > previous behaviour wrong in some way? How do I get that behaviour back? > > Thank you, > eric > > -- > : Eric S Fraga via Emacs 28.0.50, Org release_9.4.5-534-g8f03cd > >
[bug?] changed behaviour of column view
Hello all, Until recently, I was able to ask for a column view of a headline with the column view being applied to each and all of the (visible) subheadings. Now, I can only do either the top heading itself or individual subheadings, not all of them. I note that there have been changes to org-colview.el in the past week or two so maybe something has changed that affects this? Was the previous behaviour wrong in some way? How do I get that behaviour back? Thank you, eric -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4.5-534-g8f03cd
Re: The fate of ditaa.jar (9.4.5.)
Tim Cross writes: > I also had to install textlive, plantuml, graphviz, taskjuggler, > ledger, sqlite and many other things. Perhaps it would be good to make a table of | software | needed for | package name | download page | and/or prompt users when an action requiring another executable is undertaken if it isn't found. -- Timothy
Re: [wip-cite-new] New natbib processor
Just to say that, for my simple use case(s), the latest version in wip-cite-new is working very well indeed! Thank you. -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4.5-400-gc88b58
Re: [PATCH 2/2] org-refile.el: Fix test case
On 09/05/2021 23:05, satotake wrote: * lisp/org-refile.el (org-refile-get-targets): Check `buffer-file-name' return value instead of `buffer-base-buffer'. To pass the related tests, we need to check `buffer-file-name'. Thank you for the patches. Maybe I have missed something, but it seems 2 patches are not logically independent, second one touches the same code to fix regression in tests. If so, could you, please, squash both patches into a single one (e.g. using git rebase --interactive)? I hope, it will help to review the change and to avoid confusion with several versions of second patch in 2 threads. Code around has at least one more problem: questionable behavior in the case of indirect buffers (e.g. C-x 4 c). Refile targets cache, when enabled, is not reused for indirect buffer. On 09/05/2021 21:47, satotake wrote: I often use org-mode for note-taking and so on. Sometimes, I would like to refile the headings in the scratch to other org files while I am writing. Have you tried org-capture? https://orgmode.org/manual/Capture.html https://sachachua.com/blog/2015/02/learn-take-notes-efficiently-org-mode/#unnumbered-3 I think, existence of this feature is the reason why this bug was remaining unnoticed.
Re: [bug] C-u org-update-statitics-cookies errors out with "Non-existent agenda file" if current file isn't saved
Thanks for the bug report, I can confirm this is happening. I encountered a similar bug where org-agenda-prepare-buffers was causing the same issue when the file hadn't been saved to disk, and I agree that the solution looks good. I've formatted this into a patch and attached it. Might be worth considering too if this is happening anywhere else too, since this is the second time it has come up. On 5/11/21 6:07 AM, m...@kisaragi-hiu.com wrote: * Reproduction 1. emacs -Q 2. C-x C-f /tmp/new.org RET 3. Type anything 4. Type C-u C-c # (C-u org-update-statistics-cookies) to try to update all statistics cookies in the buffer 5. Notice the "Non-existent agenda file /tmp/new.org." error. This doesn't happen if the file already exists. I first saw this reported in this reddit thread: https://www.reddit.com/r/orgmode/comments/n9g1yf/is_this_a_bug_with_orgupdatestatisticcookies/ (u/flyin1501 is me) * Expectation All statistics cookies in the buffer are updated no matter if the buffer's associated file is already created or not. * Why this is happening - `org-update-statistics-cookies` (C-c #) uses `org-map-entries` to update all cookies. - `org-map-entries` uses `org-agenda-prepare-buffers` to prepare the file when SCOPE is nil. Excerpt: (if (not scope) (progn (org-agenda-prepare-buffers (and buffer-file-name (list buffer-file-name))) (setq res (org-scan-tags func matcher org--matcher-tags-todo-only start-level))) - This function complains if the file does not exist, causing the error. * Solution (IMO) `org-map-entries` is quite complex because of its matching and scoping features; `org-update-statistics-cookies` only updates the current buffer and should use `org-map-region` instead. IMO it should go from (if all (progn (org-update-checkbox-count 'all) (org-map-entries 'org-update-parent-todo-statistics)) to: (if all (progn (org-update-checkbox-count 'all) (org-map-region 'org-update-parent-todo-statistics (point-min) (point-max))) >From 2081a1d2bd628dd8e5a1ad9fc4ffd58a4f951972 Mon Sep 17 00:00:00 2001 From: Nicholas Savage Date: Tue, 11 May 2021 06:59:14 -0400 Subject: [PATCH] lisp/org.el: Fix org-update-statistics-cookies error * lisp/org.el (org-update-statistics-cookies): Replace usage of `org-map-entries' with `org-map-region' to prevent bug where an error was thrown if the current buffer had not yet been saved to disk. Formatted from a patch proposal by m...@kisaragi-hiu.com Reported-by: m...@kisaragi-hiu.com --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 6dbf33abc..fc5197642 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9989,7 +9989,7 @@ all statistics cookies in the buffer." (if all (progn (org-update-checkbox-count 'all) - (org-map-entries 'org-update-parent-todo-statistics)) + (org-map-region 'org-update-parent-todo-statistics (point-min) (point-max))) (if (not (org-at-heading-p)) (org-update-checkbox-count) (let ((pos (point-marker)) -- 2.20.1
Re: [PATCH] Possibility of using alternative separators in macros
Hello Juan, On Friday, 30 Apr 2021 at 13:26, Juan Manuel Macías wrote: > Hi all, > > I would like to propose (patch attached) the possibility of using an > alternate character for separate arguments in replacement macros, > following a suggestion from Nicolas Goaziou in this (closed) thread: > https://orgmode.org/list/87o8ead42u@nicolasgoaziou.fr/ I finally got around to trying this out, applying the patch just now to the latest org from the git repository. I get the following when I try to export: Debugger entered--Lisp error: (void-variable sep) org-element-macro-parser() org-element--object-lex((bold code entity export-snippet footnote-reference inline-babel-call inline-src-block italic line-break latex-fragment link macro radio-target statistics-cookie strike-through subscript superscript target timestamp underline verbatim)) org-element-context() org-macro-replace-all((("date" . "") ("title" . "The title") ("email" . "") ("author" . "Professor Eric S Fraga") ("lastchange" . "2021.03.31 15:03") ("calc" . "@@latex:{\\color{green!50!black}\\texttt{ $1 }}@@") ("cite" . "[[$2][@@latex:\\vfill\\Citation{$1}@@]]") ("overlay" . "@@latex:\\begin{textblock}{$4}($2,$3)@@[[file:$1]]@...") ("parameter" . "src_elisp[:results value raw :var $1=(esf/get-para...") ("constant" closure (t) ( $1 _) (progn (message "Getting constant %s" $1) (org-table-get-constant $1))) ("input-file" . "m.org") ("modification-time" . #f(compiled-function (arg1 arg2 _) #)) ("keyword" lambda (arg1 _) (org-macro--find-keyword-value arg1)) ("n" lambda ( arg1 arg2 _) (org-macro--counter-increment arg1 arg2)) ("property" lambda (arg1 arg2 _) (org-macro--get-property arg1 arg2)) ("time" lambda (arg1 _) (format-time-string arg1))) ("DESCRIPTION" "KEYWORDS" "SUBTITLE" "DATE" "TITLE" "DATE" "AUTHOR")) org-export-as(latex nil nil nil nil) org-export-to-buffer(latex "*Org LATEX Export*" nil nil nil nil nil #f(compiled-function () #)) org-latex-export-as-latex(nil nil nil nil) org-export-dispatch(nil) funcall-interactively(org-export-dispatch nil) command-execute(org-export-dispatch) -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4.5-534-g8f03cd.dirty
Re: (void-variable timestamp-up) when building an agenda buffer
On 2021-05-11 19:06, Tim Cross writes: > The type of error you appear to be seeing is common with a broken > install. In your config, are you installing org from orgmode.org or > melpa rather than just using the version bundled with Emacs 27.2? If so, > it is likely that you have a 'mixed' install. This can happen if org is > loaded when you try to install or update the org version. A common > problem is not realising that something in your init file is causing org > to be loaded during startup - then when you try to do a package update, > you get a broken build. Thank you for the suggestion. I reinstalled org-mode and it seems to have fixed the problem. Best, Alan signature.asc Description: PGP signature
[bug] C-u org-update-statitics-cookies errors out with "Non-existent agenda file" if current file isn't saved
* Reproduction 1. emacs -Q 2. C-x C-f /tmp/new.org RET 3. Type anything 4. Type C-u C-c # (C-u org-update-statistics-cookies) to try to update all statistics cookies in the buffer 5. Notice the "Non-existent agenda file /tmp/new.org." error. This doesn't happen if the file already exists. I first saw this reported in this reddit thread: https://www.reddit.com/r/orgmode/comments/n9g1yf/is_this_a_bug_with_orgupdatestatisticcookies/ (u/flyin1501 is me) * Expectation All statistics cookies in the buffer are updated no matter if the buffer's associated file is already created or not. * Why this is happening - `org-update-statistics-cookies` (C-c #) uses `org-map-entries` to update all cookies. - `org-map-entries` uses `org-agenda-prepare-buffers` to prepare the file when SCOPE is nil. Excerpt: (if (not scope) (progn (org-agenda-prepare-buffers (and buffer-file-name (list buffer-file-name))) (setq res (org-scan-tags func matcher org--matcher-tags-todo-only start-level))) - This function complains if the file does not exist, causing the error. * Solution (IMO) `org-map-entries` is quite complex because of its matching and scoping features; `org-update-statistics-cookies` only updates the current buffer and should use `org-map-region` instead. IMO it should go from (if all (progn (org-update-checkbox-count 'all) (org-map-entries 'org-update-parent-todo-statistics)) to: (if all (progn (org-update-checkbox-count 'all) (org-map-region 'org-update-parent-todo-statistics (point-min) (point-max)))
Re: (void-variable timestamp-up) when building an agenda buffer
Hello again, On 2021-05-11 09:53, Alan Schmitt writes: > It seems the problem is deeper than that: I cannot use any code that > uses =org-dlet=… I’m on emacs 27.2. > > I did a quick test with no configuration, so the problem seems to be in > my config, but I’m cursious if this rings a bell for anyone. It seems that my vanilla emacs uses org 9.4.4, which was before the switch to lexical binding in 9.5, so I guess this is the issue. As it’s a pretty big one, I suspect it comes from my usage of doom (other doom users have confirmed the problem). Best, Alan signature.asc Description: PGP signature
Re: (void-variable timestamp-up) when building an agenda buffer
Alan Schmitt writes: > [[PGP Signed Part:Undecided]] > Hello, > > It seems the problem is deeper than that: I cannot use any code that > uses =org-dlet=… I’m on emacs 27.2. > > I did a quick test with no configuration, so the problem seems to be in > my config, but I’m cursious if this rings a bell for anyone. > > Thanks, > The type of error you appear to be seeing is common with a broken install. In your config, are you installing org from orgmode.org or melpa rather than just using the version bundled with Emacs 27.2? If so, it is likely that you have a 'mixed' install. This can happen if org is loaded when you try to install or update the org version. A common problem is not realising that something in your init file is causing org to be loaded during startup - then when you try to do a package update, you get a broken build. If your not installing org from a package, then it is likely something else in your init file and unfortunately, you may have to do the painful bisecting and debugging to find the cause. -- Tim Cross
Re: The fate of ditaa.jar (9.4.5.)
"Dr. Arne Babenhauserheide" writes: > [[PGP Signed Part:Undecided]] > > Tim Cross writes: >> I agree. As pointed out already, just bundling the jar file is not >> sufficient as you need a java runtime as well. > > Java is available in my distribution, ditaa is not. Removing ditaa from > org means that I have to do manual installation and configuration, while > with ditaa bundled, org-mode can simply note that I need java installed. > I get that. However, this is of course not the case for many users (Mac, Windows). Having to install additional software to realise org functionality is normal for much of org-mode. In fact, I had to install ditta when I first used it because it wasn't bundled. That was not an issue and no surprise given I also had to install textlive, plantuml, graphviz, taskjuggler, ledger, sqlite and many other things. I understand the convenience for users argument. However, I think we also need to consider the maintenance overheads and consistency aspects as well (including dealing with bug reports when it doesn't work). >> If we bundle it, we also need to ensure it is updated if/when new jar >> versions are released. > > We can do that, but we don’t have to. As long as the bundled jar works, > it is much better than no jar. And users can use newer version as they > like by changing the jar-path. > > Note that this isn’t about security, since even if an old version of > ditaa should turn out to be vulnerable, this would still be less > dangerous than a shell-block. Therefore old versions of ditaa are > completely fine. > My thoughts were more about bugs and confusing deprecation warnings which can arise when using an older jar file with a more recent jre. Ultimately, it will fall to whoever steps up to maintain ditta support to decide. -- Tim Cross
Re: (void-variable timestamp-up) when building an agenda buffer
Hello, It seems the problem is deeper than that: I cannot use any code that uses =org-dlet=… I’m on emacs 27.2. I did a quick test with no configuration, so the problem seems to be in my config, but I’m cursious if this rings a bell for anyone. Thanks, Alan signature.asc Description: PGP signature
(void-variable timestamp-up) when building an agenda buffer
Hello, After a recent update, I no longer can build an agenda buffer. I put the backtrace that I get at the end of this message. On the top of the trace there is a call to org-entries-lessp, which looks like this: (defun org-entries-lessp (a b) "Predicate for sorting agenda entries." ;; The following variables will be used when the form is evaluated. ;; So even though the compiler complains, keep them. (let ((ss org-agenda-sorting-strategy-selected)) (org-dlet ((timestamp-up(and (org-em 'timestamp-up 'timestamp-down ss) (org-cmp-ts a b ""))) Did something change recently around this code? Thanks, Alan Debugger entered--Lisp error: (void-variable timestamp-up) org-entries-lessp(#(" Mobile: TODO 2..." 0 14 (type "tagsmatch" priority 1000 ts-date nil todo-state "TODO" org-hd-marker # org-marker # help-echo "mouse-2 or RET jump ..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANC..." org-todo-regexp "\\(CANCELLED\\|DONE\\|H..." org-not-done-regexp "\\(HOLD\\|NEXT\\|TODO\\|..." ...) 14 18 (org-heading t fontified t face org-todo org-category "Mobile" tags ... org-priority-highest 65 org-priority-lowest 67 time-of-day nil duration nil breadcrumbs nil ...) 18 19 (type "tagsmatch" priority 1000 ts-date nil todo-state "TODO" org-hd-marker # org-marker # help-echo "mouse-2 or RET jump ..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANC..." org-todo-regexp "\\(CANCELLED\\|DONE\\|H..." org-not-done-regexp "\\(HOLD\\|NEXT\\|TODO\\|..." ...) 19 30 (type "tagsmatch" priority 1000 ts-date nil todo-state "TODO" org-hd-marker # org-marker # help-echo "mouse-2 or RET jump ..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANC..." org-todo-regexp "\\(CANCELLED\\|DONE\\|H..." org-not-done-regexp "\\(HOLD\\|NEXT\\|TODO\\|..." ...) 30 55 (type "tagsmatch" priority 1000 ts-date nil todo-state "TODO" org-hd-marker # org-marker # help-echo "mouse-2 or RET jump ..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANC..." org-todo-regexp "\\(CANCELLED\\|DONE\\|H..." org-not-done-regexp "\\(HOLD\\|NEXT\\|TODO\\|..." ...) 55 61 (type "tagsmatch" priority 1000 ts-date nil todo-state "TODO" org-hd-marker # org-marker # help-echo "mouse-2 or RET jump ..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANC..." org-todo-regexp "\\(CANCELLED\\|DONE\\|H..." org-not-done-regexp "\\(HOLD\\|NEXT\\|TODO\\|..." ...) ...) #(" Mobile: Au rez..." 0 14 (type "tagsmatch" priority 1000 ts-date nil todo-state nil org-hd-marker # org-marker # help-echo "mouse-2 or RET jump ..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANC..." org-todo-regexp "\\(CANCELLED\\|DONE\\|H..." org-not-done-regexp "\\(HOLD\\|NEXT\\|TODO\\|..." ...) 14 165 (type "tagsmatch" priority 1000 ts-date nil todo-state nil org-hd-marker # org-marker # help-echo "mouse-2 or RET jump ..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANC..." org-todo-regexp "\\(CANCELLED\\|DONE\\|H..." org-not-done-regexp "\\(HOLD\\|NEXT\\|TODO\\|..." ...) 165 167 (type "tagsmatch" priority 1000 ts-date nil todo-state nil org-hd-marker # org-marker # help-echo "mouse-2 or RET jump ..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANC..." org-todo-regexp "\\(CANCELLED\\|DONE\\|H..." org-not-done-regexp "\\(HOLD\\|NEXT\\|TODO\\|..." ...) 167 173 (type "tagsmatch" priority 1000 ts-date nil todo-state nil org-hd-marker # org-marker # help-echo "mouse-2 or RET jump ..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANC..." org-todo-regexp "\\(CANCELLED\\|DONE\\|H..." org-not-done-regexp "\\(HOLD\\|NEXT\\|TODO\\|..." ...) 173 175 (type "tagsmatch" priority 1000 ts-date nil todo-state nil org-hd-marker # org-marker # help-echo "mouse-2 or RET jump ..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANC..." org-todo-regexp "\\(CANCELLED\\|DONE\\|H..." org-not-done-regexp "\\(HOLD\\|NEXT\\|TODO\\|..." ...))) sort((... ... ...) org-entries-lessp) org-agenda-finalize-entries((... ... ... ... ... ...) tags) org-tags-view(nil "REFILE") #f(compiled-function () #)() funcall(#f(compiled-function () #)) (let ((org-agenda-overriding-header '"Tasks to Refile")) (funcall '#f(compiled-function () #))) eval((let ((org-agenda-overriding-header '"Tasks to Refile")) (funcall '#f(compiled-function () # org-agenda-run-series("daily review" (((tags "REFILE" ((org-agenda-overriding-header "Tasks to Refile"))) (tags-todo "-CANCELLED-@maybe/!-HOLD" ((org-agenda-overriding-header "Stuck Projects") (org-agenda-skip-function 'bh/skip-non-stuck-projects))) (agenda "" ((org-agenda-skip-scheduled-if-deadline-is-shown t) (org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled) (org-agenda-span 'day) (org-agenda-overriding-header "Today"))) (agenda "" ((org-agenda-skip-scheduled-if-deadline-is-shown t) (org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled) (org-agenda-span 6) (org-agenda-start-day "+1d") (org-agenda-overriding-header
he fate of ditaa.jar (9.4.5.)
> Sent: Tuesday, May 11, 2021 at 6:35 PM > From: "Dr. Arne Babenhauserheide" > To: "Tim Cross" > Cc: emacs-orgmode@gnu.org > Subject: Re: The fate of ditaa.jar (9.4.5.) > > > Tim Cross writes: > > I agree. As pointed out already, just bundling the jar file is not > > sufficient as you need a java runtime as well. > > Java is available in my distribution, ditaa is not. Removing ditaa from > org means that I have to do manual installation and configuration, while > with ditaa bundled, org-mode can simply note that I need java installed. > > > If we bundle it, we also need to ensure it is updated if/when new jar > > versions are released. > > We can do that, but we don’t have to. As long as the bundled jar works, > it is much better than no jar. And users can use newer version as they > like by changing the jar-path. A jar that works would be good as initial setup, then people can change that as they wish. > Note that this isn’t about security, since even if an old version of > ditaa should turn out to be vulnerable, this would still be less > dangerous than a shell-block. Therefore old versions of ditaa are > completely fine. > > Best wishes, > Arne > -- > Unpolitisch sein > heißt politisch sein > ohne es zu merken >
Re: Highlighting and Background Colour for Source Code
> Sent: Tuesday, May 11, 2021 at 5:50 PM > From: "Tim Cross" > To: "Christopher Dimech" > Cc: emacs-orgmode@gnu.org > Subject: Re: Highlighting and Background Colour for Source Code > > > Christopher Dimech writes: > > >> Sent: Tuesday, May 11, 2021 at 4:50 PM > >> From: "Tim Cross" > >> To: emacs-orgmode@gnu.org > >> Subject: Re: Highlighting and Background Colour for Source Code > >> > >> > >> Christopher Dimech writes: > >> > >> > Currently currently handles the highlighting of programming languages > >> > through > >> > "Code Blocks". Could org-mode have the capability of highlighting a > >> > whole buffer > >> > with a particular language highlight typeface. > >> > > >> > >> Sorry, I don't quite understand what exactly your asking for? > > > > Suppose I have an elisp file and I change to org-mode by hitting "M-x > > org-mode". > > The code does not get highlighted because it is not embedded within > > org-babel > > construct. > > > > If I have a programming language file with some org-mode heading commands > > in it, > > and change to org-mode, it would be neat to have language highlighting > > available. > > > > OK, now I think I understand. > > Basically, with full org-mode, this is not possible and I don't think it > is actually want you want. Once you switch modes, say from elisp mode to > org mode, a lot more changes than just the font locking. Keybindings, > various support minor modes and lots more. > > The 'normal' Emacs way to handle what you are looking for is to add a > minor mode. A minor mode is used to add some level of functionality to a > buffer without losing the major mode settings. Normally, you only have > one major mode associated with a buffer and often that mode is augmented > with a bunch of minor modes. For example, outshine mode is a minor mode > which adds some org-like functionality to non org-mode buffers. > > Have a look at > > https://orgmode.org/worg/org-tutorials/org-outside-org.html > > I think that might give you some ideas to get you started. You may need > a few different minor modes to get the full setup you want and you will > likely need to do some customisation of key bindings etc to get things > how you like it. I agree that some features of org-mode (e.ge heading folding, code folding) would be good to have available in emacs-lisp-mode, texinfo-mode, ... The use of general minor-mode such as outline-minor-mode would be a good place to handle the various programming languages. Currently, there in outline-minor-mode and various others (outline-magic, outshine). Things are all over the place. I know that Carsten was keen to persuade for ideas in org-mode to be included in outline-minor-mode. This has not happened. I am convinced that the developers of org-mode could make valuable contributions to outline-minor-mode, because currently the ideas there are extremely convoluted and writing an outline setup is difficult. There will be a number of capabilities to consider 1. Heading Levels using comment lines (e.g. ";;; * Heahding", ";;; ** Subheading", ...) 2. Folding of headings and subheadings only (cycling using single key) 3. Folding of code structures only (cycling using single key) That would be valuable for starters. Then we can look at more beef later on. What do you think? Would the org-team be willing and able to assist a re-development of outline-minor-mode? > -- > Tim Cross >
Re: The fate of ditaa.jar (9.4.5.)
Tim Cross writes: > I agree. As pointed out already, just bundling the jar file is not > sufficient as you need a java runtime as well. Java is available in my distribution, ditaa is not. Removing ditaa from org means that I have to do manual installation and configuration, while with ditaa bundled, org-mode can simply note that I need java installed. > If we bundle it, we also need to ensure it is updated if/when new jar > versions are released. We can do that, but we don’t have to. As long as the bundled jar works, it is much better than no jar. And users can use newer version as they like by changing the jar-path. Note that this isn’t about security, since even if an old version of ditaa should turn out to be vulnerable, this would still be less dangerous than a shell-block. Therefore old versions of ditaa are completely fine. Best wishes, Arne -- Unpolitisch sein heißt politisch sein ohne es zu merken signature.asc Description: PGP signature
Re: Highlighting and Background Colour for Source Code
Christopher Dimech writes: >> Sent: Tuesday, May 11, 2021 at 4:50 PM >> From: "Tim Cross" >> To: emacs-orgmode@gnu.org >> Subject: Re: Highlighting and Background Colour for Source Code >> >> >> Christopher Dimech writes: >> >> > Currently currently handles the highlighting of programming languages >> > through >> > "Code Blocks". Could org-mode have the capability of highlighting a whole >> > buffer >> > with a particular language highlight typeface. >> > >> >> Sorry, I don't quite understand what exactly your asking for? > > Suppose I have an elisp file and I change to org-mode by hitting "M-x > org-mode". > The code does not get highlighted because it is not embedded within org-babel > construct. > > If I have a programming language file with some org-mode heading commands in > it, > and change to org-mode, it would be neat to have language highlighting > available. > OK, now I think I understand. Basically, with full org-mode, this is not possible and I don't think it is actually want you want. Once you switch modes, say from elisp mode to org mode, a lot more changes than just the font locking. Keybindings, various support minor modes and lots more. The 'normal' Emacs way to handle what you are looking for is to add a minor mode. A minor mode is used to add some level of functionality to a buffer without losing the major mode settings. Normally, you only have one major mode associated with a buffer and often that mode is augmented with a bunch of minor modes. For example, outshine mode is a minor mode which adds some org-like functionality to non org-mode buffers. Have a look at https://orgmode.org/worg/org-tutorials/org-outside-org.html I think that might give you some ideas to get you started. You may need a few different minor modes to get the full setup you want and you will likely need to do some customisation of key bindings etc to get things how you like it. -- Tim Cross